Situation.
host: computer I use daily
server: proliant DL380 with MSA500 which serves as a backup server.
I've just finished copying 1,4TB of data over the network and I'm experimenting with file deletion and creation of new files now.
I'm seeing that rsync fails to delete some files (see code below). I'm not very confident to rely on the option --ignore-errors. Is there another workaround to avoid using that option?
Code:
user@host:~$ rsync -zaPtgop --exclude="/home/user/.gvfs" --delete-before --progress -e ssh --skip-compress gz/zip/z/rpm/deb/iso/bz2/t[gb]z/7z/mp[34]/mov/avi/ogg/jpg/jpeg --stats /home/user/directory/ server:/home/user/directory
user@server's password:
building file list ...
123456 files to consider
rsync: opendir "/home/user/directory/lost+found" failed: Permission denied (13)
IO error encountered -- skipping file deletion
./
rsync: failed to set times on "/home/user/directory/.": Operation not permitted (1)
rsync: send_files failed to open "/home/user/directory/removespaces": Permission denied (13)
lost+found/
rsync: failed to set times on "/home/user/directory/lost+found": Operation not permitted (1)
Number of files: 123456
Number of files transferred: 1
Total file size: 1545600428805 bytes
Total transferred file size: 766 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 9271029
File list generation time: 1.074 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 9271090
Total bytes received: 41
sent 9271090 bytes received 41 bytes 1090721.29 bytes/sec
total size is 1545600428805 speedup is 166711.10
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]
Here I tried again with the --ignore-errors option and it works. Yet again I'm not fully confident using this option. Feels a bit things might go wrong in certain situations, although I can't think what why or when.
Code:
user@host:~$ rsync -zaPtgop --exclude="/home/user/.gvfs" --delete-before --ignore-errors --progress -e ssh --skip-compress gz/zip/z/rpm/deb/iso/bz2/t[gb]z/7z/mp[34]/mov/avi/ogg/jpg/jpeg --stats /home/user/directory/ server:/home/user/directory
user@server's password:
Permission denied, please try again.
user@server's password:
building file list ...
123456 files to consider
rsync: opendir "/home/user/directory/lost+found" failed: Permission denied (13)
deleting zandbak/file1.exe
deleting zandbak/file2.exe
./
rsync: failed to set times on "/home/user/directory/.": Operation not permitted (1)
rsync: send_files failed to open "/home/user/directory/removespaces": Permission denied (13)
lost+found/
rsync: failed to set times on "/home/user/directory/lost+found": Operation not permitted (1)
zandbak/
Number of files: 123456
Number of files transferred: 1
Total file size: 1545600428805 bytes
Total transferred file size: 766 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 9271029
File list generation time: 0.860 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 9271097
Total bytes received: 48
sent 9271097 bytes received 48 bytes 741691.60 bytes/sec
total size is 1545600428805 speedup is 166710.85
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]
user@host:~$