Saturday, January 29, 2011

Most effective way to incrementally backup vmware player images with rsync

I have a vmware player on Ubuntu 9.04 which works well with an XP in a virtual machine.

Now I want to have a nightly backup of this vmware instance so I thought I just use rsync to keep them updated. It appears that rsync thinks almost all files have changed even if I try to use snapshots (workstation) to keep the changes to a minimum.

What is the appropriate way to do this, and what rsync argument works best?


EDIT: I know the vmware instance must be shut down.

  • Try the --modify-window option for rsync

    Windows doesn't guarantee the accuracy of file modification times better than 2 seconds, so give rsync some leeway in its comparisons by using modify-window.

    --modify-window=1
    

    is usually sufficient.

    Thorbjørn Ravn Andersen : I think this was the reason - I was working of a FAT32 disk (to allow Fusion to use it too). I have now switched to an ext3 disk (for journalling) and that appears to work as expected with snapshots.
    From pavium
  • Are you rsyncing the files in the vm of the vmdk files (split 2gb i'm guessing?)

    If the second have you tried setting up rsync servers and using delta modification sync?

    Thorbjørn Ravn Andersen : This is on a local machine. I just want to have a relatively recent backup on another harddisk without having to wait hours to copy it.
    From Antitribu
  • Back up from the host OS. It's the only real way to make certain it will work. Of course, if the guest is not running, you can use rsync -- but chances are it will never be all that efficient.

    I'd make certain I never compressed the host disk (since it will change a lot if you do) and make certain you are telling rsync to handle empty blocks efficiently (with the --sparse flag) and tell it to update the destination in-place (--inplace) or you will end up copying the entire file each time a single byte changes in the source. It will be a local copy, but still, chances are your files are just this side of huge.

    Thorbjørn Ravn Andersen : You mean guest os? I want to do that too - suggestions for a cheap/free backup system that will work transparently to a network drive? I essentially want OS X Time Machine :)

0 comments:

Post a Comment