rsync“操作不允许”

我正试图这么简单的rsync到USB硬盘,命令是

rsync -az --modify-window=2 /home /mnt/exthd/tmp/

我以root身份运行。

但是我得到了很多错误,这些错误似乎都与权限不足有关:

 rsync: chown "/mnt/exthd/tmp/home/someuser" failed: Operation not permitted (1) rsync: chown "/mnt/exthd/tmp/home/someuser/.bash_logout" failed: Operation not permitted (1) rsync: chown "/mnt/exthd/tmp/home/someuser/.bash_profile" failed: Operation not permitted (1) rsync: chown "/mnt/exthd/tmp/home/someuser/.bashrc" failed: Operation not permitted (1) rsync: chown "/mnt/exthd/tmp/home/guest" failed: Operation not permitted (1) rsync: chown "/mnt/exthd/tmp/home/guest/.bash_logout" failed: Operation not permitted (1) rsync: chown "/mnt/exthd/tmp/home/guest/.bash_profile" failed: Operation not permitted (1) rsync: chown "/mnt/exthd/tmp/home/guest/.bashrc" failed: Operation not permitted (1) rsync: symlink "/mnt/exthd/tmp/home/guest/fred2" -> "fred" failed: Operation not permitted (1) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1042) [sender=3.0.7] 

这是版本3.0.7。 我已经尝试使用 – 选项不起作用。 有任何想法吗?

FAT文件系统(Linux的mount调用vfat)不能存储一些关于你的文件在Linux端的权限和所有权数据。

您的select似乎是:

  • 使用ext3 / 4或其他支持这些属性的文件系统格式化磁盘。 我想如果你与Windows共享的话,即使是NTFS也能胜任。
  • 使用--fake-super选项存储这些额外的属性,以便rsync在文件中写入xattrs而不是使用文件系统属性
  • 忽略错误,那些属性就会丢失。
  • 将你的数据集包装在一个tar文件中,并将tar文件放在FAT系统上。 所有的属性都保留下来,如果你提取它,就会出现。

Rsync正在尝试文件系统不允许或不能执行的操作(chown和symlink)。 我猜你的外部高清有一个FAT文件系统。

如果你想做一个适当的备份,你可能想要使用焦油。