VIRTNBDRESTORE(1)
β¨ NAME β¨
virtnbdrestore β the libvirt restore utility, and honestly? she's that girl π
okay so quick vibe check: this is a User Commands page (section 1, iykyk), and it's all about putting your virtual machine disks back where they belong. no cap.
π¦ SYNOPSIS π¦
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]
[--compress] [-U URI] [--user USER] [--ssh-user SSH_USER]
[--ssh-port SSH_PORT] [--ssh-private-key SSH_PRIVATE_KEY]
[--password PASSWORD] [-P NBD_PORT] [-I NBD_IP] [--tls]
[--tls-cert TLS_CERT] [-L LOGFILE] [--nocolor] [-v] [-V]
πΈ DESCRIPTION πΈ
Restore virtual machine disks. π«Ά
that's literally the whole job, bestie. you hand her a backup set, you hand her a target, and she puts the disks back. absolutely iconic behaviour.
below is the full roster of everything you can tweak, so let's get into it, no skips, we read the whole thing β¨
π OPTIONS π
π options:
-h,--helpβ show this help message and exit π
π General options:
-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.685314) π-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) π¦--compressβ use compression driver during restore. (default:False) ποΈ
π¦ Remote Restore options:
-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)--ssh-private-key SSH_PRIVATE_KEYβ path to private key file for SSH authentication (equivalent tossh -i). (default:None) π--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/)
π§ Logging options:
-L,--logfile LOGFILEβ path to Logfile (default:/home/abi/virtnbdrestore.log) π--nocolorβ disable colored output (default:False) π
π Debug options:
-v,--verboseβ enable debug output π-V,--versionβ show version and exit
π« EXAMPLES π«
okay these are the actual receipts, copy them character for character bestie π«Ά
# 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
and that's the whole page, periodt π this was virtnbdrestore 2.49, dated July 2026 πΈ go restore something and be the main character of your own datacenter πβ¨
π¦ where this page comes from
- ubuntu stonking: virtnbdbackup 2.49-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms