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 to ssh -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