Best Practices for virtual machine backup (programs and data) in VMware Fusion (1013628)
- Time Machine backups take up too much room, too quickly
- Restoring virtual machines from a Time Machine backup fails
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.
Note: Ensure that the virtual machine is shut down and not suspended.
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:
- Any network-based backup method (depending on your network settings, the virtual machine could be like just another machine on your network).
- Store, copy, or move the data files to be backed up into a Mirrored or Shared folder and use Time Machine to back up that folder from the Mac OS.
Note: For more information about mirrored folders, see Setting up mirrored folders for your Mac and virtual machine (1014127). For more information about shared folders, see Sharing a folder from your Mac to a virtual machine (1004055).
- Back up to removable media (such as CD, DVD, or flash drive) for one-off, non-scheduled backups.
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:
- Initial setup
- Program and data backup
Set up Mirrored folders, and store all of the files you create in Windows in a Mirrored folder (thus keeping it on the Mac). For more information, see Setting up mirrored folders for your Mac and virtual machine (1014127).
Set up Shared folders, and store all of the files you create in Windows in the Shared folder. For more information, see Sharing a folder from your Mac to a virtual machine (1004055).
- Manual / scheduled copy:
Copy the files you want to back up from where they're saved into Windows into a shared folder. This copy can be scheduled, to run automatically. For more information, see:
- XP: Microsoft's Knowledge Base article, How To Schedule Tasks in Windows XP
- Vista: Microsoft's Vista support article, Schedule a task
- Windows 7: Microsoft's Windows 7 support article, Schedule a task
Note: The preceding links were correct as of May 28, 2011. If you find that a link is broken, provide feedback and a VMware employee will update the link.
- 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).
- Program and data backup
- 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.
- 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.
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:
- 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:
- Open System Preferences > Time Machine,
- Click Options to see which (if any) directories are being excluded.
- 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.
- 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.
- Copying a virtual machine in VMware Fusion
- Sharing a folder from your Mac to a virtual machine
- Excluding the Virtual Machines folder from being backed up by Time Machine
- Setting up mirrored folders for your Mac and virtual machine
- Backing up a virtual machine using Time Machine in Fusion 4.x and above
- Melhores práticas no backup da máquina virtual (programas e dados) no VMware Fusion
- Prácticas recomendadas para la creación de copias de seguridad (de programas e información) de la máquina virtual con VMware Fusion