This page shows the source for this entry, with WebCore formatting language tags and attributes highlighted.

Title

OS X Leopard: Restoring from Backup (Ad hoc)

Description

Say you're excited about having finally upgraded from OS X Tiger to Leopard more than two years after everyone else has already made the switch. Let's say you're not so excited that you completely lose your head and do a clean install without making a backup, but excited enough to forget that several Apple applications have rather convenient backup features baked right into them. OS X offers a <i>Migration Assistant</i> with which you can migrate settings from another OS X installation or a <i>Time Machine</i> backup. However, it doesn't see a <i>SilverKeeper</i> backup (a one-to-one copy of all files) as a valid OS X installation, so you can't restore settings from that kind of a backup with this assistant. It's not the end of the world, though. Unlike Windows applications, which use installers to place entries in the registry and put files into the appropriate places, OS X applications are generally a drag & drop installation. So that's the application itself, but what if you wanted to restore the preferences and user data that you so painstakingly configured and created in your old installation? It turns out that that's not so hard either, once you know where things are. OS X applications only create files within your user folder<fn>---and only your user folder---and then in at most three folders: <ol> <b>Preferences</b>: Application configuration data <b>Application Support</b>: Application data which, if lost, cannot be recovered <b>Caches</b>: Application data which makes the application faster, but can always be reconstructed by combining data from <i>Application Data</i>, <i>Preferences</i> and other non-volatile sources. </ol> Some Apple applications don't stick exactly to this structure (e.g. Stickies, Safari, Mail, etc.), but third party applications are generally very good about this. One system-wide file you might want to copy is the <c>~/Keychain</c> folder, which kept track of all of your passwords (dozens of which you've probably completely forgotten by now). For all other application-specific data, see the list below for tips. <dl dt_class="field"> Mail Mail isn't so tricky to restore. From the <i>Preferences</i> folder, copy any files whose name begins with <c>com.apple.mail</c><fn>. Copy the <c>~/Mail</c> folder to your new user folder and you're done. The <c>~/Mail Downloads</c> folder seems to be some sort of cache and isn't 100% necessary, but shouldn't hurt either. When you start <i>Mail</i> in OS X Leopard, it will notify you that it is upgrading your mail store and voila! You've got mail. iTunes The iTunes library is stored entirely under <c>~/Music/iTunes</c>. If you use the default settings, letting iTunes keep track of the music data, it suffices to copy this folder; if you have music stored elsewhere, it's up to you to make sure the OS X Leopard iTunes knows where those files are. iPhoto As with iTunes, iPhoto's data is located outside of the <c>~/Library</c>, instead using the <c>~/Pictures/iPhoto</c> folder. Just copy this over and you've got your pictures back. Safari If you use Safari, your bookmarks, saved form values and other preferences are in <c>~/Safari</c> and your cookies are in <c>~/Cookies</c>, should you wish to rescue them. Tunnelblick Tunnelblick is an OpenVPN GUI for OS X; it stores its configuration data in <c>~/openvpn</c> instead of the <i>Preferences</i> folder. (This is most likely a requirement of the Unix-based OpenVPN subsystem.) Dictionaries If you added words to one or more dictionaries, those files are stored in <c>~/Spelling</c> Stickies If you use the sticky notes application from Apple, you can just copy the <c>~/StickiesDatabase</c> file over and you'll have your notes back. Address Book The best solution here is to remember to back up this application's data using the internal backup available from the <i>File</i> menu in the application itself. However, surprisingly, it only uses a folder in <i>Application Support</i>. Go Apple! Way to follow your own guidelines. Just copy this folder over and you've got your address book back. iCal <div>As with the address book, the best solution is to use the internal backup available from the <i>File</i> menu in the application itself. Whereas under Tiger, iCal actually stored its data in the <c>~/Application Support</c> folder, in Leopard, its data has moved to <c>~/Calendars</c>. Simply copying the folders over isn't going to work here, unfortunately; it's a bit more complicated than that. Here's a rough guide: <ol> In the backup, browse to the <c>~/Application Support/iCal/Sources</c> folder; there, you will see one folder for each of your calendars, though with very cryptic-looking names. <div>In order to tell which calendar is which, open a cryptically-named folder and quick-view the <c>Info.plist</c> file (press <kbd>Space</kbd> when the file is selected in the Finder); you should something like the following: <code> <plist version="1.0"> <dict> <key>Key</key> <string>3BFD9C8E-88A4-4EEF-A8E2-0AC4E153E53F</string> <key>Title</key> <string><hl>Work</hl></string> <key>Type</key> <string>com.apple.ical.sources.naivereadwrite</string> </dict> </plist> </code> The contents of the <c>string</c> element (highlighted above) immediately after the <c>key</c> element with the contents "Title" is the name of the calendar. If you were subscribed to calendars, then you don't need to import those; you can just re-add the subscription URL to iCal directly. </div> For each calendar you wish to import, from <i>iCal</i> select <i>File</i>, then <i>Import...</i> from the menu. Select the <i>Import an iCal file</i> option. Select the file ending in <c>.ics</c> from the folder containing the calendar you wish to import. Choose a calendar to which you wish to import the data. You can either import the data into an existing calendar (as you will likely do with the "Home" and "Work" calendars) or just create a new one. Press "Ok" to import the data and restore your calendar. </ol></div> Other Third-party Applications As mentioned above, it's usually sufficient (in my experience, anyway) to copy data from <i>Preferences</i> and <i>Application Support</i> for the applications you want to transfer. This worked for Adium, Opera, TextMate, Cyberduck, Firefox, TriTag, CSSEdit, Delicious Library and Fission, but your mileage may vary. </dl> <hr> <ft>Referred to throughout the article with the path <c>~/</c>.</ft> <ft>Most applications have either a single preferences file or create a whole sub-folder within the <c>~/Preferences</c> folder. They all include their application name somewhere in either the folder or file name.</ft>