vzdump(1)
NAME
vzdump - openvz backup and restore utility
SYNOPSIS
vzdump OPTIONS [--all | <VEID>]
--exclude VPSID exclude VPSID (assumes --all)
--exclude-path REGEX exclude certain files/directories. Standard
exclusions are disabled in this case. You
can use this option more than once to specify
multiple exclude paths
--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. You can use
this option more than once to specify multiple
receivers
--stop stop/start VPS if running
--suspend suspend/resume VPS when running
--snapshot use LVM snapshot when running
--restore FILENAME restore FILENAME
DESCRIPTION
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, but needs LVM2 and 500m free space on the
corresponding volume group to create the LVM snapshot)
FILES
- vzdump skips the following files by default
- /var/log/.+
/tmp/.+
/var/tmp/.+
/var/run/.+pid - You can overwrite those exclusions by manually specifying exclude
paths, for example: - > vzdump --exclude-path '/tmp/.+' --exclude-path '/var/tmp/.+' 777
- (only excludes tmp directories)
- OpenVZ configuration files are also stored inside the backup archive
(/etc/vzdump), and will be correctly restored with --restore
EXAMPLES
Simply dump VE 777 - no snapshot, just archive the VE private area and
configuration files to the default dump directory (usually
/var/lib/vz/dump/).
> vzdump 777
Use rsync and suspend/resume to create an snapshot (minimal downtime).
> vzdump --suspend 777
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 777
Restore above backup to VE 600
> vzdump --restore /space/backup/vzdump-777.tar 600
Backup all VESs excluding VE 101 and 102
> vzdump --suspend --exclude 101 --exclude 102
AUTHOR
Dietmar Maurer <dietmar@proxmox.com>
Many thanks to Proxmox Server Solutions (www.proxmox.com) for
sponsoring this work.
COPYRIGHT AND DISCLAIMER
Copyright (C) 2007 Proxmox Server Solutions GmbH
Copyright: vzdump is under GNU GPL, the GNU General Public License.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; version 2 dated June, 1991.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
- You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.