Synchronize. Backup. Manual. Automatic.

Whatever your backup or sync scenario, ChronoSync Express has got you covered!

Back to more guides

MORE GUIDES

Synchronizing with a Disk Image

INTRODUCTION

ChronoSync Express 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, removable media, 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 macOS can mount these file systems as regular volumes.

Typically, disk images are used to distribute data and applications (such as ChronoSync Express). However, you can create your own disk image and make it writable, thus allowing it to be specified as a destination target. Furthermore, ChronoSync Express identifies a disk image as removable media so you can have ChronoSync Express 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 macOS 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. 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. Create a DMG

Several utilities are available, but the one that comes with macOS, Disk Utility, is what we will use.

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:

  • The name and location are completely up to you. A disk image, once created, can be copied anywhere.
  • The volume size should be large enough to handle the data you are synchronizing or backing up. For this tip, we're choosing 4.7 GB, which is a typical DVD capacity.
  • The format should be "Sparse disk image". This indicates that the file itself will NOT be 4.7 GB in size, and will only grow as necessary.
  • Choose Encryption if you want to password-protect your data inside and prevent unauthorized access to your files. Encrypting your data will convert the data into unreadable code. Note: This password can be added to your keychain.

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 Express 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 Express 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 Express 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 Express 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 Express 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 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.