Changes

Jump to: navigation, search

Backup of a running container with vzdump

13 bytes removed, 08:48, 2 June 2008
no level 1 headings, better formatting; VE->CT; category tags should not be in the middle
= Vzdump =Vzdump is a utility to make consistent snapshots of running OpenVZ VEscontainers. It basically creates a tar archive of the VE container's private area, which also includes the VE CT configuration files.
There are several ways to provide consistency:
- * Stop the VE 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.
--restore FILENAME restore FILENAME
== Examples ==Use a running container, for example install this: [[Proxmox Mail Gateway in VEcontainer]].
=== Backup ===
Simply dump CT 777 - no snapshot, just archive the container private area and configuration files to the default dump directory (usually <code>/vz/dump/</code>).
<pre> vzdump 777</pre>
Use rsync and suspend/resume to create a snapshot (minimal downtime).
<pre> vzdump --suspend 777</pre>
Backup all containers and send notification mails to root.
<pre> vzdump --suspend --all --mailto root</pre>
Use LVM2 to create snapshots (no downtime).
<pre> vzdump --dumpdir /space/backup --snapshot 777</pre>
Note that using LVM2 and vzdump to create snapshots requires 512Mb of free space in your VG as described [http://weblogs.amtex.nl/index.php?blog=2&title=using_vzdump_snapshot_to_backup_without_downtime&more=1&c=1&tb=1&pb=1 here].
=== Restore ==  Restore above backup to CT 600=
<pre>vzdump --restore /space/Restore the above backup/vzdump-777.tar to CT 600</pre>:
[[Category: HOWTO]] vzdump --restore /space/backup/vzdump-777.tar 600
== Bugs ==
vzdump will fail under Debian Etch in version 1.0-2 (tested) if it is invoked with parameter "--snapshot" and if the logical volume name contains a hyphen.
One possible workaround is to rename the logical volume in question thus it doesn't contain any hyphen.
A bug report was sent to proxmox on 02 June 2008.
 
[[Category: HOWTO]]

Navigation menu