Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Since a single small change to a VM file should (I think) cause the entire multi-gigabyte file to be backed up again, are there any ideas I can use to more effectively backup my machine?

Assume that I only need one copy of a VM, and changes made to the VM don't matter.

For example:

  • Backup the VM using time machine once, then exclude the folder that contains all the VMs

  • Exclude the VM's altogether and manually back up the VMs

  • Let Apple's software do it's thing, it will be effective at managing the disk space

share|improve this question
    
Do you want this to be a very general discussion or perhaps focus on one disk image format. As the one answer shows, you can have snapshots that reduce the monolithic nature of a VM's drive. –  bmike Dec 4 '12 at 19:40

3 Answers 3

Enable snapshots. In VMWare when a snapshot is created, the (VMDK) hard drive contents are frozen, while changes are stored as a separate delta.

Before: 20GB VMDK + 1GB of changes = 20GB of changed files to backup

After 20GB VMDK (Snapshotted) + 1GB of changes = 1GB of changes to backup.

Additionally, you can keep snapshotting, so if you have an initial 20gb Snapshot1 + 2gb of deltas, each incremental backup would be 2gb.

Once you take a second snapshot, you end up with 22gb frozen. 20GB for S1, 2GB for S2, and then you just need to backup the next deltas.

The only downsides are:

  1. It takes more physical space. 20GB frozen image + 2gb of deltas take a total of 22gb of storage.
  2. It's not possible to shrink snapshotted VMs, so make sure to pre-shrink before taking the snapshot.
share|improve this answer
    
Be careful, snapshots tend to reduce performance, so try to keep as few as possible. –  Rqomey Dec 4 '12 at 23:03

Parallels has a specific setting to optimize its VMs for backup by Time Machine and prevent backing up unchanged data.

To enable improved integration with Time Machine, please go to Virtual Machine Configuration, choose Options and hit Backup.

Select "Optimize for Time Machine" in SmartGuard menu.

Similarly, VMWare Fusion has some support for Time Machine, which appears to involve turning on snapshots.

share|improve this answer

Since you say "changes made to the VM don't matter" then you can do what I do which is

  1. Put all the VMs in one folder
  2. Exclude the folder with the VMs from Time Machine
  3. Manually back up the VM folder. I keep a copy offsite on a portable RAID 1 drive.

Letting Time Machine "do its thing" is a bad idea, as it will make a new copy every it does a backup, which is generally around once an hour. You will eat up all your storage space very quickly and it will be pointless anyway.

You could "backup the VM using time machine once, then exclude the folder that contains all the VMs" but the Time Machine interface is not the best for retrieving your saved copy in that situation, plus Time Machine will delete old files if it needs to in order to save space and you don't know when it will delete your one and only backup copy of your VM.

By doing a manual backup of your VMs you can also refresh them once in a while (say when new guest OS updates are applied) much more easily than with a Time Machine solution.

Snapshots affect performance quite a bit unless the snapshot and the virtual disk is on a high-performance solid-state drive. It is worth considering if you need regular backups of ongoing work on the VM, but since you say you don't care about changes to the VM then snapshots are best avoided altogether.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.