Web Hosting Talk







View Full Version : How to backup VE from Hardware Node


eukvps
06-12-2007, 05:47 AM
vzdump is an utility provided by OpenVZ to backup all VE running on node. It basically creates a tar archive of the VE private area, which also includes the VE configuration files.

There are basic 3 ways to backup VE :

- Stop the VE during backup – VE is stopped till entire VE is backup but it takes too long causing long downtime so not recommended during peak days.

- Use rsync and suspend/resume – this is another method but it also suspends VE during backup but it only advantage is downtime is very low.

- Use LVM2 – this method do not need VE to be stopped during backup so no downtime.

vzdump stores the backup on the disk in a single file.

Synopsis

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

Command to Backup :

Simply dump VE 110 – file will be stored in default dump directory /vz/dump/.

vzdump 110

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

Backup all VEs and send notification mails to root.
vzdump --suspend --all --mailto root

Use LVM2 to create snapshots (no downtime).
vzdump --dumpdir /space/backup --snapshot 110

Restore

Restore above backup to VE 110
vzdump --restore /space/backup/vzdump-110.tar 110