S
senorsmile
Guest
I have done a little testing with a particular backup procedure and haven't had any problems, but I would like to get input from others.
I have a two node proxmox cluster currently running on 1.5. I have each server running with drbd primaryrimary with lvm2 for the vm disks. I have all kvm guests. The most important vm running is running windows server 2008 with microsoft sql. I have made a few tests backing up like this:
take snapshot, use kpartx to recognize partitions in the snapshotted disk and mount it using -o force since the ntfs disk wasn't cleanly shut down.
I then do an rsync excluding the hiberfil.sys and pagefile.sys files
I then umount the snapshot, remove the kpartx bindings and remove the snapshot.
This has seemed to work so far. If I boot this backed up partition in a new vm it boots and goes through chkdsk etc. All data SEEMS to be intact. The real question is: does using rsync transfer the files correctly and will this ever damage the sql databases such that they would be unusable?
The reason I don't just take a daily backup is that ideally I need this backup to by offsite. So, mounting the remote image and simply syncing any changes between the two disks would take much less bandwidth. Unless, of course, there is any way to simply sync the two partitions at the block level using some sort of rsync(i.e. only changed blocks) type program.
Any thoughts?
I have a two node proxmox cluster currently running on 1.5. I have each server running with drbd primaryrimary with lvm2 for the vm disks. I have all kvm guests. The most important vm running is running windows server 2008 with microsoft sql. I have made a few tests backing up like this:
take snapshot, use kpartx to recognize partitions in the snapshotted disk and mount it using -o force since the ntfs disk wasn't cleanly shut down.
Code:
lvcreate -L 10G -s -n eec_snapshot /dev/drbdvg/vm-103-disk-1 && \
kpartx -av /dev/drbdvg/eec_snapshot && \
ntfs-3g /dev/mapper/drbdvg-eec_snapshot1 /mnt/eec_snapshot/ -o force
I then do an rsync excluding the hiberfil.sys and pagefile.sys files
Code:
rsync \
--delete \
--progress \
-azvv \
--partial \
--stats \
--exclude="hiberfil.sys" \
--exclude="pagefile.sys" \
/mnt/eec_snapshot/ \
/mnt/windows/backup/vms/eec_fxserver/
I then umount the snapshot, remove the kpartx bindings and remove the snapshot.
Code:
umount /mnt/eec_snapshot/
kpartx -d /dev/mapper/drbdvg-eec_snapshot
lvremove --force /dev/mapper/drbdvg-eec_snapshot
This has seemed to work so far. If I boot this backed up partition in a new vm it boots and goes through chkdsk etc. All data SEEMS to be intact. The real question is: does using rsync transfer the files correctly and will this ever damage the sql databases such that they would be unusable?
The reason I don't just take a daily backup is that ideally I need this backup to by offsite. So, mounting the remote image and simply syncing any changes between the two disks would take much less bandwidth. Unless, of course, there is any way to simply sync the two partitions at the block level using some sort of rsync(i.e. only changed blocks) type program.
Any thoughts?