Last time I installed OS X on my Mac, I did an Archive and Install and selected the “Preserve Users and Network Settings” option. However, people might forget to check if the “preserve users …” option is selected and will end up with a new OS X installation on their Mac but with none of their files. Although you might think that all your data is lost, you could not be more wrong.
Other people may also delete a user account on their Mac and later remember that they had some important files on that user’s home folder. Do you think their data is lost? Think again. You can actually “undelete” a user’s account altogether.
Apple has a number of support documents that explain how you can easily get your data back in case you end up in one of the above mentioned situations and this is how easily it can be done.
You have to remember one thing: if you used the “Delete immediately” option, you will not be able to use the steps below to recover your data. Nevertheless, you can still recover at least some of it if you use a third-party recovery tool.
Restore a user’s account after an Archive and Install (Mac OS X 10.3 to 10.5)
If you are using Mac OS X 10.5 or later, these are the steps Apple says you have to follow to recover your entire Home folder (the one you had before the installation):
1. Enable the root user (for detailed instructions on how to do that, you can head over HERE.
2. Log in as root.
3. Verify that you do not currently have a user account created with the same short name as the home folder that you want to recover. If you already have a user with the same name as the home folder you are recovering, delete the user account employing System Preferences. Note: If the new user already has documents in their Home folder, which you want to keep, be sure to select the option “Save the home folder in a disk image” or “Do not change the home folder” when prompted. You must keep at least one administrator user on the system, so if you are removing only your administrator user, first create a temporary administrator user that can be deleted after step 9.
4. In Finder, open the hard drive, then navigate to Previous Systems/YYYY-MM-DD_HHMM/Users (where YYYY-MM-DD_HHMM is the date and time when the Archive and Install was performed).
5. Locate the Home folder that you want to recover.
6. Open another Finder window, go into the hard drive again and navigate to the Users folder.
7. Drag (move) the user’s (short name) folder from /Previous Systems/YYYY-MM-DD_HHMM/Users to /Users.
8. Use the Accounts pane in System Preferences to create a new user with the same short name as the home folder moved in the previous step.
9. Click OK when prompted with “A folder in the Users folder already has the name ‘short name.’ Would you like to use that folder as the Home folder for this user account?” This will correct the ownership on all files in the Home.
10. Log out.
11. Log in as the user created in the previous step.
12. Disable the root user.
Although this seems to be a very complex process, I am sure you will find it quite useful and will not mind going through all the hoops and the loops if you get your data back.
Recover files from a previous home folder after Archive and Install (Mac OS X 10.3 to 10.5)
If you do not want to completely restore your account from a previous installation but only wish a number of specific files, Apple comes to the rescue once again. This is how you have to proceed in order to get your data back:
For Mac OS X 10.4.11 or earlier: If you did not select (or forgot to select) the “Preserve Users and Network Settings” option before the Archive and Install installation, you can find the files from your previous home folder here: /Previous Systems/Previous System n/Users/.
The “n” equals a number such as 1. These numbered folders are created because each time you Archive and Install a system on your Mac, a new numbered Previous System folder is automatically added to the Previous Systems folder (Previous System 2, 3, 4, and so forth).
For Mac OS X 10.5 or later: The files from your previous home folder here: /Previous Systems/Year-Month-Day_HourMinute. For example, a folder named “2007-11-08_1100″ would be created in the /Previous Systems/ folder if you did an installation at exactly 11 a.m. on November 8, 2007.
Now, the actual steps you will need in order to get your files back:
1. Open Disk Utility (Mac OS X 10.3, 10.4 or later) or Disk Copy (Mac OS X 10.2.8 or earlier). It is located in the Utilities folder, in the Applications folder.
2. If you use Mac OS X 10.2.8 or earlier, or Mac OS X 10.4 or later, from the File menu, choose New > Image from Folder or Volume. If you use Mac OS X 10.3 through 10.3.9, from the Images menu, choose New > Image From Folder.
3. A dialog sheet appears. Select the Previous System folder, then the Users folder, then the folder with the name of the former user.
4. Click Image.
5. Save the image file to your desktop (press Command-D), and name it whatever you wish.
6. When the process is complete, the image file appears on your desktop. Tip: The image can also be archived (saved) to a CD or DVD using Disk Copy, Disk Utility, or the Finder, if desired.
7. Drag any desired file from the mounted image to wherever you wish.
Recover a user’s account or files (Mac OS X 10.0 to 10.5)
If you, at some moment in time, decided that you no longer needed an account on your Mac and forgot to backup the data in its home folder, this is how Apple suggests to solve the problem:
1. If you just want to recover certain files from a deleted user, skip to step 5. If you want to resurrect everything from a deleted user account, choose System Preferences from the Apple menu.
2. Click Accounts.
3. Create a new administrator account – select the “Allow user to administer this computer” checkbox (you can head over HERE for detailed instructions on how to create it if you do not know how). You can use the same short name as the former user’s account if you wish – this account will essentially replace the former one. Note: If you don’t want this account to have long-term administrator access, deselect the “Allow user to administer this computer” checkbox after completing the rest of these steps.
4. Log out of your account, then log in as the new user account.
5. Go to /Users/Deleted Users, then double-click the deleted_user.dmg file (where deleted_user is the name of the deleted account) to mount the disk image on the desktop. Note: If the Home folder was protected by FileVault, you’ll need to enter the former user account’s password to proceed. In general, make it a point to turn off FileVault before deleting a user to avoid this situation.
6. If you only want certain items, drag those files onto your desktop to copy them. If you want to resurrect the deleted account, copy everything from the disk image to the same locations in your (new user’s) Home folder.
If this article has helped you, you have knowledge of other ways one can recover data on a Mac or even if you just want to share your opinion on this piece, use the comments section below.