Rsync

SamTzu

Renowned Member
Mar 27, 2009
529
17
83
Helsinki, Finland
sami.mattila.eu
Hi, sometimes we have time issues with large container migrations.
Some of the mail server containers are quite large and we have tried to save time when migrating between different storage devices.
Here is how we do it.

We take a snap-shot backup of the mail server.
We restore that snap-shot to a another-server/another-storage-device.
Then we use rsync to sync the old/live container with the new/stopped container.
Even with fast networks and storage devices this can take some time.
I have noticed Proxmox uses this rsync command...

/usr/bin/rsync -aHAX --delete --numeric-ids --sparse /var/lib/vz/private/101 root@10.10.10.10:/var/lib/vz/private

But when we use that command to make the last sync before stopping the old and starting the new container - sometimes odd things happen with MySQL servers.

What do you suggest is the best rsync command in these cases?
 
Hi,

wouldn't be better if you create master/slave for MySQL - every transaction is mirrored to backup/slave server?
 
Hi,

wouldn't be better if you create master/slave for MySQL - every transaction is mirrored to backup/slave server?

In some cases yes. But this is about the size of the date/storage and migration speed not about MySQL although that is also an issue.
Most fast storage is on SAN's while most large storage is on NAS's.
We are naming the Storage devices accordingly in Proxmox and moving "quickly" from one to another is often painful.
And then there is the question of moving servers between different clusters.
 
Last edited: