我的rsync是否成功备份了所有数据?

我的rsync是否成功备份了所有数据?

rsync后看起来没有一个字节丢失,但是有一些错误:

ujjain@DS3018xs:/volume1$ cat rsync.sh
rsync -av photo.tar /var/services/homes/ujjain/nfs/RAIDF1/
rsync -av music.tar /var/services/homes/ujjain/nfs/RAIDF1/
ujjain@nas:/volume2/Files/RAIDF1$ ls -al
total 418910340
drwxrwxrwx+ 1 admin        users           36 Nov 29 22:54 .
drwxrwxrwx+ 1 ujjain users          410 Nov 29 21:47 ..
-rw-------  1 admin        users  53127639040 Nov 29 20:52 music.tar
-rw-------  1 admin        users 375836549120 Nov 29 20:50 photo.tar
ujjain@nas:/volume2/Files/RAIDF1$
root@DS3018xs:/volume1# ls -al *tar
-rw-r--r-- 1 ujjain root  53127639040 Nov 29 20:52 music.tar
-rw-r--r-- 1 ujjain root 375836549120 Nov 29 20:50 photo.tar
root@DS3018xs:/volume1# cat nohup.out
sending incremental file list
created directory /var/services/homes/ujjain/nfs/RAIDF1
photo.tar
rsync: chown "/var/services/homes/ujjain/nfs/RAIDF1/.photo.tar.qeeaLI" failed: Operation not permitted (1)

sent 375882427699 bytes  received 31 bytes  107165339.34 bytes/sec
total size is 375836549120  speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1355) [sender=3.0.9]
sending incremental file list
music.tar
rsync: chown "/var/services/homes/ujjain/nfs/RAIDF1/.music.tar.mHlkfL" failed: Operation not permitted (1)

sent 53134124438 bytes  received 31 bytes  105739551.18 bytes/sec
total size is 53127639040  speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1355) [sender=3.0.9]
root@DS3018xs:/volume1#

我的rsync是否成功备份了所有数据?

答案1

看起来 rsync 无法在目标上设置属性(chown 失败)。也许文件系统不支持它?

-a标志设置了许多选项,包括 -o,当目标以 root 身份运行时,它将尝试设置目标文件的所有者。如果您不需要所有者设置,那么您可以通过添加标志--no-owner(或通过删除-a,但您可能不想这样做)来告诉 rsync 不要打扰。

文件中的数据可能已复制得很好。只有有关文件(所有权)的元数据显示错误。

相关内容