Simple incremental full backups

Managing full incremental backups with rsync

I am hosting at MediaTemple and pretty happy with their service. I have a single database and a lot of files. Here is how I manage my backup. Please read the comments and customise the variables in the scripts.


Here is the script I am using to backup mysql. Create a ~/backup/ directory for this so that the mysql dump is saved on your home directory. The expiration script is available in the gist.

Actual backup

Now you have everything on your home directory, you can simply back this up to you laptop or other server. The script will create a folder for each day and get incremental backups which will have the unchanged files hardlinked. Note that you’ll need to add this to a daily cron.