[英]Trouble excluding specific folders in a duplicity backup
I am trying to backup my web root using duplicity and am having trouble excluding specific folders. 我正在尝试使用duplicity备份我的Web根目录,并且在排除特定文件夹时遇到问题。
I want to back up /var/www/
that has manny subfolders containg sites : eg : 我想备份/var/www/
,其中包含包含站点的manny子文件夹:例如:
/var/www/site1.com, /var/www/site2.com
I want to exclude logs and cache folders that can be annywhere in each sites folder structure. 我想排除每个站点文件夹结构中可能无处的日志和缓存文件夹。
eg : 例如:
/var/www/site1.com/cache, /var/www/site1.com/logs
or : 要么 :
/var/www/site2.com/app/cache, /var/www/site2.com/app/logs
Cache folders are allways called 'cache' Log folders are allways called 'logs' 缓存文件夹总是称为“缓存”日志文件夹总是称为“日志”
The command I am using (that does not work) is : 我正在使用的命令(不起作用)是:
duplicity --include /var/www/ --exclude cache --exclude logs --exclude "**" / s3+http://domain.com/files/
And I get the following error : 我收到以下错误:
Fatal Error: The file specification
cache
cannot match any files in the base directory
/
Useful file specifications begin with the base directory or some
pattern (such as '**') which matches the base directory.
我终于解决了这个问题:
duplicity --exclude "**cache/**" --exclude "**logs/**" /var/www s3+http://domain.com/files/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.