Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

VirtualBox: Using snapshots to avoid excessive TimeMachine actitvity Apps
Are you running another OS with the great and free VirtualBox virtualization application by Oracle? Are you also using TimeMachine? Chances are that you are excessively using Time Machine and filling your Backup disk with slightly different but still huge disk images. Here's a possible solution to this problem:

VirtualBox provides the possibility to create snapshots. This allows you to go back to a virtual machine state when you are not happy with your virtual machine anymore. Possible examples are: you messed up your system or you caught a virus in your virtual machine.

This feature can also be used for circumventing the problem mentioned above, namely the excessive Time Machine usage.
  • Bring your virtual machine to a state you like
  • Create a snapshot in VirtualBox
  • Exclude the snapshot directory from TimeMachine Backup (it is located in /Users/YOURUSERNAME/Library/VirtualBox/Machines/VIRTUALBOXNAME/Snapshots, change YOURUSERNAME and VIRTUALBOXNAME accordingly)
Using that trick, the original disk image will be backed up, while the changes you make everyday will not.

Side effects: Your changes are never backed up, so in case of disk failure, you lose them. If you make changes that are important, you might want to merge the current state from time to time and create a new "safe" snapshot.

[crarko adds: I haven't used VirtualBox for quite a while, but this should be handy for those of you who do.]
    •    
  • Currently 4.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[7,451 views]  

VirtualBox: Using snapshots to avoid excessive TimeMachine actitvity | 7 comments | Create New Account
Click here to return to the 'VirtualBox: Using snapshots to avoid excessive TimeMachine actitvity' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
VirtualBox: Using snapshots to avoid excessive TimeMachine actitvity
Authored by: fulmar2 on Jan 19, '12 08:36:34AM

Hi -
Good hint. Here is how I handled the situation in case other people want options. I took my time machine volume and partitioned it so that one partition is called Time Machine, and the other partition is called Virtual Machines. I then made the best virtual machine I could, and copied it over to the Virtual Machine partition, and excluded the virtual machine from the backup. As far as I can tell, this accomplishes the same thing (i.e. in either solution, your changes will not be backed up - but the core VM is backed up). Hope that helps some.



[ Reply to This | # ]
VirtualBox: Using snapshots to avoid excessive TimeMachine actitvity
Authored by: Supp0rtLinux on Jan 19, '12 08:44:42AM

A better solution: allow TM to make a one time backup of the VirtualBox. After you confirmed its there, exclude the VBox from the Time Machine backups, but INCLUDE the snapshots. Now, if you lose everything, you can restore the original full backup of the VBox and then restore the snapshots to get back to a working state. The individual snapshots are very small and only have the changes in them.



[ Reply to This | # ]
VirtualBox: Using snapshots to avoid excessive TimeMachine actitvity
Authored by: Quatch on Jan 19, '12 10:06:53AM

Until such time as the original backup is deleted for space?



[ Reply to This | # ]
VirtualBox: Using snapshots to avoid excessive TimeMachine actitvity
Authored by: plaidflannel on Jan 20, '12 03:01:21PM

My backup disk has plenty of space and a Firewire 800 interface to my Mac Mini (2.66 Ghz, 4 GB, 500 GB). So I just put all my virtual disks on that device rather than on my internal disk. VirtualBox uses those virtual disks directly, Liinux performance is satisfactory, and I use a Linux solution for backups of my Linux files. Time Machine never sees the virtual disks. (Also, a couple of times a year, I burn a CD of difficult-to-reconstruct files, both Mac and Linux.)



[ Reply to This | # ]
VirtualBox: Using snapshots to avoid excessive TimeMachine actitvity
Authored by: bruce.desertrat on Jan 22, '12 10:50:46AM

This tip is backwards. The problem with Time Machine and VirtualBox (or, indeed, ANY VM program) is that the hard drive image file is changing constantly, so Time Machine is backing that file up. As it's typically the largest file in a VM dataset, it gobbles Time Machine space like a swarm of locusts.

Take the snapshot, but don't exclude the SNAPSHOT folder, exclude the folder holding the drive image. Let Time Machine back up your snapshot; that way you can always roll back with TM.

And no, Time Machine won't delete the only copy of a file when it rolls up changes to a new baseline 'Time 0' point. It will simply eliminate all copies from the oldest copy in the database and the new baseline restore point. If no changes exist in a file it's not deleted, but is included in the new baseline restore point.

Just chopping off the oldest copies would be insanely stupid; and while we've seen some dumb decisions from Apple in the past [hockeypuckmouse] screwing up the fundamental primary feature of a backup system isn't one of them. People would have found the grievous results of this error the very first time anyone restored a mac from a space-limited Time Machine backup.



[ Reply to This | # ]
VirtualBox: Using snapshots to avoid excessive TimeMachine actitvity
Authored by: aradke on Jan 23, '12 02:07:37AM

Why not just leave the exclusion out and backup everything?

The original image won't change and therefore won't take up any extra space and the changing snapshot is relatively small.

Every now and then you can merge the snapshot and create a new one if the snapshot grows to a size that makes it worthwhile.



[ Reply to This | # ]
VirtualBox: Using snapshots to avoid excessive TimeMachine actitvity
Authored by: rickrcomm on Jan 25, '12 03:25:25PM

Just for clarity, I assume these solutions would apply to VMware Fusion files as well?



[ Reply to This | # ]