rsync only disk image

ale.ab

Renowned Member
Mar 31, 2015
30
2
73
Bergamo, Italy
Hi,
i have two proxmox server and i want keep sync my VM.
But there are on a datacenter without multicast support (no cluster).

i want one server for production, and one for backup.

my goal is keep sync the VM (more or less half hour before), so that the server production goes down for hardware failure i move ip of VM ond second server and start VM.

VM has a big disk (600 GB)
With vzdump, the time is 8 or 9 hours... (far from half an hour)

could this method help me?

vzdump all VM on the second server
restore VM on second server, but stopped
rsync (sparse) only image disk (qcow2) with second server

rsync sparse reduce time of transfer?

in case of failure first server, i can start VM on second server and move ip...

thank you in advance
 
Actually, zfs send/receive was pretty much built for this scenario. Rsync will be much to slow.
 
thank you.
but zfs is a filesystem right?
so i must create a partition ZFS in both server and rsync qcow2 image?

or for my case 2 proxmox server and 1 VM (600GB disk) is a best solution?

thank you for reply
 
I'm sure there are other ways, so, everyone, don't be afraid to chime in.
 
I'm sure there are other ways, so, everyone, don't be afraid to chime in.

Hi,
if you use rsync you must create an snapshot (lvm) first - so you can run the rsync on the snapshot, which wasn't changed during the sync time.
After syncing you must delete the snapshot.

But I would prefer an other way (like drbd).

Udo
 
Ok, thank you for replies...
but i have only two server proxmox (not NFS share ord dedicated drbd server).

my question is...
can i activate on proxmox server an folder/mount (drbd or ZFS) replication on second proxmox server?

i don't want cluster/HA or other automatism.
when first proxmox server crashes i want start only 1 VM (600GB disk) on second server.
snapshot is live, or almost :) 30-60 minutes before...

thank you
 
Zfs send/receive works like rsync, but it is much faster. If the main server goes down, you use zfs clone to move the snapshot to the right place, recreate the configuration of the vm, and start it up.


I wonder if I should make a wiki entry for zfs warm standby.
 
small question.... :)
if i install proxmox 3.4 on new server (fresh install) and format ZFS on the initial installer i have a benifit described before?

Thank you
 
I've used this before to make a one time copy of a VM and it worked well:
https://github.com/mpalmer/lvmsync

Would require some scripting to create an ongoing replication like you are seeking, implementation is up the to reader.
If you had a failure during the rsync run you would end up with partially updated content, using the snapshot-and-rollback feature should be sufficient to recover from such a situation.
 
thank you!!! :)
i check now!!! :D

edit:
i found you old post
http://forum.proxmox.com/threads/18...-storage-VM-to-another-node?p=94287#post94287

form my purposes is this correct?
Code:
lvcreate --snapshot -L600G -n vm-100-disk-snap /dev/lvmstorage/vm-100-disk
dd if=/dev/lvmstorage/vm-100-disk-snap bs=1M | pv -ptrb | ssh root@nodeB dd of=/dev/lvmstorage/vm-200-disk bs=1M
lvmsync /dev/lvmstorage/vm-100-disk-snap nodeB:/dev/lvmstorage/vm-200-disk

after i create a cron job with last line (lvmsync for a live backup), right?

thank you
 
Last edited:
Not sure if that command is correct or not, only commenting to point out a procedure that I think would work to accomplish your goal.

First create a snapshot, let's call this snapshot A.
Copy that snapshot to your destination ( not using lvmsync, just copy all of the data to the destination)

At each interval create another snapshot named B
Use lvmsync to copy changes made since snapshot A
Delete snapshot A
Rename B to A

If something fails you need to start the process from the beginning. Error handling is the tricky part.

Also, be prepared to deal with the aftermath of a partial lvmsync operation. That partial run would likely need rolled back before you could use the backup image.

I hope the above makes sense.

Lastly, don't rely on this method as your only backup.
 
I wonder if I should make a wiki entry for zfs warm standby.

We will release an tool what does all this automatically the next days.
so making a Wiki entry is not necessary.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!