Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Best Practices for virtual machine backup (programs and data) in VMware Fusion (1013628)

Symptoms

  • Time Machine backups take up too much room, too quickly
  • Restoring virtual machines from a Time Machine backup fails

Purpose

This document describes the best practices for backing up a virtual machine. It details the issues that must be taken onto consideration, the steps in an ideal process, and the drawbacks of relying on Time Machine exclusively.

Resolution

To back up the entire virtual machine (the operating system installation, application files and settings, and all user data), copy the .vmwarevm bundle (the object within the Virtual Machines folder), while the virtual machine is shutdown.

Note: Ensure that the virtual machine is shut down and not suspended.
 
Because of the length of time involved, and a high potential for redundant data, this method is best used on an occasional basis, after installing new programs/updates or making significant configuration changes.

For more information about how to back up a virtual machine by copying it, see Copying a virtual machine in VMware Fusion (1001524).

For constantly-changing data files, it is best to use any or all of these methods:

These methods are easy and non-intrusive enough to be used regularly (such as daily). It is possible to set up Windows Scheduled Tasks so that any of these options can happen automatically (assuming the removable media is present and has the space available).

For example, an ideal backup procedure would include these steps:

  1. Initial setup

    1. Program and data backup

    2. Operating system and application backup
      When the VM is shut down, copy the VM bundle to an external drive (for example, your Time Machine drive).

  2. Regular maintenance
    On a regular basis, back up your Mac's folders (including the Shared / Mirrored folders) using your regular back up method. If you use Time Machine, this happens automatically (assuming your external drive is plugged in) every hour. In most other backup programs, this can be scheduled. Backing up the Mac folders, containing your Windows data, ensures that your Windows files and data are backed up.

  3. Occasional maintenance
    There is no need to back up your VM bundle unless you make configuration changes to an application or the operating system, or install new programs or OS updates. After doing this, you can drag your VM bundle to the external disk (you can replace the old/original copy, to save space) to back it up.

Additional Information

A large (250 GB+) external drive, as suggested by Time Machine, is desirable.

It is possible to use Time Machine to back up the data within your virtual machine, but it is not the best practice. See Excluding the Virtual Machines folder from being backed up by Time Machine (1014046).

There are three caveats when using Time Machine in combination with a virtual machine:

  1. Because of conflicts, some versions of Fusion exclude your virtual machine's directory from Time Machine backups. To check if this exclusion is in place on a system already using Time Machine:

    1. Open System Preferences > Time Machine,
    2. Click Options to see which (if any) directories are being excluded.

  2. Time Machine takes differential backups of files at the file level (rather than the block level). If any file is altered, Time Machine backs up the entire file on its next run-through. Virtual machines consist mainly of virtual hard disks, files that can be equal in size to the size of the virtual Operating System's assigned space. This file size depends on whether you are using sparse disks or a monolithic disk and if you have pre-allocated the disk. For more information on these disk types and how to identify them, see the VMware Communities document A Beginner's Guide to VMware Fusion .

    For example, a 60 GB virtual machine with a monolithic, pre-allocated hard disk has a single 60 GB file for its virtual hard disk. Every time that virtual machine is started -- or any document within the virtual machine is edited -- that 60 GB file is modified, and Time Machine backs it up. Since Time Machine backs up every hour, a 1 TB drive fills up in less than a day.

  3. If Time Machine backs up a running virtual machine, it attempts to capture files that are being written to. The resulting backups are likely corrupt and unusable. In combination with caveat 2, this may result in a filled backup disk with unusable backups.

Tags

how-to  backup

See Also

Update History

06/10/2010 - Added the steps for an ideal method, updated the Purpose. 05/23/2012 - Added note to shut down, and not suspend, the virtual machine before the back up 08/23/2012 - Added Fusion 5.x to Products

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 56 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 56 Ratings
Actions
KB: