背景
我正在尝试对我的 Ubuntu 系统进行非常全面的备份。我正在运行以下rsync
命令:
sudo rsync -aAEHSXxv --progress --delete --exclude={/home/sterlingbutters/Butters-Ubuntu-Backup/*, /home/*/.cache/*, /home/*/.local/share/Trash/*, /dev/*, /proc/*, /sys/*, /tmp/*, /mnt/*, /media/*, /lost+found} / /home/sterlingbutters/Butters-Ubuntu-Backup
文件结构应该很明显的地方。
问题
我得到以下关于不存在的文件/目录的输出:
rsync: change_dir "/home/*/.cache" failed: No such file or directory (2) rsync: change_dir "/home/*/.local/share/Trash" failed: No such file or directory (2) rsync: link_stat "/dev/*," failed: No such file or directory (2) rsync: link_stat "/proc/*," failed: No such file or directory (2) rsync: link_stat "/sys/*," failed: No such file or directory (2) rsync: link_stat "/tmp/*," failed: No such file or directory (2) rsync: link_stat "/mnt/*," failed: No such file or directory (2) rsync: link_stat "/media/*," failed: No such file or directory (2) rsync: link_stat "/lost+found}" failed: No such file or directory (2) created directory /home/sterlingbutters/Butters-Ubuntu-Backup IO error encountered -- skipping file deletion
这是否意味着源或目标上不存在该文件?(因为它们清楚地存在于源上)
后来,我开始收到一堆关于
.cache
我认为我排除的目录的条目:... home/sterlingbutters/.cache/mozilla/firefox/90d4yr8z.default/cache2/entries/76A1426700B3173C5B976F65F04FA6CD01D90D15 ...
我很担心“看看会发生什么”,因为如果没有正确排除目录,我可能会遇到无限复制循环,因为目标目录位于 ~/.
我的代码几乎完全遵循此处文档中指定的模式(我所做的唯一更改我觉得应该仍然可以接受):我也觉得我的语法遵循我在其他论坛帖子中找到的语法。即使没有,这不会与链接中的文档产生差异吗?
感谢所有帮助 - 谢谢!
您的
rsync
命令行几乎是正确的。排除列表中的逗号后不应有空格,