Syncing Structured Information
Most structured information consists of the types of things that traditional database programs manage: bits of text, some numbers, maybe a small image or sound bite. Apple's syncing model implicitly assumes you're syncing such structured, "database-friendly" information. After all, at the heart of the Tiger sync engine is a database: the truth database.
Note: Behind the scenes, Tiger's sync services use another Tiger innovation to manage the truth database's contents: a set of software components known collectively as Core Data. Core Data offers programs various ways to store multiple chunks of information in structured form, including a traditional SQL database.
For both performance and storage capacity reasons, the amount of data handled by the sync engine can't be so large that it makes the truth database unwieldy. After all, the truth database must contain all the current synced data from every client as well as every client's state. If you were to use the truth database to store copies of many large ungainly objects, like Photoshop files or PowerPoint presentations, the database would consume a significant portion of your hard disk and bog down the performance of the sync engine.
In short, Apple's syncing model is designed to work with items from structured information collections like Address Book's contact lists or iCal's event and to-do lists, rather than with whole files.
When it comes to syncing files, the Tiger sync engine with its truth database just doesn't cut it. Luckily, a database like the truth database isn't needed to sync files between devices.
A file-syncing application typically performs these steps:
- It examines each device participating in a sync and locates the files that are to be synced on each device. (As you'll see, it's OK if one or more of the devices doesn't contain copies of the files at all.)
- The application then determines which of the copies of each file among the various devices have been modified most recently.
- It pushes the latest version of each file to those devices that either don't have that file, or that have an older version of the file (in which case, the older version is overwritten).
See? No database required: just the basic date and time information associated with each file on each device.
However, even though Tiger's sync engine doesn't handle whole files, Tiger does provide other methods and applications to sync files; see, for example, Sync Your Files with iDisk in the full e-book. And, in many of those cases where Tiger's file-syncing capabilities fall short, third-party developers have stepped in with their own syncing tools.
Syncing Versus Backups
Some people confuse syncing with backing up, which is not surprising because each employs similar techniques and strategies. Both syncing and backing up take the information you have stored in one place and copy it to another place, and both usually allow copying of only those items that have changed since the last sync or backup.
The difference lies in this point: syncs are about space, and backups are about time.
When you sync, you make your data available for use in two or more different places. You can then work with that data in those places independently of each other, and later use the syncing process again to resolve any changes and conflicts that occur.
When you back up your data, on the other hand, you store your data as it existed at that particular time so that, if necessary, you can revert to it: you never actually use the stored data in a backup—or, at least, you really, really, shouldn't use it—other than to copy it back to your working environment.
Although you can use syncing as an informal way of backing up some of your information, you can't rely on it to get your information back to the way it was at any specific time, nor can you guarantee that a subsequent sync won't alter or eliminate something you may need later. That's what backups are for: to let you go back in time.
Tip: I recommend Take Control of Mac OS X Backups by Joe Kissell (http://www.takecontrolbooks.com/backup-macosx.html) for an in-depth look at backing up your Mac.
Michael E. Cohen has worked as a teacher, a programmer, a Web designer, a multimedia producer, and a certified usability analyst. He's the author or co-author of several books; his latest is Take Control of Syncing in Tiger (TidBITS Electronic Publishing, 2006).
Return to the Mac DevCenter.