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.
This is neat, I might work this around a bit or add another script to tar and keep the past few backups that way. I don’t need full backups everyday forever, but it’s a sweet start.
Have a look at the http://www.mikerubel.org/computers/rsync_snapshots/ link from my post – the idea there is to keep only 3 or 4 backups, rotating the names and deleting the oldest on each run.
The disadvantage with using tar is your hardlinks won’t save any space once you’ve copied the files into tarballs
hey matt, its mark henrick from BBC. i have been using rysnc to backup my home server with this command
$rsync -avs –delete mark@192.168.1.6:/var/www /media/disk2/My\ Documents/backup/server.
btw, do you maintain these servers yourself, or is it a professional company
That’s cool. The advantage to using a script like mine would be if you accidentally delete something you’d still have the backup of it from the previous day. After setting up my script someone told me that rsnapshot (available via aptitude) does almost the same thing and is easy to set up, so it might be worth having a look at that if you’re interested.
“Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it
”
On a more serious note, using tarballs (tarbombs) for backups makes me a sad panda.
@robinetd, you make me a sad panda.
in soviet russia, sad panda makes you.