LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Hot Backup KVM machine (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/hot-backup-kvm-machine-908244/)

yeayu 10-14-2011 06:33 PM

Hot Backup KVM machine
 
Hi everybody,
I have a web server; It's working like kvm machine under Proxmox.
I would like to perform a hot backup, but i don't know how to do it. I have been using vzdump command to create backups, but always the machine is shutting down, and that it's not possible.. :s
I was looking for information about that, but I didn't found anything useful.


Also, I would like to know if I can convert that kvm virtual machine to open-vz. If it's yes, how i have to do it.

I hope you could help me; Thank you for your time.

Regards, Jesus

jefro 10-15-2011 03:22 PM

Do you have lvm?

"
stop: Stop the VE during backup (very long downtime)
suspend: Use suspend/resume (minimal downtime with OpenVZ, long downtime with KVM VMs)
snapshot: Use LVM2 (no downtime, online) "

http://pve.proxmox.com/wiki/Backup_-...Live_Migration

dyasny 10-15-2011 03:50 PM

backup is not only about copying the data on the disk aside, it's also about quiescing the VM, before you back up the disk image, otherwise the in-flight data will be lost, and you migh even get image corruption on the restored VM. If you use caching at the qemu level, this might be even more severe.

So to be on the safe side, use the guest Os for backups, treat the VM as if it is a physical machine

yeayu 10-16-2011 05:23 AM

Quote:

Originally Posted by jefro (Post 4499356)
Do you have lvm?

Yes, I do.
In fact, I was trying to do a snapshot using vzdump http://pve.proxmox.com/wiki/LVM2, but the machine was suspended itself again...


server-proxmox:/var/lib/vz# vzdump --snapshot 106
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "es_ES.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
INFO: starting new backup job: vzdump --snapshot 106
INFO: Starting Backup of VM 106 (qemu)
INFO: running
INFO: status = running
INFO: mode failure - unable to dump into snapshot (use option --dumpdir)
INFO: trying 'suspend' mode instead
INFO: backup mode: suspend

INFO: ionice priority: 7
INFO: suspend vm
INFO: creating archive '/var/lib/vz/dump/vzdump-qemu-106-2011_10_16-12_03_38.tar'
INFO: adding '/var/lib/vz/dump/vzdump-qemu-106-2011_10_16-12_03_38.tmp/qemu-server.conf' to archive ('qemu-server.conf')
INFO: adding '/var/lib/vz/images/106/vm-106-disk-1.raw' to archive ('vm-disk-scsi0.raw')


What do I wrong?
Is there another way to do a backup/snapshot using lvm2?

jefro 10-16-2011 03:50 PM

http://wiki.openvz.org/Backup_of_a_r...er_with_vzdump

yeayu 10-16-2011 04:33 PM

Quote:

Originally Posted by jefro (Post 4500024)

I have read already that link, but i keep having the same problem.
If i use vzdump, the machine is suspend itself like i explained above..

jefro 10-17-2011 07:13 PM

Then maybe some other deal like acpi or maybe temps or not enough ram?

yeayu 10-18-2011 05:53 AM

Quote:

Originally Posted by jefro (Post 4500949)
Then maybe some other deal like acpi or maybe temps or not enough ram?

I'm not sure why it's happening.
How could i check if there is any problem with acpi or temps? About ram...umm I think that is not my real problem, the proxmox server have 8Gb installed and I just use 3Gb to my kvm guest

jefro 10-18-2011 02:52 PM

Maybe /var logs to start.

run top when you attempt this.

yeayu 10-19-2011 03:59 AM

Quote:

Originally Posted by jefro (Post 4501759)
Maybe /var logs to start.

run top when you attempt this.

I would like do that but I can't, because is a production mail server.. so each time I try to create a KVM backup, that server suspend itself. Service off=BIG PROBLEM
May be I could try it one time, but not any more...
:s

I'm thinking to restore a old backup and try it, but I don't know how to change ip address, ram value and so on (using command line) before turning on to avoid conflict with the other one.
I got it, I deleted NIC device from proxmox interface. Hence i have a copy running which one i will be able to test whatever you talked.

i will keep notifying my progress

yeayu 10-20-2011 02:36 PM

I need to know how i have to configure my restore backup guest to startup with a different ip address, because if I just turn it on, there will be a conflict ip problem (it's a copy). Few days ago, I deleted NIC card from proxmox control panel and turned it on. I can add other NIC card but i need to configure through command line.
I found some commands:
qemu-ifup but i don't understand very well how i have to do it... :s

I keep looking for more information

Thanks for your time


All times are GMT -5. The time now is 01:53 PM.