vzdump is an utility to make consistent snapshots of running virtual
machines (VMs). It basically creates an archive of the VM private area,
which also includes the VM configuration files. vzdump currently
supports OpenVZ and QemuServer VMs.
There are several ways to provide consistency (option C<mode>):
=over 2
=item C<stop> mode
Stop the VM during backup. This results in a very long downtime.
=item C<suspend> mode
For OpenVZ, this mode uses rsync to copy the VM to a temporary
location (see option --tmpdir). Then the VM is suspended and a second
rsync copies changed files. After that, the VM is started (resume)
again. This results in a minimal downtime, but needs additional space
to hold the VM copy.
For QemuServer, this mode work like C<stop> mode, but uses
suspend/resume instead of stop/start.
=item C<snapshot> mode
This mode uses LVM2 snapshots. There is no downtime, but snapshot mode
needs LVM2 and some free space on the corresponding volume group to
create the LVM snapshot.
=back
=head1 BACKUP FILE NAMES
Newer version of vzdump encodes the virtual machine type and the
backup time into the filename, for example
vzdump-openvz-105-2009_10_09-11_04_43.tar
That way it is possible to store several backup into the same
directory. The parameter C<maxfiles> can be used to specify the maximal
number of backups to keep.
=head1 RESTORE
The resulting archive files can be restored with the following programs.
=over 1
=item vzrestore: OpenVZ restore utility
=item qmrestore: QemuServer restore utility
=back
For details see the corresponding manual pages.
=head1 CONFIGURATION
Global configuration is stored in /etc/vzdump.conf.
tmpdir: DIR
dumpdir: DIR
storage: STORAGE_ID
mode: snapshot|suspend|stop
bwlimit: KBPS
ionize: PRI
lockwait: MINUTES
stopwait: MINUTES
size: MB
maxfiles: N
script: FILENAME
exclude-path: PATHLIST
=head1 HOOK SCRIPT
You can specify a hook script with option C<--script>. This script is called at various phases of the backup process, with parameters accordingly set. You can find an example in the documentation directory (C<vzdump-hook-script.pl>).
=head1 EXCLUSIONS (OpenVZ only)
vzdump skips the following files wit option --stdexcludes
/var/log/.+
/tmp/.+
/var/tmp/.+
/var/run/.+pid
You can manually specify exclude paths, for example:
vzdump is an utility to make consistent snapshots of running virtual
machines (VMs). It basically creates an archive of the VM private area,
which also includes the VM configuration files. vzdump currently
supports OpenVZ and QemuServer VMs.
There are several ways to provide consistency (option C<mode>):
=over 2
=item C<stop> mode
Stop the VM during backup. This results in a very long downtime.
=item C<suspend> mode
For OpenVZ, this mode uses rsync to copy the VM to a temporary
location (see option --tmpdir). Then the VM is suspended and a second
rsync copies changed files. After that, the VM is started (resume)
again. This results in a minimal downtime, but needs additional space
to hold the VM copy.
For QemuServer, this mode work like C<stop> mode, but uses
suspend/resume instead of stop/start.
=item C<snapshot> mode
This mode uses LVM2 snapshots. There is no downtime, but snapshot mode
needs LVM2 and some free space on the corresponding volume group to
create the LVM snapshot.
=back
=head1 BACKUP FILE NAMES
Newer version of vzdump encodes the virtual machine type and the
backup time into the filename, for example
vzdump-openvz-105-2009_10_09-11_04_43.tar
That way it is possible to store several backup into the same
directory. The parameter C<maxfiles> can be used to specify the maximal
number of backups to keep.
=head1 RESTORE
The resulting archive files can be restored with the following programs.
=over 1
=item vzrestore: OpenVZ restore utility
=item qmrestore: QemuServer restore utility
=back
For details see the corresponding manual pages.
=head1 CONFIGURATION
Global configuration is stored in /etc/vzdump.conf.
tmpdir: DIR
dumpdir: DIR
storage: STORAGE_ID
mode: snapshot|suspend|stop
bwlimit: KBPS
ionize: PRI
lockwait: MINUTES
stopwait: MINUTES
size: MB
maxfiles: N
script: FILENAME
exclude-path: PATHLIST
=head1 HOOK SCRIPT
You can specify a hook script with option C<--script>. This script is called at various phases of the backup process, with parameters accordingly set. You can find an example in the documentation directory (C<vzdump-hook-script.pl>).
=head1 EXCLUSIONS (OpenVZ only)
vzdump skips the following files wit option --stdexcludes
/var/log/.+
/tmp/.+
/var/tmp/.+
/var/run/.+pid
You can manually specify exclude paths, for example: