Qmrestore manual
From Proxmox VE
Introduction
qmrestore - restore KVM backups
Manual (man qmrestore)
- see the man page on your system to see options for the release of qmrestore on your system, as there may be changes. for instance qmrestore 1,1 dated 2011-09-12 includes:
--unique assign a unique random ethernet address
--repeat <number> repeat the restoration process with
VMID numbers incremented per run
vzdump: 1.2-5 (includes vzrestore and qmrestore)
qmrestore(1) Proxmox Documentation qmrestore(1)
NAME
qmrestore - restore QemuServer vzdump backups
SYNOPSIS
qmrestore [OPTIONS] <archive> <VMID>
--info read/verify archive and print relevant
information (test run)
--storage <STORAGE_ID> restore to storage <STORAGE_ID>
--prealloc never generate sparse files
DESCRIPTION
Restore the QemuServer vzdump backup <archive> to virtual machine
<VMID>. Volumes are allocated on the original storage if there is no
"--storage" specified.
SEE ALSO
vzdump(1) vzrestore(1)
1.1 2009-09-08 qmrestore(1)
Note: When the above man page refers to <STORAGE_ID>, this is not a path, but rather a 'Storage Name' as is listed in the web interface.
For example in a default PVE install (version 1.5.4627-3 at the time this was written), adding '--storage /var/lib/vz/images' to your qmrestore command would result in a 'does not exists' error. The correct syntax '--storage local' would restore to /var/lib/vz/images.
Usage Example
Since backups of VMs in the /var/lib/backups folder get overwritten on next backup by default , it is prudent to move critical and initial backups to another folder, say, archive here. For the example below, instead of the default local storage, we use another one. We can rename the backup to include the hostname or VM instance name (mykvm here) in it's name. We can decide to restore it to a new container id (107 here) as well.
cd /var/lib/vz/backups/archive qmrestore --storage LVM1VMDisks vzdump-qemu-103-mykvm-2011_11_08-13_09_01.tgz 107
The output will be something like:
INFO: restore QemuServer backup 'vzdump-qemu-103-mykvm-2011_11_08-13_09_01.tgz' using ID 107 INFO: extracting 'qemu-server.conf' from archive INFO: extracting 'vm-disk-ide0.qcow2' from archive INFO: Formatting '/storage/store001/vmdisks/images/107/vm-107-disk-1.qcow2', fmt=qcow2 size=32768 encryption=off cluster_size=0 INFO: new volume ID is 'LVM1VMDisks:107/vm-107-disk-1.qcow2' INFO: restore data to '/storage/store001/vmdisks/images/107/vm-107-disk-1.qcow2' (9370796032 bytes) INFO: 372+212934 records in INFO: 372+212934 records out INFO: 9370796032 bytes (9.4 GB) copied, 163.067 s, 57.5 MB/s INFO: restore QemuServer backup 'vzdump-qemu-103-mykvm-2011_11_08-13_09_01.tgz' successful
