Thursday, November 09, 2006

Use rdiff-backup for incremental backup

I'm always looking for an easy solution for backup my Linux box. I tried tar, rsync but they 're just 'too simple'. They are good in mirroring or one time backup, but not incremental. "Dump" is better, but it doesn't support Reiserfs, which is my favorite filesystem. What about NetBackup or BrightStor? Just because it costs money. And Bacula? I would say it is a wonderful network backup solution, but implementation is a bit complicated. Finally I choose "rdiff-backup".

How easy it is? Let's say I want to backup a server to a directory /archive. I just have to run the following command:
rdiff-backup --exclude-special-files --exclude-filelist /exclude.lst / /archive

What is the exclude-filelist? It's just a file to mention that which file/directory should NOT be included:

(... or other directories you like)

Just run the command once a day and then you will got an incremental backup everyday. If you want to decide a retention period, say 2 weeks, then you can run "rdiff-backup --force --remove-older-than 2W /archive". This can help to save spaces.

rdiff-backup can also backup via the network and support ACLs. Please refer to the official site or man page for more usages.

No comments: