关于cpanel主机full back目录排除
由于ds主机前几天悲剧了,鸟机房部分节点vps全部数据丢失。血的教训,不敢再用了,又用起了闲置很Justhost 主机,这次先考虑备份。。
我记得cpanel在进行全备份的时候,可以通过一个配置文件设置排除一些目录的。 由于里面放了些下载文件,体积庞大。每次备份完全没必要还浪费时间。
但具体怎么配忘了,live chat问了下客服。 他告诉我 you cant.. 我问他 are u suer? 结果他很suer。。 他这个suer导致我深度怀疑我是否记错了。。
经google终于找到方法,并测试。 我才确信我木记错。。 方法如下。
顺便鄙视下Justhost 的技术支持,他奶奶的没搞清楚就乱sure,误导人啊。。。
You can exclude certain files and directories from being included in backups. This is accomplished by listing the files or directories in a configuration file called
cpbackup-exclude.confTo do this:
- If it does not already exist, create the file
cpbackup-exclude.confin the home directory of the user who owns the files or directories you wish to exclude.
- For example, type:
touch /home/user/cpbackup-exclude.conf- Inside the file, type each item you wish to exclude from backups, one per line. If you enter a directory name, all files inside the directory will be excluded from backups.
- Directories should not include leading or trailing characters of any kind, including slashes or periods.
- Simple shell wildcard characters are allowed for matching control.
- Here is a sample of the configuration file content:
*/.wysiwygPro_* */core.[0-9] */core.[0-9][0-9] .MirrorSearch .cpan< .cpanel/caches .cpanel/datastore .cpcpan .wysiwygPro_* access-logs core.[0-9] core.[0-9][0-9] public_ftp/.ftpquota PS:cpanel官方说明: http://etwiki.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/CpbackupExclude
