Wednesday, 15 October 2008

Deleting extraneous files from destination: rsync

There were some reported non-functioning --delete flag when using rsync in syncronizing two filesystems/locations. This may occur due to failures or errors during rsync tries to sync zero size files. One simple work around for this is using --ignore-errors flag. Some examples for taking backup of user directory:

rsync -vaz -e ssh --delete --ignore-errors user@host:/home/user/ local_dir/
rsync -vaz --delete --ignore-errors /home/user/ /media/disk/backup_dir/

No comments:

(c) Copyright 2008-2017 Mehmet Suzen (suzen at acm dot org)

Creative Commons Licence
This work is licensed under a Creative Commons Attribution 3.0 Unported License.