How to restore KVM from backup?

netbone

Member
Feb 5, 2009
93
0
6
How can I restore the whole KVM from these files:

-rw-r--r-- 1 root root 802 Jan 26 03:41 vzdump-qemu-182-2010_01_26-02_45_45.log
-rw-r--r-- 1 root root 10343617547 Jan 26 03:41 vzdump-qemu-182-2010_01_26-02_45_45.tgz
-rw-r--r-- 1 root root 10298998784 Jan 27 03:42 vzdump-qemu-182-2010_01_27-02_46_59.dat
drwxr-xr-x 2 root root 4096 Jan 27 02:47 vzdump-qemu-182-2010_01_27-02_46_59.tmp
-rw-r--r-- 1 root root 528 Jan 28 02:45 vzdump-qemu-182-2010_01_28-02_45_53.log
-rw-r--r-- 1 root root 528 Jan 29 02:46 vzdump-qemu-182-2010_01_29-02_46_17.log
-rw-r--r-- 1 root root 528 Jan 30 02:45 vzdump-qemu-182-2010_01_30-02_45_48.log
-rw-r--r-- 1 root root 528 Jan 31 02:46 vzdump-qemu-182-2010_01_31-02_46_18.log
-rw-r--r-- 1 root root 528 Feb 1 02:45 vzdump-qemu-182-2010_02_01-02_45_49.log
-rw-r--r-- 1 root root 528 Feb 2 02:45 vzdump-qemu-182-2010_02_02-02_45_12.log

What file must I use for restore? All? Only one? Which one?
 
thank you. yes. i need to use these old backups cause i lost my nfs server (other forum thread). it was impossible to restore. so now i try to restore my w2008 vm to the point where the engine has not used the nfs server. this should allow me to boot the w2008 vm. the existing w2008 didn't boot without the nfs server - so i hope this is a good way. do i need to delete the vm I want to restore before the restore process is started?
 
Now I've tried to delete the VM which want to access the missing NFS - but I can't delete. The system asks for "really delete" - I confirm ... but nothing happens. Should I simply start restore with command described before?
 
Now I've tried to delete the VM which want to access the missing NFS - but I can't delete. The system asks for "really delete" - I confirm ... but nothing happens. Should I simply start restore with command described before?

Can't you simply edit the VM config?

# vi /etc/qemu-server/<vmid>.conf

and remove the line with the nfs storage?
 
I have already removed the hdd which has pointed to the NFS, but the VM still can't be deleted or started ...
 
When I try to do it manually I get:

PHP:
cluster175:/backup# qm start 182
VM is locked (backup)
cluster175:/backup#
 
If someone uses the search inside forum I complete these thread with the full restore command:

PHP:
cluster175:/backup# qm unlock 182
cluster175:/backup# vzdump-qemu-182-2010_01_26-02_45_45.tgz
-bash: vzdump-qemu-182-2010_01_26-02_45_45.tgz: command not found
cluster175:/backup# qmrestore vzdump-qemu-182-2010_01_26-02_45_45.tgz 982
INFO: restore QemuServer backup 'vzdump-qemu-182-2010_01_26-02_45_45.tgz' using ID 982
INFO: extracting 'qemu-server.conf' from archive
INFO: extracting 'vm-disk-ide0.qcow2' from archive
INFO: Formatting '/var/lib/vz/images/982/vm-982-disk-1.qcow2', fmt=qcow2 size=32768 encryption=off cluster_size=0
INFO: new volume ID is 'local:982/vm-982-disk-1.qcow2'
INFO: restore data to '/var/lib/vz/images/982/vm-982-disk-1.qcow2' (33893531648 bytes)