- Ssh into the Proxmox server as root.
- Run "vzdump" with desired VMID.
- Run "qmrestore" with unused VMID. Your dump file should be located in /var/lib/vz/dump.
$vzdump 101
$qmrestore /var/lib/vz/dump/vzdump-qemu-101-2011_01_10-11_13_30.tar 102
I tested this with a Ubuntu server 10.10 VM. From the Proxmox console I deleted the network device and recreated it to be sure it had a unique MAC address (not sure if that was necessary). I started the new VM, logged in, and changed the hostname and some values for the apache server.
**UPDATE (02/09/2011)**
I noticed that when running the this command I would see:
**UPDATE (02/09/2011)**
I noticed that when running the this command I would see:
INFO: mode failure - unable to dump into snapshot (use option --dumpdir)After some intrepid googling I discovered this was because the dump was being created on the same lvm group vzdump had to suspend the vm to do the backup. To avoid this (since I was backing up a live webserver) I mounted a windows share (on a domain) and pointed the dump to there.
- Mount the windows share to the /mnt/share directory (be sure that directory exists)
- Run vzdump with the --dumpdir option
$mount -t smbfs //server/share /mnt/share -o username=domainuser
$vzdump --dumpdir /mnt/share/dumps 101
No comments:
Post a Comment