Rsync for backup

Rsync is very useful tool for making remote backups. I use it with following options:
-avzP which are suitable for making backups. However there are some more. First --bwlimit=XX for setting upper bandwidth limit. I wish there was some way to dynamically changing limit, when rsync is running. I normal operation mode rsync makes copy of synced file, and when sync is done new file on destination file system is replacing old one. It is safe (there is always not corrupted copy of file), but requires to have spare place on file system (when You backup files with size like 20GB it can be issue). There is option --inplace changing this behaviour. When used changes are made directly on remote file. And this is risky part – if something goes wrong during backup, remote file could be corrupted, since changes were made directly on only remote copy, and were not full synced.

From other observations – when making copies it is wise to create tar archives, not gziped ones. Why? Because when You change part of tar archive not compressed tar changes only where changed file was placed in archive. In gziped file changes are much more bigger. So if Yu have place to make not compressed archives, make them, and rsync in this form. Rsync can perform compression of transmitted data, and volume of data to transmit is much more smaller.

Or, if Your file-system supports snapshots (like FreeBSD’s UFS does) make rsync copy from snapshot.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.