rsync backup script

There are many backup solutions available for Linux, several of them in fact using rsync under the covers. However none of them quite seemed to fit my requirements (or I didn’t dig deep enough into the options).

Instead I have put together my own shell script to back up my home directory. It takes advantage of Linux filesystems’ capability to give a single file more than one name (known as hardlinking), and rsync’s –link-dest option. In essence I have a hybrid incremental/full backup system, which only takes as long to run as an incremental system.

My main inspiration comes from this page by Mike Rubel. My script is available at http://funkyhat.org/stuff/scripts/funkybackup

Update (17-05-2010): The script now writes out the date of the most recent backup to a file if the rsync process completes successfully. This means that if a backup is interrupted part way through it won’t be used as the base for linking, so my backup space won’t get bloated artificially.

7 Responses to “rsync backup script”


Leave a Reply