Incremental Backup – Issues with Incremental System Backup and Restore Using Rsync or Rdiff-Backup

backuprdiff-backuprestorersync

I've been reading about using rsync and rdiff-backup to make incremental backups of my entire Linux system. I am planning to practise that by setting up a Linux system, making some changes to it, erasing everything and restoring the system (all with the convenience of doing it in a virtual machine). But I want to clarify a few things before taking the plunge:

  1. How do I get fine control about what gets included in and excluded from the backup? i.e. by default would everything (including invisible "." files, trash, etc.) be backed up? If so, how can I exclude some of them?
  2. The rdiff-backup tutorial tells you how to retrieve a file from an arbitrary time in the past (as long as you still have the backup). What if I want to restore the complete system on a new computer? How do I do that?
  3. Suppose I make backups of my system on machine A. A few years later I buy a new computer B, and want to restore my system from the backup of machine A. Since the hardware might be totally different, will my new system work when I try to start it up after the restore? How can I ensure a smooth restore onto a new machine?

Thanks for your answers.

Best Answer

(If you have three questions, it's better to ask three separate questions. But since the answers are short I'll answer them all.)

  1. Both rsync and rdiff-backup have fairly powerful file selection mechanisms, based on inclusion and exclusion rules. I wrote an rsync filter tutorial. Rdiff-backup's filters are based on the same principles but the details are different, see “file selection” section in the manual.

  2. Restore the whole backup (i.e. the root directory of the backup tree) as of now: rdiff-backup -r now /path/to/backup /where/to/restore.

  3. There's nothing in the storage format that depends on your hardware. You can save and restore on different machines, it doesn't matter.

Related Question