vzdump
Backup Proxmox virtual machines and containers
TLDR
Dump a guest virtual machine into the default dump directory (usually /var/lib/vz/dump/), excluding snapshots
Back up the guest virtual machines with the IDs 101, 102, and 103
Dump a guest virtual machine using a specific mode
Back up all guest systems and send an notification email to the root and admin users
Use snapshot mode (no downtime required) and a non-default dump directory
Back up all guest virtual machines excluding the IDs 101 and 102
SYNOPSIS
vzdump [OPTIONS]
PARAMETERS
--dumpdir
Specifies the directory where backup files are stored. Defaults to the Proxmox VE local storage if not specified.
--storage
Specifies the storage where the backup is saved. Use this if you want to save to a specific storage, not just the local one.
--mode
Specifies the backup mode. Snapshot uses LVM snapshots or QEMU guest agent freeze, suspend suspends the VM during backup, and stop shuts down the VM before backup. Defaults to snapshot.
--compress
Specifies the compression algorithm. Available options are lzo, gzip, and zstd. Defaults to lzo.
--stdExclude
Adds standard exclude options.
--remove
Prunes old backups by keeping only the specified number of the most recent backups.
--quiet
Suppress output to standard output.
--lockwait
Wait time in seconds until a lock can be obtained. After the lock timeout, the job is aborted.
--mailnotification
Defines when email notifications are sent.
--prune-backups
Use retention policy to remove backups.
The numeric ID of the VM/LXC to backup. Multiple VMIDs can be specified to back up multiple guests in one go.
DESCRIPTION
vzdump is a command-line utility provided by Proxmox Virtual Environment (Proxmox VE) for backing up and restoring virtual machines (VMs) and containers (LXCs). It creates consistent snapshots of the virtual disk images and configuration files. vzdump supports different storage backends, including local storage, NFS, and Proxmox Backup Server, and offers options for compression, encryption, and scheduling backups. The tool aims to provide reliable and efficient backup solutions for virtualized environments, ensuring data integrity and minimizing downtime during disaster recovery.
It does not require the VMs or LXCs to be shut down. It uses a snapshot-based approach by utilizing either LVM (Logical Volume Manager) snapshots or qemu guest agent freezing to create consistent backups of running VMs. The created backups can be stored as tarballs, which can be used to restore the VM/LXC to its original state or to migrate it to another Proxmox VE node.
CAVEATS
Using the `stop` mode will result in downtime for the VM. LVM snapshots require sufficient free space on the volume group. If the VM has a very high disk write rate, a short snapshot interval might lead to reduced performance or even data loss.
EXIT STATUS
The command exits with status 0 on success, and >0 if an error occurred.
BACKUP FILE NAMING CONVENTION
Backup file names follow a specific pattern: `vzdump-
RESTORING BACKUPS
To restore a backup, use the `qmrestore` command for VMs and `pct restore` for containers. These commands are also part of the Proxmox VE suite.
HISTORY
vzdump was developed as part of the Proxmox VE project to provide a built-in backup solution for virtual machines and containers. Its development has been continuous, with ongoing improvements to performance, features, and storage backend support. The command's usage has grown with the increasing adoption of Proxmox VE in both small and large-scale virtualization environments, where it serves as a crucial tool for data protection and disaster recovery.