Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Matt-Man-Plus

macrumors regular
Original poster
Mar 20, 2008
142
0
Hello All,

I just upgraded to Mountain Lion and in doing so it wiped out a disk image I made in SL from a folder that I wanted to password protect. Basically, I made the folder, put the files in it and used disk utility to make an image from the folder. Once the image was made, I believe I may have deleted the folder (stupid, I know). To access the disk image, I would just open disk utility and it would show up there and I would mount it.

Now, I upgraded to Mountain Lion and that image is gone. I do have a Time Capsule with backups that go back for a few years. I'm hoping to find the folder in the trash and recover it but I don't know how to find it in Time Machine. If I click on the trash can from the dock and then enter Time Machine, It just brings me to the root of my user account. Anyone know how I can access the old trash folder in TM? I also have a Carbon Copy Clone as well but I'm not sure the disk image would be in there.
 

sammich

macrumors 601
Sep 26, 2006
4,305
268
Sarcasmville.
If you want to any folder in Finder, including hidden ones, you can press Command-Shift-G. From there you can either type the name (or the beginning of the name and press tab to fill in the rest, provided it's a unique name) of the folder to get to it.

So if you want the trash folder, you can use type '.Trash' (with the period) from inside any home folder. I can't recall if this works from inside the TM interface. But if not, you can open the folder of that backup by navigating to the location of the TM backup folder and finding the corresponding time.
 

Matt-Man-Plus

macrumors regular
Original poster
Mar 20, 2008
142
0
Thanks for the reply. The .Trash just comes up with "This folder does not exist".:confused: I tried this in several locations.
 
Last edited:

haravikk

macrumors 65832
May 1, 2005
1,501
21
Are you saying the disk-image has been deleted as well? Surely it'd be easier just to find the disk image in the Time Machine backup instead, from wherever you kept it?

I'm not sure Time Machine backs up .Trash files, or anything else starting with a period for that matter, except for .DS_Store and other similar items.

For example, I know that my own home folder is littered with .files for things like DropBox, but none of these are in my Time Machine backup.
 

Matt-Man-Plus

macrumors regular
Original poster
Mar 20, 2008
142
0
Something must have happened to the disk image during the upgrade to Mountain Lion. The folder that I used to create the image was deleted but for over a year I was able to mount the image and access the files, even though the folder was gone. Now when I open disk utility in Mountain Lion, the image doesn't show up like it used to in Snow Leopard.

So now I've resorted to trying to find the actual folder in the trash, via TM. Is there any other way to find this folder or image?
 

Mal

macrumors 603
Jan 6, 2002
6,253
30
Orlando
Where is the .dmg file actually stored? The list in Disk Utility may have been cleared, but simply double-clicking the file should mount it as normal.

jW
 

haravikk

macrumors 65832
May 1, 2005
1,501
21
Now when I open disk utility in Mountain Lion, the image doesn't show up like it used to in Snow Leopard.
That just means Disk Utility no-longer knows about it, but that list isn't an up-to-date picture of disk-images, it's only the ones that Disk Utility knows about, so after an OS update the list will have simply been cleared.

Unless you stored the disk image in a very strange location, it should still exist somewhere, if you remember what the image was called a Spotlight search of your Time Machine volume should be enough to find out where it was, once you know that just go into the latest backup and look for the copy in there, to make sure you get the most recent version.

If you're still struggling, then you could try looking in your Time Machine backup for your old com.apple.DiskUtility.plist file (<your user folder>/Library/Preferences) as this is where Disk Utility stored the list of disk images that appeared in its sidebar, and should give you the path(s) of where they were stored.
 

Matt-Man-Plus

macrumors regular
Original poster
Mar 20, 2008
142
0
I'm very appreciative of your responses. Thank you very much for your help. =)

The actual folder that was used to make the disk image was deleted, so I can't just click on the file to mount the image because it doesn't exist anymore. After the folder was deleted, I could still get to the disk image just by opening disk utility. How this worked I don't know but I was able to mount the image for over a year after deleting the original folder. Maybe it was referencing the folder from the trash, I dunno?

I deleted the folder because I didn't/don't understand how disk images work apparently. I thought once you made a disk image, it "reserved" a section of your HDD, sort of like a partition and you didn't need the original file anymore because it was copied over. My thought was that I made the image in a separate location and didn't need the original folder anymore. The fact that I could access this image for so long after I deleted the folder reinforced that thought.

I will check the .plist file to see if I can find the location. Thanks again for the help.
 

Matt-Man-Plus

macrumors regular
Original poster
Mar 20, 2008
142
0
Ok I've found the .plist file and tried to open it but it's unreadable. I opened it with the default text edit app. Is there another app I can open this with to actually read it?
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,482
16,197
California
Ok I've found the .plist file and tried to open it but it's unreadable. I opened it with the default text edit app. Is there another app I can open this with to actually read it?

If you install Apple's free Xcode developer tools, that will install a plist editor in your /Applications/Utilities folder.
 

haravikk

macrumors 65832
May 1, 2005
1,501
21
Ok I've found the .plist file and tried to open it but it's unreadable. I opened it with the default text edit app. Is there another app I can open this with to actually read it?
If you don't want to take the time to install XCode (it's a big install just to open one file) then you can convert the file from a binary .plist to a plain-text one as follows:
  1. Copy the file somewhere, e.g - your desktop (which I'll assume).
  2. Open the Terminal (/Applications/Utilities/Terminal)
  3. Enter the following into the Terminal (you can just copy/paste):
    Code:
    plutil -convert xml1 ~/Desktop/com.apple.DiskUtility.plist
  4. Hit return to execute the command (it doesn't return any visible result).
If all goes well the file should now be readable by TextEdit, and you can find the line that looks like:
Code:
<key>DUSavedDiskImageList</key>
Below this will be a list of disk-images that Disk Utility was aware of.

So long as you found the correct version of the .plist in your Time Machine backup, the list should contain the file you were using to open your folder, and hopefully allowing you to locate it within your backup, either by rummaging around the time machine drive, or opening the path on your system and entering time machine to skip back until you find the file to restore.
 
Last edited:

Matt-Man-Plus

macrumors regular
Original poster
Mar 20, 2008
142
0
^^^^^ This info allowed me to find this elusive disk image. THANK YOU!!!
You have no idea how much trouble this saved me. Long story short is the image somehow (inadvertently) was moved right after I created it. I now have my files back. Thanks again for your help:)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.