I'm running Linux server with OpenVZ containers. I back up data with rdiff-backup in two steps (to minimalize downtime). First step is on live containter, and second step is on suspended container.

Is there a better way to back up OpenVZ containters?


This website lists the different ways of doing it. If you have LVM that is really the best. One thing I would make sure of is that if you are running any database apps, to do a database dump of all the databases before backing up the container (ie mysqldump).

  • Don't have LVM. :( I used to use vzdump but - it's processor intensive and using to much space (xdelta don't like big (>1GB) archive files).
    – miHost
    May 29 '09 at 12:42

Why not use vzmigrate between hardware nodes with options that keep the "image" stored on the source and destinations, also the online switch. If you do this often, the rsync will run very fast (less changes to synchronize). I'm doing this without LVM. I think the beauty of virtual servers is that you don't have to worry about filesystem level backups (applauds)! Of course you can do the vzmigrate stuff without the migration part.


I would also recommend LVM which I'm using to create snapshots which are they transferred using rsync to zfs (on Linux using zfs-fuse) to enable writable snapshots which I use for quick point-in-time recovery by starting new container over it.

If there is one concrete suggestion from my experience, I would suggest to design backup strategy based on your recovery requirements, and not on limits of current setup. Re-installing server with LVM is pain, but until we get better support from filesystems like btrfs, it's first step :-)


My personal opinion on virtual machines backup is that it should not exists unless you are a VPS provider. But if you are, running the VMs/containers on top of LVM and using snapshots as a source for backups might be the best idea. Of course for high availability you can use DRBD ( "raid1-over-network") or lvm on top of iscsi to provision storage from some reliable appliance.
Regarding the no-backups-for-VMs thing I prefer assuming that everything-VM is volatile and not worth saving. In my production environment I backup only the $Data residing inside the VM. In case a VM/container dies for some reason I use a golden image to re-instantiate it and repopulate it with the $Data from backups. At 200+ vmware and openvz and xen VMs backup for every one of them is not practical.
That being said, for a couple of our containers that we have to restore really fast in case something goes wrong ( nagios, racksheet inventory etc. ) we simply do rsync from / :)


Here's what I use: R1Soft (now called Idera Server Backup Enterprise).

Why? - Block level backups (copies only changes and extremely fast with zero downtime) - History, keeps multiple versions as you specify. Backup every 15min is attainable. - Reporting is awesome - Multi-point replication to on/off-site is great too

I don't work for them, I backup about 80 servers every day with it and it's never failed me. Yes, it costs money, but you get what you pay for.

  • Unfortunately requires two servers and don't support XFS.
    – t.mikael.d
    Mar 8 '13 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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