VIRTNBDRESTORE(1)

NAME
virtnbdrestore - restore utility for libvirt

DESCRIPTION
usage: virtnbdrestore [-h] [-a {dump,restore}] -i INPUT -o OUTPUT [-u UNTIL]

[-s SEQUENCE] [-d DISK] [-n] [-f SOCKETFILE] [-r] [-c]
    [-D] [-N NAME] [-U URI] [--user USER] [--ssh-user SSH_USER] [--password PASSWORD] [-P NBD_PORT] [-I NBD_IP] [--tls] [--tls-cert TLS_CERT] [-L LOGFILE] [-v] [-V]

Restore virtual machine disks

  optional arguments:

-h, --help
    show this help message and exit

  General options:

-a {dump,restore}, --action {dump,restore}
    Action to perform: (default: restore)

-i INPUT, --input INPUT
    Directory including a backup set

-o OUTPUT, --output OUTPUT
    Restore target directory

-u UNTIL, --until UNTIL
    Restore only until checkpoint, point in time restore.

-s SEQUENCE, --sequence SEQUENCE
    Restore image based on specified backup files.

-d DISK, --disk DISK
    Process only disk matching target dev name. (default: None)

-n, --noprogress
    Disable progress bar

-f SOCKETFILE, --socketfile SOCKETFILE
    Use specified file for NBD Server socket (default: /var/tmp/virtnbdbackup.5136)

-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)

-N NAME, --name NAME
    Define restored domain with specified name

  Remote Restore options:

-U URI, --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)

--password PASSWORD
    Password to authenticate against libvirtd. (default: None)

-P NBD_PORT, --nbd-port NBD_PORT
    Port used by remote NDB Service, should be unique for each started backup. (default: 10809)

-I NBD_IP, --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 LOGFILE
    Path to Logfile (default: /home/abi/virtnbdrestore.log)

  Debug options:

-v, --verbose
    Enable debug output

-V, --version
    Show version and exit

EXAMPLES

    # Dump backup metadata:

    virtnbdrestore -i /backup/ -o dump

    # 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