I'm currently configuring an Ubuntu Server system and would like to perform routine backups using rsync. The goal is to have the right files backed up so that I can use the backup to create an identical system running somewhere else without a hitch (identical ssh, apache, mysql, etc).

Is rsync the right tool for the job? If so, which directories would I absolutely need to include in the backup?

closed as not constructive by Ward, kce, Sven, mdpc, MadHatter Jan 22 '13 at 7:14

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    You will find out when you do a trial recovery from backup. Even if you do what you think is a full backup, a trial recovery from that backup is still absolutely essential to validate the backup process. – David Schwartz Jan 22 '13 at 2:28

If you have to ask "What should I back up?", then the only answer I can give is:


Rsync might work for your situation, but it's missing many critical features found in real backup tools.

One thing to consider that would ease the bring-up of new machines is to use a configuration management product like Puppet or Chef. Using these to deploy your servers ensures that your systems' configurations are in a known-good and reproducible state.

  • I won't need to put the "image"/backup on more than one server in the future, so ease of the bring up process isn't a huge concern for me. @John suggested taking an image, which I considered, but wouldn't that mean I have to unmount the partition I'm imaging? Another possibility is to install Ubuntu from a live cd on the new machine, then copy the backup on top of that. – n0pe Jan 22 '13 at 2:22
  • @MaxMackie - check out rsnapshot. It's like rsync on steroids, and is much better as a backup tool. – EEAA Jan 22 '13 at 2:34

What EEAA said is absolutely correct but if you really want to use rsync I suggest you start by taking a full image of the hard drive. From there you could use rsync to backup changes you make, ensuring you include any and all directories which contain any configuration files. Depending on your system that may or may not mean just /etc.

With an image plus rsync you could restore the machine by applying the image and then copying back what you've saved through rsync. This is not as good as using proper backup tools but is an easy and reasonably effective alternative. Just be sure to take a new image whenever you change something significant other than just config files.

  • Yeah imaging was something I considered. However, I'm trying to avoid it because, as far as I can tell, I need to unmount the partition being imaged before actually making the image. Also, this image would be being backed up over a metered network, which makes rsync's delta function very beneficial. – n0pe Jan 22 '13 at 2:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.