General Mac OS X Discussion General Apple and Mac OS X Discussion

Reply
 
LinkBack Thread Tools Display Modes
  (#1) Old
Junior Member
 
Posts: 3
Join Date: Feb 2009
Default Install done - I want a full, easy-to-restore backup - 02-27-2009, 02:13 PM

Now that (thanks to you all) I've finished the sometimes-harrowing, time-consuming, and importantly, borrowed-external-dvd-requiring os x install procedure on my new dell mini, I'd like to back up the whole thing. Basically, I'd like to open the back, plug a usb cable into the SSD, and run some command (I have easiest access to my mac laptop, so I can use dd or disk utility. I also have access to windows) that'll make a full image that I can easily restore (so I can, for example, install ubuntu, try it out, then switch back to mac os x in the time it takes for disk utility to do an image restore on the ssd). Will disk utility work for this and correctly capture all the partitioning e.t.c.? (For that matter, will dellEFI cause any kind of underlying incompatibility with dell's ubuntu install? I really doubt it since people dual boot, but confirmation would be good).

Thanks,
-Ross
Reply With Quote
  (#2) Old
Guru
 
meklort's Avatar
 
Posts: 1,353
Join Date: Feb 2009
Location: Colorado, USA
Send a message via AIM to meklort Send a message via MSN to meklort Send a message via Yahoo to meklort
Default Re: Install done - I want a full, easy-to-restore backup - 02-27-2009, 02:22 PM

If you have an external hdd or flash driver the size of your ssd, you can backup really easily.
What I do is this:
1) Open disk util
2) Create two partitions on the drive, the first will be for be the boot driver (if you have a flash driver for this it doesn't matter). The second driver will be a mirror of your current install, make sure its formatted HFS+.
3) Setup the first partition for booting (read the howto's, and you did it for the first install). Again, not needed if you have another boot cd or flash driver.
4) Use diskutils restore feature to restore from your main drive, select the ssd as the source, and you the second partition you created as the destination. Your may also want to check the erase button. Now just select restore.
5) After half an hour or so, you should have a working backup that you can boot to using the boot partition (just like you did in the install).

To restore the driver, you just do the same thing (minus the boot partition) and restore from the hdd to the ssd.

Also, I'm not sure if this will work, but you may be able to reinstall dell efi so that you don't need the boot partition.


