Advanced Mac Cloning Techniques for SuperDuper

How to Backup Virtual Machines and Create a Sandbox

© Marco Villar

Sep 27, 2009
SuperDuper, Mac Cloning Software, Shirt Pocket
SuperDuper is a versatile program that can be used to backup virtual machines and create sandboxes for software testing or as a restore point.

The cloning program SuperDuper is a good Mac backup solution for both novices and experienced users. Among the more advanced features is the ability to customize the backup and run scripts before or after the backup; features that are important for virtual machine users. Another helpful feature is the ability to create sandboxes.

A sandbox is a copy of the system files, normally used for testing purposes.

Using a Sandbox to Create a Restore Point

A sandbox is a copy of the system used to create a restore point, and can be used to undo an error caused by an update or a new application. Sandboxes created by SuperDuper can share the user files or user and application files with the main partition. Creating a sandbox requires either a new partition on the primary drive, or a separate hard drive.

If an error occurs because of an application bug or system update, booting from the original partition will restore the system. If after testing a system update proves sound, the sandbox can also be copied back to the main drive to update it. Since it’s easy to make a mistake, it’s a good idea to have a backup copy of the main partition, including user files, before copying the sandbox back.

One consideration when using a sandbox to test an application is the Library folder in the user’s home folder. Some applications place files in that folder, and since the sandbox shares the user files with the main partition, any changes made will remain after the sandbox is gone. Since these are generally settings files, deleting them is easy enough.

Using SuperDuper and Virtual Machines

There are some options to consider when using virtual machine programs such as VMware Fusion or Parallels Desktop. The virtual machine can be backed up using an alternate program, or SuperDuper can backup the virtual machine files. The user files can also be kept in a shared folder on the Mac, and the virtual machine itself can be excluded from the backup.

A new script is necessary to exclude the virtual machines. To create a new script start in the main SuperDuper window:

  • Click the drop down list next to “using”.
  • Select New Copy Script.
  • Select the checkbox in the Description tab to use the new script.
  • Click the Included Scripts tab.
  • Click the plus sign to add a script and enter the Standard Scripts folder.
  • Add the Backup all files script.
  • Click the Script Commands tab.
  • Select the folder containing the virtual machines and click Add Item.
  • Apply the ignore command.

Once the script is finished, it can be saved from the File menu. After creation, to select it for a new or scheduled backup, click the drop down list next to “using” in the main SuperDuper window.

Creating a Script to Suspend and Exit VMware Fusion or Parallels Desktop

A running virtual machine should never be backed up using SuperDuper. In order to back it up properly, it should be suspended or powered down. Obviously the virtual machine can be manually powered down or suspended. However, it's easy to forget to exit the program. A better method is to create a script that SuperDuper can run before the backup.

To use a script in SuperDuper:

  • Click the Options button.
  • Go to the Advanced tab.
  • The top section is used to run a shell script before a backup.
  • The bottom section has a field to run one after a backup.

In this case, a script is needed before the backup to suspend the virtual machine and exit VMware Fusion or Parallels. The script can be used for either program by replacing “ProgramName” with either "VMware Fusion" or "Parallels Desktop". The script is derived from one originally written by John VanDyk.

Since VMware Fusion and Parallels Desktop don’t support AppleScript, access for assistive devices must be enabled in order for the script to work. To enable it:

  • Open the System Preferences.
  • Select Universal Access.
  • Select the checkbox marked Enable access for assistive devices.

The main shell script executes a series of commands in two text files. The first file contains instructions to suspend the virtual machine. It’s important to note that this assumes only one virtual machine is running. The next command waits 35 seconds to give the program time to suspend the virtual machine. The following command runs a file to exit the program, and the last command gives it time to do so.

The commands in the first text file will bring the application into focus, and select the Suspend menu item from the Virtual Machine menu. The menu and item names are identical in Fusion 2 and Parallels 4, which is why this script can be modified for either program. The commands in the second file bring the application into focus again, and select the Quit command from the application menu.

SuperDuper is a well-designed backup solution. Although the interface is easy for beginners to use, it has a variety features designed for advanced users to customize their backup plan. With a little creative thinking, it can fit quite well into even complicated backup plans.


The copyright of the article Advanced Mac Cloning Techniques for SuperDuper in Mac Software/OS is owned by Marco Villar. Permission to republish Advanced Mac Cloning Techniques for SuperDuper in print or online must be granted by the author in writing.


SuperDuper, Mac Cloning Software, Shirt Pocket
       


Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo