【发布时间】:2013-08-21 23:55:49
【问题描述】:
我正在做一个备份系统。
我有两台服务器:主服务器发送数据到备份服务器,然后,备份服务器压缩数据。为了节省磁盘使用量,我只需压缩已更改的文件,这要归功于存储上次备份时间的flag-file。
有时它可以正常工作,但有时我的脚本退出时出现error 123此错误来自xargs
描述是:
123 if any invocation of the command exited with status 1-125
所以我发布的command 是:
find /home/* -name "<em>.</em>" -not -path "/home/*/www/cache/*" -not -path "/home/*/www/cc/cache/*" -not -path "/home/*/www/ot/cache/*" -not -path "/home/backups/*" -newer /var/backups/data/flagfile -print0 | xargs -0 -r tar -czvf /home/backups/incremental/H14/backup.tar.gz
当我这样做时:
find /home/* -name "*.*" -not -path "/home/*/www/cache/*" -not -path "/home/*/www/cc/cache/*" -not -path "/home/*/www/ot/cache/*" -not -path "/home/backups/*" -newer /var/backups/data/flagfile -print0
它会像预期的那样返回一个文件列表。
感谢您的帮助!
【问题讨论】:
标签: linux command-line backup tar