0

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?

1
  • 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. Jan 22, 2013 at 2:28

2 Answers 2

4

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

Everything.

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.

2
  • 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.
    – nopcorn
    Jan 22, 2013 at 2:22
  • @MaxMackie - check out rsnapshot. It's like rsync on steroids, and is much better as a backup tool.
    – EEAA
    Jan 22, 2013 at 2:34
2

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.

1
  • 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.
    – nopcorn
    Jan 22, 2013 at 2:23

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