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.


VZDump can be obtained from Proxmox website.


vzdump can create backups in several ways. To get all available options, use:

# vzdump
usage: /usr/sbin/vzdump OPTIONS [--all | VPSID]

        --exclude VPSID         exclude VPSID (assumes --all)
        --exclude-path REGEX    exclude certain files/directories
        --stdexcludes           exclude temorary files and logs

        --compress              compress dump file (gzip)
        --dumpdir DIR           store resulting files in DIR
        --tmpdir DIR            store temporary files in DIR

        --mailto EMAIL          send notification mail to EMAIL.
        --quiet                 be quiet.
        --stop                  stop/start VPS if running
        --suspend               suspend/resume VPS when running
        --snapshot              use LVM snapshot when running
        --size MB               LVM snapshot size

        --node CID              only run on pve cluster node CID
        --lockwait MINUTES      maximal time to wait for the global lock
        --stopwait MINUTES      maximal time to wait until a VM is stopped
        --bwlimit KBPS          limit I/O bandwidth; KBytes per second

        --restore FILENAME      restore FILENAME

Special notes on LVM based deployments

vzdump is able to backup the running containers with 0 downtime once using lvm snapshots capabilities. Use: --suspend option to enable the use of the lvm snapshots.

Info (!) Warrning: to be able to use --suspend option, you should have the --dumpdir argument pointing to a location different from the current LVM VG. Also, you should leave at least 512Mb (1G will surely be fine) of free space inside the containers LVM VG. Otherwise you won't be able to get --suspend for backups. Here is an example of an OpenVZ partitioning under Ubuntu 8.04.3:

OpenVZ/VZDump (last edited 2009-11-09 13:23:21 by sushkov)