On an OVS I have a few windows machines.

I want to create a full backup their .img disk files, thats done, .img.gz. Than I want to incrementally backup their C:/ partition, but thats not working.

The backup media is a tape drive installed on a remote windows machine accessible by FTP.

With help from my previous post I came up with the following commands for the first run:

cd /backup/win-vm-1/
losetup /dev/loop9 win-vm-1.img
kpartx -av /dev/loop9
mount /dev/mapper/loop9p2 drive-C/ -o ro
# Creates a 20Gb file
tar -cSmf drive-C.0.tar --no-check-device -g drive-C.0.snapshot drive-C/
umount -d drive-C/
kpartx -dv /dev/loop9

For the incremental backups I tried the same script but with this changes:

cp drive-C.0.snapshot drive-C.1.snapshot
tar -cSmf drive-C.1.tar --no-check-device -g drive-C.1.snapshot drive-C/

But doing this results in a 8.5GB file.

The changes made on the .img between the full and incremental backup were:

  1. Boot machine
  2. Create two .png files in one folder
  3. Delete one .png file in another folder
  4. Shutdown

What am I doing wrong? Is there a better solution?

  • I didn't think it was possible to backup the images incrementally externally. From inside the VM I think you can. Do you know for sure if you can do it this way? I think you'd have to setup a scheduled task inside of the windows VM and do a incremental from in there. For Linux VMs you can use this method: serverfault.com/questions/58660/… – slm Jun 10 '13 at 20:10
  • I came across this solution: linux-kvm.org/wiki/images/b/b6/2011-forum-LiveBackup.pdf – slm Jun 10 '13 at 20:14
  • You didn't boot the vm while you had the fs mounted in the host did you? – psusi Jun 10 '13 at 20:19
  • @slm I got some of the ideas from here: forums.oracle.com/message/10941581 But I wont be doing hot backups just yet. – GxFlint Jun 10 '13 at 20:21
  • 1
    See what files are in the tar with tar -t. Double check some of them to see if they really did change. – psusi Jun 10 '13 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.