Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Backup of a running container with vzdump

2,120 bytes added, 10:07, 23 March 2007
Initial post
= Vzdump =
Vzdump is an utility to make consistent snapshots of running OpenVZ VEs. It basically creates a tar archive of the VE private area, which also includes the VE configuration files.

There are several ways to provide consistency:

- Stop the VE 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.

== Download ==
Download vzdump rpm or deb packages from http://download.openvz.org/contrib/utils/vzdump/

For rpm based systems:
<pre>wget http://download.openvz.org/contrib/utils/vzdump/vzdump_0.3-1_all.deb</pre>

For Debian based systems:
<pre>wget http://download.openvz.org/contrib/utils/vzdump/vzdump-0.3-1.noarch.rpm</pre>

== Installation ==
For rpm based systems:
<pre>rpm -i vzdump-0.3-1.noarch.rpm</pre>

For Debian based systems:
<pre>dpkg -i vzdump_0.3-1_all.deb</pre>

== Synopsis ==

<pre>vzdump OPTIONS [--all â <VEID>]

--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 VPS if running

--suspend suspend/resume VPS when running

--snapshot use LVM snapshot when running

--restore FILENAME restore FILENAME
</pre>

= Examples =
== Backup ==

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

<pre>vzdump 777</pre>

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

<pre>vzdump --suspend 777</pre>

Backup all VEs 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>

== Restore ==

Restore above backup to VE 600

<pre>vzdump --restore /space/backup/vzdump-777.tar 600</pre>
31
edits