Dell Mini 9 | Mac OS X 10.6.5 | 2 GB RAM | 32 GB Buffalo SSD | BIOS A05
Dell Mini 10v | Mac OS X 10.6.5 | 1 GB RAM | 160 GB HDD | BIOS A06
My Blog | NetbookInstaller code repository | NetbookInstaller Website | Want a Lockerz.com invite? message me.
Reply With Quote
  (#3) Old
Junior Member
 
Posts: 3
Join Date: Feb 2009
Default Re: Install done - I want a full, easy-to-restore backup - 02-27-2009, 02:32 PM

Thanks, though I was kindof hoping to have it work a little differently.

I'd like to have my image on my mac's harddrive in a dmg file (or something like it). So I could use disk utility to restore from that file on my mac's hard drvie, to the SSD (with the ssd plugged into my mac as an external usb drive). The mini would just be the passive recipient in this procedure. Would this work as I describe it? Would there by subtlety to how I created the backup image, or would it just be plug-the-ssd-into-the-mac, run-disk-utility, select the ssd, and hit some button (not sure which one) to create the image?

-Ross

P.S. what I'm trying to optimize for is the ability to throw ubuntu on it, then do a clean restore to mac os x, both without having to use a usb drive greater than 1 gig, or an external dvd (I have to give the ones I used back). Beyond that, I like to have my backups system-independent (so if the mini was stolen, I could order the same set of parts and restore), and browsable on other systems (a dmg would let me mount and poke around on my mac, if I needed a document or something).
Reply With Quote
  (#4) Old
Guru
 
meklort's Avatar
 
Posts: 1,353
Join Date: Feb 2009
Location: Colorado, USA
Send a message via AIM to meklort Send a message via MSN to meklort Send a message via Yahoo to meklort
Default Re: Install done - I want a full, easy-to-restore backup - 02-27-2009, 02:49 PM

You can backup the hdd to a dmg if you want, the restore process might be different. In linux you cal always just use dd to make a backup dd if=/dev/sda of=/mounted_usb/ssd.img
You cal also pipe the output of dd to gzip so that it compreses it before it is written to a drive.

To restore then you would use linux and run dd if=/mounted_usb/ssd.img of=/dev/sda.
If you compressed it you can use gzip to decompress and then pipe that to dd.


Dell Mini 9 | Mac OS X 10.6.5 | 2 GB RAM | 32 GB Buffalo SSD | BIOS A05
Dell Mini 10v | Mac OS X 10.6.5 | 1 GB RAM | 160 GB HDD | BIOS A06
My Blog | NetbookInstaller code repository | NetbookInstaller Website | Want a Lockerz.com invite? message me.
Reply With Quote
  (#5) Old
Junior Member
 
Posts: 3
Join Date: Feb 2009
Default Re: Install done - I want a full, easy-to-restore backup - 02-27-2009, 02:56 PM

Awesome - that's closer to what I'm after. I guess the only difference is the impenetrable-ness of a dd file (I can't browse it on my mac), and my insecurity about finding the right path for the device on my mac (I'm always worried I'll back up /dev/sda1 instead of /dev/sdb2 or something). Probably silly - the output file's size should be a pretty strong cue that I've gotten it right.

Now if only there were a way to flip a BIOS switch and use the ssd as a flash drive without unscrewing screws...
Reply With Quote
  (#6) Old
Expert Member
 
Posts: 692
Join Date: Mar 2009
Default Re: Install done - I want a full, easy-to-restore backup - 03-09-2009, 07:25 AM

May I suggest the rather easy to use built into OS X TimeMachine software?


Mini1: Vostro A90, Black, 2G, 1.3 Webcam, Bluetooth, 64G SuperTalent, OS X 10.6.4
Mini2: Mini9, Black, 2G, 0.3 Webcam, Bluetooth, 32G RunCore, OS X/Win 7, internal PCI-e SHDC Reader
Mini3: Mini10v. Black, 2G, Webcam, 640G HD, OS X 10.5.8/Win 7/Ubuntu [Hibernate w/NBI 0.8.3 RC4]
Dropbox Referral
Reply With Quote
  (#7) Old
Junior Member
 
Posts: 9
Join Date: Mar 2009
Default Re: Install done - I want a full, easy-to-restore backup - 03-09-2009, 09:37 AM

How about CCC? Carbon Copy Cloner?
Reply With Quote
  (#8) Old
Senior Member
 
Posts: 104
Join Date: Jan 2009
Default Re: Install done - I want a full, easy-to-restore backup - 03-09-2009, 06:04 PM

I actually do the very thing you're asking.

First I boot OS X on the Mini, then use Disk Utility to "Erase free space" on the mounted volume. This helps with compression later on.

Next I boot Parted Magic from a USB key. I connect an external USB drive, open a Terminal window, CD to the external drive and run:

Code:
dd if=/dev/disk# bs=1024 | bzip2 > filename.dmg.bz2
Of course you'd replace /dev/disk# with your actual device identification, which I think is /dev/sda for the internal SSD.

The dd command is piped through bzip2 to reduce the image size. The entire process typically takes 2-hours (mostly because of bzip2, I'd imagine) but in the end my compressed image was only around 3GB (yours will vary, but it should be much smaller than the full size of your hard drive). I plan on buying a 4 or 8 GB USB key so I can put Parted Magic and the backup image on it for easy restores while on the road.

To restore, you'd basically do the same thing. Boot Parted Magic, connected the USB drive and run:

Code:
bunzip2 < filename.dmg.bz2 | dd of=/dev/disk# bs=1024
A word of caution, dd is a dangerous command if you don't know what you're doing. It doesn't prompt you to confirm anything and sometimes the device names can be cryptic. Double and triple check your source and destination volumes before beginning so you don't accidentally write zeros across your entire drive.


Mini 10v (160 GB HDD, 1 GB RAM, OS X 10.6.2, NBI 8.3, BIOS A04)
Reply With Quote
  (#9) Old
Fat Tony
Guest
 
Posts: n/a
Default Re: Install done - I want a full, easy-to-restore backup - 03-09-2009, 06:37 PM

I think the OP wanted something like Ghost for windows. Too bad Ghost doesn't recognize HFS+ I know the problem with DD is that if you have a 64GB drive, even if it is only 15GB full, DD will grab the rest of the 49GB and if it's not all zero's it won't compress that well.

So then an additional question for the Mac gurus, is there any HFS+ util that can zero out all the unused space? This was bzip2 will make a smaller image from the free space.

I know that on windows, winternals made a program called sdelete.exe which would zero out all unused space.
Reply With Quote
  (#10) Old
Senior Member
 
Posts: 104
Join Date: Jan 2009
Default Re: Install done - I want a full, easy-to-restore backup - 03-09-2009, 07:37 PM

Quote:
Originally Posted by Fat Tony
I think the OP wanted something like Ghost for windows. Too bad Ghost doesn't recognize HFS+ I know the problem with DD is that if you have a 64GB drive, even if it is only 15GB full, DD will grab the rest of the 49GB and if it's not all zero's it won't compress that well.

So then an additional question for the Mac gurus, is there any HFS+ util that can zero out all the unused space? This was bzip2 will make a smaller image from the free space.
This is what my post detailed. When you use Disk Utility to zero out the unused space directly before running dd, you've essentially made it easy for bzip or bzip2 to compress the information. In your scenario the other 49 GB would be filled with null characters and therefore quite easily compressed.

You could do the same right from Parted Magic by running a command such as:

Code:
dd if=/dev/zero of=/mounted/volume/zero.null bs=1024
When dd finishes, delete the zero.null file. The reason I suggest running it in OS X is that HFS+ is read-only from within Parted Magic. However, you could do the same command within OS X's Terminal. The Disk Utility provides a simple GUI though, which is easier for some people.


Mini 10v (160 GB HDD, 1 GB RAM, OS X 10.6.2, NBI 8.3, BIOS A04)
Reply With Quote
Reply

« Best Buy 10v, OSX support questions | HELP! Boot Issue »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Copyright © 2008-2011 MyDellMini.com.