VIRTNBDBACKUP(1) User Commands VIRTNBDBACKUP(1)

virtnbdbackup - backup utility for libvirt

usage: virtnbdbackup [-h] -d DOMAIN [-l {copy,full,inc,diff,auto}]

[-t {stream,raw}] [-r] -o OUTPUT [-C CHECKPOINTDIR]
[-S SCRATCHDIR] [-i INCLUDE] [-x EXCLUDE] [-f SOCKETFILE] [-n] [-z [COMPRESS]] [-w WORKER] [-F FREEZE_MOUNTPOINT] [-e] [-T THRESHOLD] [-U URI] [--user USER] [--ssh-user SSH_USER] [--password PASSWORD] [-P NBD_PORT] [-I NBD_IP] [--tls] [--tls-cert TLS_CERT] [-L] [--quiet] [--nocolor] [-q] [-s] [-k] [-p] [-v] [-V]

Backup libvirt/qemu virtual machines

show this help message and exit

Domain to backup
Backup level. (default: copy)
Output type: stream or raw. (default: stream)
Include full provisioned disk images in backup. (default: False)
Output target directory
Persistent libvirt checkpoint storage directory
Target dir for temporary scratch file. (default: /var/tmp)
Backup only disk with target dev name (-i vda)
Exclude disk(s) with target dev name (-x vda,vdb)
Use specified file for NBD Server socket (default: /var/tmp/virtnbdbackup.5688)
Disable progress bar
Compress with lz4 compression level. (default: False)
Amount of concurrent workers used to backup multiple disks. (default: amount of disks)
If qemu agent available, freeze only filesystems on specified mountpoints within virtual machine (default: all)
Change exit code if warnings occur during backup operation. (default: False)
Execute backup only if threshold is reached.

Libvirt connection URI. (default: qemu:///session)
User to authenticate against libvirtd. (default: None)
User to authenticate against remote sshd: used for remote copy of files. (default: abi)
Password to authenticate against libvirtd. (default: None)
Port used by remote NBD Service, should be unique for each started backup. (default: 10809)
IP used to bind remote NBD service on (default: hostname returned by libvirtd)
Enable and use TLS for NBD connection. (default: False)
Path to TLS certificates used during offline backup and restore. (default: /etc/pki/qemu/)

Additionally send log messages to syslog (default: False)
Disable logging to stderr (default: False)
Disable colored output (default: False)

Use Qemu tools to query extents.
Only initialize backup job via libvirt, do not backup any data
Kill any running block job
Quit after printing estimated checkpoint size.
Enable debug output
Show version and exit

# full backup of domain 'webvm' with all attached disks:
virtnbdbackup -d webvm -l full -o /backup/
# incremental backup:
virtnbdbackup -d webvm -l inc -o /backup/
# differential backup:
virtnbdbackup -d webvm -l diff -o /backup/
# full backup, exclude disk 'vda':
virtnbdbackup -d webvm -l full -x vda -o /backup/
# full backup, backup only disk 'vdb':
virtnbdbackup -d webvm -l full -i vdb -o /backup/
# full backup, compression enabled:
virtnbdbackup -d webvm -l full -z -o /backup/
# full backup, create archive:
virtnbdbackup -d webvm -l full -o - > backup.zip
# full backup of vm operating on remote libvirtd:
virtnbdbackup -U qemu+ssh://root@remotehost/system --ssh-user root -d webvm -l full -o /backup/
February 2024 virtnbdbackup 2.0