[Important note to readers: before trying any of the tips or tools listed on this website, make sure you have a full backup of all data on your computer. These tips have all been tested, but there's always a chance that you'll lose data in the process, so be safe and backup!]
Using 'ditto' and FireWire target disk mode to move a user's home directory from one computer to another (posted: 9-27-04 9:36 PM)
Moving a Mac OS X user's home directory to a new computer can be tricky, especially if you want the transition to be as transparent as possible. Using the Unix "ditto" command and the steps below will make the process easy, and when the user sees their new system, all their documents, dock items and application and Finder preferences will be just where they expect them. [Note before starting: unless you're very familiar with running root commands from the terminal (and even if you are), you should, as always, back up any important data on the hard disks you will be working on before getting started]
1. Make sure the new (destination) computer is on and that you're logged in as an administrative user that is *not the same* as the user who's home directory you are copying (so if you're copying the home directory for a user "John Smith," you must *not* be logged on as "John Smith," but instead as another admin user). You'll need to have the root user enabled and know the root password for the following steps. For more information on enabling the root user, see the "Steps to enable the root user" section of this article.
2. Boot the old (source) computer into Target disk mode. Do this by powering down the old machine, connecting it to the new (destination) machine with a FireWire cable, then power it back on while holding down the "T" key on the keyboard until you see the FireWire icon on the source computer's screen.
3. Create a new user account in "System Preferences -> Accounts", "new_user_name" for example. Make sure to substitute this new user's short name (i.e. "johnsmith" not "John Smith") where "new_user_name" appears in the sample commands that follow below. Also be sure to copy the following commands exactly, including spaces, etc,
4. From the Terminal application, run:
sudo rm -Rf /Users/new_user_name/*
[you will be prompted to enter the root password]
5. Then run the following, substituting the old computer's hard disk name for "SourceVolumeName":
sudo ditto -v -rsrcFork "/Volumes/SourceVolumeName/Users/old_user_folder" /Users/new_user_name
[the quotes are only necessary if the source Volume name contains spaces or other special characters. Also, this may take a while, and you will see feedback on the screen as it takes place].
6. Then run the following 2 commands, one at a time:
sudo chown -R new_user_name /Users/new_user_name
sudo chmod -R 755 /Users/new_user_name
7. Unmount the old machine's drive from the new machine by dragging it's icon to the trash, then shut down the old machine by pressing the power key, and disconnect the firewire cable.
8. Log out of the new machine as the admin user, and log back in as the user who's home directory you just copied (i.e. "John Smith").