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.


1 Answer 1


(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.

  • 2. Yes but if I have an empty computer w/ no OS that I want to restore to, how do I do that? 3. Does that mean all my system files are not hardware specific, and that after the restore my system will just boot up and start working as if nothing happened? And OK, if I ask something like this again in the future I will split up the question. :) Sorry about the wordiness...
    – hpy
    Commented Feb 26, 2011 at 0:03
  • 1
    @penyuan: You need to start from some OS. If you have an empty computer, you'll need to boot from a CD/USB/…, and recreate the partitions and filesystems you want. Then you can use file-level backup tools such as rsync or rdiff-backup to restore your files. Commented Feb 26, 2011 at 0:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .