Praji’s Weblog

Welcome to praji’s world

Backup of a running container with vzdump

with one comment

Vzdump is a utility to make consistent snapshots of running OpenVZ containers. It basically creates a tar archive of the container’s private area, which also includes the CT configuration files.

There are several ways to provide consistency:

  • Stop the CT during backup (very long downtime)
  • Use rsync and suspend/resume (minimal downtime)
  • Use LVM2 (no downtime)

Vzdump stores the backup on the disk in a single file. This file should go to a tape backup for archiving.

if (window.showTocToggle) { var tocShowText = “show”; var tocHideText = “hide”; showTocToggle(); }


Download vzdump rpm or deb packages from or for newest version, check

For rpm based systems:


For Debian based systems:



For rpm based systems:

rpm -i vzdump-1.0-2.noarch.rpm

For Debian based systems:

dpkg -i vzdump_1.0-2_all.deb


vzdump OPTIONS [--all | <CTID>]
      --compress              compress dump file (gzip)
      --dumpdir DIR           store resulting files in DIR
      --xdelta                create a differential backup using xdelta
      --mailto EMAIL          send notification mail to EMAIL
      --stop                  stop/start container if running
      --suspend               suspend/resume container when running
      --snapshot              use LVM snapshot when running
      --restore FILENAME      restore FILENAME


Use a running container, for example install this: Proxmox Mail Gateway in container.


Simply dump CT 777 — no snapshot, just archive the container private area and configuration files to the default dump directory (usually /vz/dump/).

vzdump 777

Use rsync and suspend/resume to create a snapshot (minimal downtime).

vzdump --suspend 777

Backup all containers and send notification mails to root.

vzdump --suspend --all --mailto root

Use LVM2 to create snapshots (no downtime).

vzdump --dumpdir /space/backup --snapshot 777

Note that using LVM2 and vzdump to create snapshots requires 512Mb of free space in your VG as described here.


Restore the above backup to CT 600:

vzdump --restore /space/backup/vzdump-777.tar 600

Written by praji

September 11, 2008 at 8:37 am

Posted in Uncategorized

One Response

Subscribe to comments with RSS.

  1. Hello webmaster
    I would like to share with you a link to your site
    write me here


    March 3, 2009 at 2:44 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: