I've been asked a few times recently about how I backup using rsync. I thought I would share the backup script I use at home for anyone interested.

It uses rsync to perform incremental backups, making use of hard links to save space. The script expects a mounted drive - I rotate external drives. It will cleanup old backups based on a threshold number to keep. It's not very smart about ensuring there is sufficient disk space, but this works for my simple use case. I run it daily in a cron job redirecting stdout and stderr to a log file. I also check this log file regularly to ensure the backup is working correctly.

Hope this is helpful to others.