Backup and restore of Mac User information and preferences
Backup
The steps in this section back up all of your users' files and the Shared folder. After the files are backed up, you may use the restore steps to copy them to a different computer or to put them back on the same computer after erasing your hard drive, for example.
Follow these steps:
1. Log in as the root user. For help with this step, see technical document 106290: "Mac OS X: About the root User and How to Enable It".
2. Click the Finder icon in the Dock.
3. Choose Computer from the Go menu.
4. Open the Mac OS X startup disk, and locate the Users folder in it.
5. Copy the Users folder to your backup storage location.
6. After copying the Users folder, open it.
7. Note the names of the folders in Users. Each folder other than Shared is the "short name" of one of your users. You will need these names spelled exactly when restoring data.
Restore
These steps assume that you backed up as described above. It is additionally assumed that you have just erased the hard disk and reinstalled Mac OS X, or that you have purchased a new computer. In either case, you would start at the Mac OS X Setup Assistant. Important: When recreating users in Steps 1 and 4 below, be sure that the short names are typed exactly as they were when you made the backup.
Follow these steps:
1.In the Setup Assistant, create a user account with the same user name and short name that you previously used for your Admin user. If you only had one user (yourself) on the computer, you were the Admin user and may skip to Step 5 after completing the Setup Assistant.
2.After completing the Setup Assistant, choose System Preferences from the Apple menu.
3. Choose Users from the View menu.
4. For each user that you backed up, create a new user account using the same user name and short name.
5. Log in as the root user. For more help with this step, see technical document 106290: "Mac OS X: About the root User and How to Enable It".
6. Click the Finder icon in the Dock.
7. Choose Go To Folder from the Go menu.
8. Type "/Users/" and click Go.
9. Drag the contents of the Users folder to the Trash.
10. From your backup storage location or disk, drag the contents of the backed-up Users folder into the empty Users folder on the Mac OS X disk.
11. Put away or eject your backup disk.
12. Open Terminal (/Applications/Utilities/).
13. Type: chown -R /Users/ * Important: In this step and in Step 15 below, you would replace "" with the actual user short name, which should match exactly the name of the user folder. So for a user named Jeanne Dubois with a short name of "jeanne", you would type: chown -R jeanne /Users/jeanne
14. Press Return.
15. Type: chgrp -R staff /Users/
16. Press Return.
17. Repeat Steps 13 through 16 for each additional user that you created in Steps 2 through 4, if applicable.
18. Quit Terminal.
19. Choose Log Out from the Apple menu.
20. Log back in as your normal Admin user.
21. Be sure that you can access your files. If you cannot access your files, log back in as root and repeat steps 13 through 20.
22. Disable root login as described in technical document 106290.
Backup and Restore of Important Mac User Program files
Safari bookmarks
Safari bookmarks are all stored in a file called Bookmarks.plist, which is located at ~/Library/Safari/. To get to this file in the Finder, choose Home from the Go menu. Open the Library folder, then open the Safari folder.
To back up: Make a copy of the file in another location by holding down the Option key and dragging the Bookmarks.plist file to another location (such as the Desktop). The original file will remain (do not remove the original file from this location or your Safari bookmarks will be gone!).
As an alternative, you can compress the file into an archive—select the Bookmarks.plist file, then from the File menu in the Finder, choose Create Archive. The original file will remain.
To restore: Simply move the backup copy of Bookmarks.plist to the ~/Library/Safari/ folder. If you're restoring from an archive, don't forget to decompress the file (just double-click it).
Note: The Bookmarks.plist file contains only the Safari bookmarks for the currently logged-in user. If other users on the same Mac have their own user accounts and personal bookmarks, their Bookmarks.plist files are located in their Home folders.
Address Book contacts
To back up: Open Address Book and choose Back up Address Book from the File menu. A dialog appears, asking you to choose a save location—it also adds the current date to the saved file name too. Choose where you want to save the backup, then click Save.
To restore: In Address Book, choose Revert to Address Book Backup from the File menu. In the resulting dialog, locate your backup file (it ends with a .abbu extension), select it, and click Open.
iCal calendars
To back up: Open iCal, then choose Back up Database from the File menu. In the resulting dialog, choose where you want to save the backup file (the current date also gets added to the name) and click Save.
To restore: Open iCal. From the File menu, choose Revert to Database Backup. In the resulting dialog, locate your backup file (it ends with a .icbu extension), select it, and click Open.
Keychains
Keychains are located in your ~/Library/Keychains/ folder. To get to this file in the Finder, choose Home from the Go menu. Open the Library folder, then open the Keychains folder.
Tip: Before you back up your keychains, use Keychain First Aid to repair any issues.
To back up: Make copies of your keychain files in a different location by Option-dragging each file to a desired location. Do not remove the originals. You can also use the Finder to create an archive as described in the Safari Bookmarks section, above.
To restore:
1. In the Finder, from the Go menu, choose Utilities.
2. Open Keychain Access.
3. From the Edit menu, choose Keychain List. A dialog appears, listing all keychain files.
4. Deselect the keychains that you wish to restore, then click OK.
5. Quit Keychain Access.
6. Move your keychain back up files back to ~/Library/Keychains/.
7. Open Keychain Access again.
8. From the Edit menu, choose Keychain List.
9. Select the keychains that you wish to use, then click OK.
Mail preferences and messages
Your Mail accounts, rules, signatures, and Smart Mailboxes preference settings can easily be backed up. Tip: All Mail-related preference files should be backed up or restored as a group.
To back up:
Note: These steps back up Mail preferences, but do not back up Mail messages (emails), although you can do that with the .Mac Backup utility. See below if you want to manually back up Mail messages (mailboxes).
1. Create a uniquely-named folder on your desktop (or other favorite location). For example, you might call it "Mail Prefs Backups May_15_2005" (adding a date is a good idea).
2. Quit Mail if it's running.
3. In the Finder choose Home from the Go menu.
4. Open the Library folder.
5. Open the Preferences folder.
6. Copy the "com.apple.mail.plist" file to the folder you made in step 1 by Option-dragging the file. Don't remove the original file from its current location (this file contains your Mail accounts information).
7. Close the Preferences folder.
8. Open the Mail folder.
9. Copy the "MessageRules.plist" file to the folder you made in step 1 by Option-dragging the file (this file contains your Mail rules).
10. Copy the "SmartMailboxes.plist" file to the folder you made in step 1 by Option-dragging the file (you guessed it, this file contains Smart Mailboxes information).
11. Finally, copy the Signatures folder to the folder you made in step 1 by Option-dragging the folder. (Your custom signatures, if you use them, are stored here.)
To restore: Just move all of the copies of the files and folders from your uniquely-named folder to the original locations from which they came, as listed above.
To manually back up Mail messages (emails)
You might wish to manually back up all your Mail messages from time-to-time. To back up entire mailboxes (where Mail stores messages), such as your Inbox. To back up your Mail mailboxes, follow these steps:
1. Quit Mail if it's open.
2. From the Finder's Go menu, choose Home.
3. Open the Library folder.
4. Copy the folder "Mail" to your backup location, such as a different volume or burnable disc. Important: Do not remove the Mail folder from ~/Library. If you're backing up to the same volume, hold the Option key as you drag the folder to make a copy instead of moving it.
You can restore backed-up mailboxes at any time by quitting Mail and following the above steps, except for the last step where you copy your backed up Mail folder to ~/Library, instead of from it.