Backing up OpenVZ virtual machines with vzdump

Last Updated on April 18, 2021 by admin

Vzdump is a perl script that makes live backups of OpenVZ virtual machines very easy. The following steps are for Debian Linux but vzdump can be used on all other linux distributions. Only the installation may vary.

Download and install vzdump from

cd /tmp
dpkg -i vzdump_1.1-2_all.deb

Create the backup directory

mkdir /home/backup

Create a backup of all virtual machines as compressed (tar.gz) archive and send a email report to the root user when finished.

vzdump --dumpdir /home/backup --suspend --compress --mailto root --all

vzdump can also be used to restore a backup.  Example: restore the backup of the virtual machine 101:

vzdump --restore /home/backup/vzdump-101.tgz 101

To restore the backup to a different virtual machine, you can specify a differnt target ID. E.g. restore the backup of vm 101 to the virtual machine with the ID 500:

vzdump --restore /home/backup/vzdump-101.tgz 500

Leave a Comment