cs_logo

Synchronizing with a Disk Image.

ChronoSync can perform a synchronization (or backup) between any block device that can be mounted on your desktop. This usually means internal hard disks, portable FireWire or USB drives (including iPods), removable media such as Zip or MO disks, or file servers. Another form of mountable "media" that is easy to overlook, however, is a Disk Image.

Disk Images are usually referred to by their filename extension, "DMG". They are basically data files that mimic storage devices. The contents of the these files are complete file systems and Mac OS X can mount these file systems as regular volumes.

Typically, disk images are used to distribute data and applications (such as ChronoSync). However, you can create your own disk image and make it writable, thus allowing it to be specified as a destination target. Furthermore, ChronoSync identifies a disk image as removable media so you can have ChronoSync mount it automatically and unmount it when finished. You can even schedule a "sync-on-mount" to be performed whenever you manually mount a disk image file.

Why a Disk Image? There are actually many situations where using a disk image is advantageous - too many, in fact, to list here. We'll touch upon some uses at the end of this tip. First, however, you must understand the two most useful attributes of disk images.


Disk images can be formatted as HFS+.
The file system that Mac OS X prefers to use is HFS+ (also called HFS Extended). It offers the ability to store & manage files in a distinctly Mac way, i.e. very long file names, few character restrictions, hidden extensions, rich meta data, resource forks, etc. Sometimes, however, you are forced to synchronize with a non HFS+ file system such as Windows or Mac OS 9 file servers. This imposes many restrictions - you can either live with them, or create a disk image and place it on your non-HFS+ file system. You then won't have any problems copying your data to an alien file system.

DMGs can be mounted with full access privileges.
The default method for mounting disk images will result in the user having full ownership privileges of all the files & folders contained therein. Thus when scanning a mounted disk image, and copying data to/from it, there will be no permission related errors. The implications of this become huge when you realize that anyone who mounts a DMG will have full access. This allows you to share your data with other users without having to worry about access restrictions. This can be invaluable when synchronizing with a "central repository" that you need several users to have access to.


Step 1.
With this said, let's get on to the step of creating a DMG. Several utilities are available, but the one that comes with Mac OS X, Disk Utility, is what we will use. Note: If you're not using Mac OS X 10.3 "Panther", you should use the "Disk Copy" application. The steps involved in using Disk Copy are very similar to what is outlined here.

Launch Disk Utility from /Applications/Utilities. Choose "File->New -> Blank Disk Image...". In the dialog that appears, you must specify a few pieces of information:

Click "Create" when ready.

Step 2.
Make sure the new disk image has been mounted. Disk Utility should have mounted the disk image automatically after creating it. A new volume with the name you specified should appear on the desktop. If not, simply locate the disk image file you just created and double click its icon in the Finder.

Step 3.
Setup your targets. Launch ChronoSync and specify your targets as you would normally do. In this example, we are creating a unidirectional sync with the source (left) target being the users "Documents" folder, and the destination (right) target being the newly created disk image.

Step 4.
Specify mounting options. You'll notice that the "Options" button is available for the disk image target. This is because ChronoSync identifies the disk image as removable media. You can thus specify the same mounting options you would have if this media resided on a removable device, such as a Zip drive.

Depending on the nature of your backup, you may not need or want to modify any of the mounting options. In this case, we will instruct ChronoSync NOT to prompt for insertion, and to "eject" the disk image when synchronization is complete.

The "Prompt to insert media" option is disabled because we don't want to be asked to insert the media if it is not mounted. ChronoSync will attempt to automatically mount the DMG before prompting for insertion so, if that fails, the DMG simply isn't available.

The "Eject media after synchronization" option is turned on because we will only be using this media for backup. When backup is complete, we want to immediately unmount it. This will prevent the user from "tinkering" with the contents of the disk image. In a shared environment, this will also allow the DMG to be mounted by another user.

Step 5.
Run your synchronization! If the DMG is not mounted when synchronization begins, ChronoSync will attempt to mount it. Assuming this happens successfully, the mounted volume will appear on the desktop and synchronization will proceed as normal. When complete, the disk image will be ejected and the mounted volume will disappear from the desktop.


What is it good for?
Synchronizing to Windows, Mac OS 9 or Linux file servers which do not support the HFS+ file system. This allows you to preserve all file attributes, including Mac-style filenames such as "Research ƒ".

Sharing data with other users on a file server, or even your own machine (if you have multiple accounts). Normally, synchronizing to a common folder doesn't work because files retain the ownership of those who created them. Thus other users may be able to view your files but might not be able to modify them. With a DMG, whoever mounts the disk becomes the "owner" of all files.

Burning to CD or DVD. By choosing a DMG size that matches the capacity of a CD or DVD, you can quickly burn the disk image and be sure all your data will fit. This isn't the case if burning from a folder. Also, it's easy to setup a post-synchronization AppleScript that will do this automatically!

Safeguarding your data. By enabling encryption, you can restrict access to your data. This will protect the data from users who you want to block and, also, keep the data safe in the event of theft.



That's it!

The more you experiment synchronizing with disk images, the more advantages and uses will become obvious to you. At the right is a short list of some of the applications that disk image synchronization is good for.

The flexibility and ease of using ChronoSync has so many advantages. If you have any problems while using our products, contact us by using our support form. If you wish to share a tip with us, post it on our comment form. Happy Syncing!