0

我使用rsync备份我的 Ubuntu 安装的主目录 (ext4)。我使用以下命令将文件和文件夹复制到远程服务器(ext4)。

$ rsync -rt --delete --delete-excluded --links \
  --exclude-from '/home/jjd/rsync-home-exclude.txt' \
  /home/jjd/ server:/volume1/backup-home

我定义了一些可以忽略备份的文件夹和文件:

$ cat /home/jjd/rsync-home-exclude.txt
/home/jjd/.thumbnails/
/home/jjd/Downloads/.org.chromium.Chromium*
/home/jjd/.cpan
.cache/
*.swp
*.lock
*.tmp
/home/jjd/.local/share/recently-used.*
.TrueCrypt/.show-request-queue
.dropbox/command_socket
.dropbox/iface_socket
*.sock%

尽管如此,rsync仍然报告以下错误:

rsync: opendir "/home/jjd/.cpan/build/local-lib-1.008009-Xl6GGK/inc" failed: Permission denied (13)
rsync: opendir "/home/jjd/.cpan/build/local-lib-1.008009-Xl6GGK/lib" failed: Permission denied (13)
rsync: opendir "/home/jjd/.cpan/build/local-lib-1.008009-Xl6GGK/t" failed: Permission denied (13)
IO error encountered -- skipping file deletion
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]
4

1 回答 1

1

只需/home/jjd从排除文件中删除。根据 rsync 文档,前导斜杠不适用于文件系统的根,但适用于“传输的根”。

于 2013-08-09T07:49:45.507 回答