rsync command deletion error "IO error encountered -- skipping file deletion"

Posted by Jam88 on Super User See other posts from Super User or by Jam88
Published on 2012-12-07T03:29:35Z Indexed on 2012/12/07 5:09 UTC
Read the original article Hit count: 440

Filed under:
|
|

I use rsync command to take backup of files from one of my ubuntu server to another ubuntu machine. Backup server trigger a script that use rysnc command. Here is the command I use

rsync -rltvh --partial --stats --exclude=.beagle/ --exclude=.* --delete-after root@live_server:/home/ /home/live_server_backup/home >> /tmp/logfile.log 2>&1

live_server is ssh-able without password. So it works. Now problem is with

--delete-after option

After all file synced .At the end I can see deletion procedure skipped.logfile error is like

IO error encountered -- skipping file deletion

When i tried to find log there were some error while file sync

rsync: send_files failed to open "/home/xyz/Desktop/PPT_session_1_context.pdf": Permission denied (13)

So my understanding is as rsync could not read all the files from target for safety reason it is skipping the file deletion.

Is there any way to make --delete-after work even if there is some permission error? I do not want to use force deletion as it will be dangerous in some situation.

© Super User or respective owner

Related posts about permissions

Related posts about delete