0

I am using virtualizor to manage 3 XEN VPS. Hardware node and each VPS run CentOS 5.x. My backup needs are as follows:

1) I need to be able to bare metal restore the entire hardware node, excluding the VPSes (which would be restored via #2 below)

2) I need to have a complete backup of each VPS, ideally a backup that can be deployed on any other host that uses Xen, if the need arises. Naturally, I would also need to use this backup to restore an entire VPS to an earlier state within the same host.

Which folders rSync needs to keep backed up in order to accomplish the above?

The rSync specialists aren't sure of it either.

Thanks

1 Answer 1

2

When you say "rSync" do you mean rsync as in http://rsync.samba.org/ ? If so then I don't see how you can achieve a guaranteed bare metal restore using rsync alone.

Firstly for your backup of your hardware node, this is going to be like backing up any machine. Most backup methods that involve an agent can't guarantee a consistent backup of files in use by the operating system and applications - think about data that will change between the start and end of the backup run.

There's a couple of ways to go. You could investigate snapshot technology such as that found in LVM, and backup the snapshot. At least this gives you a point-in-time backup though it still doesn't guarantee that data held in application memory will be backed up correctly.

Another way is to look into configuration management such that if you plugged in a bare metal box tomorrow, it could boot up and install your software and configuration and begin providing the correct services again in a short period of time with minimal human intervention. Then you only need to worry about backing up the data.

This latter route is the one I chose. I use puppet but really whatever modern configuration management software you choose should be able to do the job.

As for your virtual machines: again two ways you could go. They're getting their storage from somewhere so you can focus on backing that up. Mine use LVM LVs in the host so I can snapshot them in the host and move them elsewhere, then start them again. You could base a backup strategy around this, but you run into the same problems as above: data in running applications not guaranteed to be consistent in disk snapshot. I don't use it for backup, I only use it for moving things between hosts where there is no shared storage.

The other way to go is to again treat each VM like a separate host—which after all is the point of a VM anyway—and do what you do for real hosts. Again for me that's configuration management.

An idea I haven't explored is Xen's checkpoint features. You can pause a VM and save its memory state to disk. While it's paused you could take a disk snapshot. As far as I am aware if you put that disk backup onto the correct block devices and then restored the VM from its save point, it should spring back into life from that point.

That sounds pretty cool but it remains rather too adventurous for my backup needs.

1
  • yes, thats what I mean: rSync3. Thanks for the input, @grifferz.
    – Gaia
    Sep 30, 2011 at 14:51

You must log in to answer this question.

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