virtnbdrestore - restore utility for libvirt
usage: virtnbdrestore [-h] [-a {dump,restore,verify}] -i
INPUT -o OUTPUT
- [-u UNTIL] [-s SEQUENCE] [-d DISK] [-n] [-f SOCKETFILE]
- [-r] [-c] [-D] [-C CONFIG_FILE] [-N NAME] [-B BUFFSIZE] [-A] [-U URI]
[--user USER] [--ssh-user SSH_USER] [--ssh-port SSH_PORT] [--password
PASSWORD] [-P NBD_PORT] [-I NBD_IP] [--tls] [--tls-cert TLS_CERT] [-L
LOGFILE] [--nocolor] [-v] [-V]
Restore virtual machine disks
- -a, --action
{dump,restore,verify}
- Action to perform: (default: restore)
- -i, --input
INPUT
- Directory including a backup set
- -o, --output
OUTPUT
- Restore target directory
- -u, --until
UNTIL
- Restore only until checkpoint, point in time restore.
- -s, --sequence
SEQUENCE
- Restore image based on specified backup files.
- -d, --disk
DISK
- Process only disk matching target dev name. (default: None)
- -n,
--noprogress
- Disable progress bar
- -f, --socketfile
SOCKETFILE
- Use specified file for NBD Server socket (default:
/var/tmp/virtnbdbackup.5079)
- -r, --raw
- Copy raw images as is during restore. (default: False)
- -c,
--adjust-config
- Adjust vm configuration during restore. (default: False)
- -D, --define
- Register/define VM after restore. (default: False)
- -C, --config-file
CONFIG_FILE
- Name of the vm config file used for restore. (default: vmconfig.xml)
- -N, --name
NAME
- Define restored domain with specified name
- -B, --buffsize
BUFFSIZE
- Buffer size to use during verify (default: 8192)
- -A,
--preallocate
- Preallocate restored qcow images. (default: False)
- -U, --uri URI
- Libvirt connection URI. (default: qemu:///session)
- --user USER
- User to authenticate against libvirtd. (default: None)
- --ssh-user
SSH_USER
- User to authenticate against remote sshd: used for remote copy of files.
(default: abi)
- --ssh-port
SSH_PORT
- Port to connect to remote sshd: used for remote copy of files. (default:
22)
- --password
PASSWORD
- Password to authenticate against libvirtd. (default: None)
- -P, --nbd-port
NBD_PORT
- Port used by remote NBD Service, should be unique for each started backup.
(default: 10809)
- -I, --nbd-ip
NBD_IP
- IP used to bind remote NBD service on (default: hostname returned by
libvirtd)
- --tls
- Enable and use TLS for NBD connection. (default: False)
- --tls-cert
TLS_CERT
- Path to TLS certificates used during offline backup and restore. (default:
/etc/pki/qemu/)
- # Dump backup metadata:
- virtnbdrestore -i /backup/ -o dump
- # Verify checksums for existing data files in backup:
- virtnbdrestore -i /backup/ -o verify
- # Complete restore with all disks:
- virtnbdrestore -i /backup/ -o /target
- # Complete restore, adjust config and redefine vm after restore:
- virtnbdrestore -cD -i /backup/ -o /target
- # Complete restore, adjust config and redefine vm with name 'foo':
- virtnbdrestore -cD --name foo -i /backup/ -o /target
- # Restore only disk 'vda':
- virtnbdrestore -i /backup/ -o /target -d vda
- # Point in time restore:
- virtnbdrestore -i /backup/ -o /target --until virtnbdbackup.2
- # Restore and process specific file sequence:
- virtnbdrestore -i /backup/ -o /target --sequence
vdb.full.data,vdb.inc.virtnbdbackup.1.data
- # Restore to remote system:
- virtnbdrestore -U qemu+ssh://root@remotehost/system --ssh-user root -i
/backup/ -o /remote_target