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]
Common Options:
vzdump --compress {gzip|lzo|zstd|no} --mode {snapshot|suspend|stop} --storage
PARAMETERS
VMID
The ID of the virtual machine or container to back up.
all
Back up all virtual machines and containers on the node.
--compress
Specifies the compression algorithm for the backup file. Choosing 'no' disables compression.
--mode
Defines how the guest is handled during backup.
snapshot: Attempts a live backup using storage snapshots (recommended for minimal downtime).
suspend: Suspends the guest during backup.
stop: Stops the guest completely during backup (ensures data consistency but causes downtime).
--storage
Specifies the target backup storage ID where the backup file will be saved. This must be a storage configured in Proxmox.
--node
Targets a specific node in a cluster when running vzdump from another node. Useful for centralized backup management.
--dumpdir
Specifies an alternative local directory to store the backup, overriding the default storage path.
--exclude-vmid
Exclude specific VMs or CTs when using the 'all' keyword to back up all guests.
--mailto
Send email notifications on backup completion or failure to the specified address.
--prune-backups
Defines the backup retention policy. Examples: keep-last=N (keep last N backups), keep-hourly=N, keep-daily=N, etc.
--format
Output backup format.
vma: Proxmox Virtual Machine Archive (default and recommended for KVM VMs).
tar: Standard tar archive (often used for LXC containers).
raw: Raw disk image.
--quiet
Suppress verbose output, showing only critical messages.
--force
Force backup even if issues are detected, such as a dirty snapshot state.
DESCRIPTION
vzdump is a powerful utility within the Proxmox Virtual Environment (PVE) designed for creating backups of virtual machines (KVM) and containers (LXC). It facilitates consistent and reliable snapshots of running guests, allowing for disaster recovery, migration, or archiving. Key features include live backup capabilities using LVM or ZFS snapshots, support for multiple backup formats (tar, vma, raw), and the ability to compress and encrypt backups. It can back up individual VMs/CTs or all of them simultaneously, storing them locally or on configured backup storages. This command is fundamental for maintaining data integrity and business continuity in a Proxmox cluster.
CAVEATS
vzdump requires sufficient disk space on the target storage for the backup file. Live backups (snapshot mode) depend on the underlying storage technology (LVM, ZFS, or others with snapshot capabilities) supporting snapshots; otherwise, 'stop' or 'suspend' mode might be necessary, causing guest downtime. Backing up large VMs can be resource-intensive, potentially impacting performance on the Proxmox host during the process. Backups are specific to Proxmox VE and typically restored within the same environment using qmrestore or pctrestore. Permissions and Proxmox storage configurations must be correctly set up.
BACKUP STRATEGY CONSIDERATIONS
When using vzdump, it's crucial to implement a robust backup strategy. This includes regularly testing restores to ensure backup integrity, storing backups off-site or on redundant storage, and leveraging the --prune-backups option for automatic retention management. Consider running backups during off-peak hours to minimize performance impact on production systems.
RESTORING BACKUPS
While vzdump is used to create the backups, qmrestore and pctrestore are the respective commands used to restore KVM virtual machines and LXC containers from these backup archives. Ensure you have sufficient disk space and resources on the target node for successful restoration.
HISTORY
vzdump is an integral part of the Proxmox Virtual Environment (PVE), an open-source server virtualization management solution based on Debian Linux. It has been a core component since the early versions of Proxmox VE, evolving alongside its storage and virtualization technologies (KVM, LXC). Its development has focused on robust live backup capabilities, various storage backend integrations, and flexible retention policies, making it a critical tool for Proxmox administrators to ensure data safety and business continuity.
SEE ALSO
qm(1): Proxmox KVM virtual machine manager., pct(1): Proxmox LXC container manager., pvesm(1): Proxmox storage management utility., qmrestore(1): Restore KVM VM backups created by vzdump., pctrestore(1): Restore LXC container backups created by vzdump., rsync(1): A fast, versatile file-copying and synchronization tool, useful for transferring vzdump archives., tar(1): The GNU version of the tar archiving utility, underlying one of vzdump's formats.