3 Kasım 2015 Salı

NETWORK TIME MACHINE WITHOUT A NETWORK

NETWORK TIME MACHINE WITHOUT A NETWORK

One of the realities of life is that, sometimes things don’t the way you plan them. Yes, even a “genius” has his off days. So it was with my install of the Yosemite Beta. After spending hours cloning my hard drive so that I could install it on a separate partition, I somehow managed to install it on my main hard drive and the separate partition too. I have NO idea how I managed to screw this up that badly, but I did it.
At first I thought I was going to dodge a bullet. Everything seemed to be running great. But as I tried other apps it became apparent that some of the mission critical apps I use were completely unstable or unbootable. Obviously I expected this to be the outcome on a beta version of the OS.  Normally I would have rebooted onto my main hard drive and things would have been fine, but I didn’t have one to boot to.

TIME MACHINE TO THE RESCUE

Thankfully I have a Mac mini that acts as a network based Time Machine. By now you should not only be familiar with Time Machine, you should be using it religiously. What you might not know is that you can use Time Machine to back up multiple Macs across the network, just like the more expensive Time Capsule. There are two ways to make your own Time Capsule for less.
  • The first way is to use an AirPort Extreme that was made in the last 4 or 5 years and a USB Hard drive. I like the small bus powered drives based on laptop hard drives, but there is nothing stopping you from slapping on a Multi-terabyte array, as long as it has a USB port.
  • The second way is to set up an old Mac as an OSX Server. In my case I have a 2009 Mac mini that I bought specifically to be used as a server, but any machine that can boot 10.6 or newer can be used (although, unless you have access to 10.6 Server disks it’s going to cost you an arm and a leg to buy them, so since 10.7 and up are free, I’d recommend that the machine be able to boot 10.7 and up if it is to be cost-effective). Once you have the Server software installed ANY storage device that can be attached to the Mac can become a location for Time Machine to back up to.
This setup is fantastic, especially if you have  a MacBook Pro, or a McBook Air since ether can be backed up wirelessly through the network instead of having to lug around a backup drive.  Look Mom, No Cords!  As with everything there is a couple of small catches when using Time Machine this way.
  • Non-Bootable Disk– Unlike the single machine Time Machine, the networked Time Machine doesn’t create a bootable recovery partition on the hard drive you are backing up to.
  • Image Files vs. Folders– The network Time Machine saves the backups of a specific machine as a disk image, while the single machine saves the info in folders that can be readily accessed.
Under normal circumstances this wouldn’t be an issue.  To recover a network Time Machine backup you would boot into the recovery partition of the machine you want to restore, click restore from Time Machine, connect to the network Time Machine, select the name of the machine you want to restore, and away you go.  Unfortunately the Beta updated the recovery partition on my hard drive.  I could see the Time Machine Server, but I couldn’t connect to it.  In my case the problem is fairly easy to solve.  I could just boot from the recovery drive of another hard drive that had OSX Mavericks on it, and then perform the above steps.  But what if the server itself was down, or the network was damaged/unavailable, or maybe the USB connection is faster than the network (think USB 3 vs. Fast Ethernet). What then?  How do you recover the info without using a network?

THE PROBLEM

The problem breaks down into  two sub-problems.
  1. Getting the computer booted into recovery mode.  We need to be in recovery mode because the Time Machine recovery program is only accessible in that mode.
  2. Getting the Time Machine recovery program to think that a network backup is a single machine backup.  The Time Machine recovery program expects to see disk images when it connects to a network backup, and a folder structure when it restores form a single machine backup.  The trick is to make the Time Machine recovery program think that a disk image is not a disk image, but an actual hard disk.

HERE’S HOW YOU DO IT

1.  GET THE NETWORK BACKUP DATA.
You need to get the disk image of the machine you wish to restore onto some type of portable media.  In my case, I have a 4 TB external drive that I use to store the backup images on.  So I just shut down Time Machine on the Server,  and disconnected the external drive.  If the image was on an internal HD or some non-transportable, external device (like a rack mounted array), you are going to have to copy the disk image file (see next paragraph) to something that can be plugged into the computer you want to restore.  I’d suggest a USB hard drive.
The file you need is the file with the same name as the Bonjour name of the computer.  In my case the Bonjour name for my computer is HAL.local.  So I only need the HAL.dmg file.  Unless you have this info written somewhere you are likely going to have to go to the other computers using the network Time Machine and look up their names.  You can find the name at the top of the Sharing preferences in the System Preferences > Sharing.
2.  GET YOUR MACHINE INTO RECOVERY MODE.
Once you have the device with the image file you need on it, plugged into the mac you need to restore, you will have to get the machine booted into Recovery Mode.  There are numerous ways to do this.  I’ll go over three of them
  • Reboot using Cmd+R:  If you haven’t hosed up your recovery partition, you can reboot the machine and hold down the Command and the R keys at the same time until you see the Apple logo screen.
  • Use/Make an emergency boot disk:  If you are like me you have a couple hard drives around with versions of OSX installed on them.  You can simply use one of them to get booted into recovery mode (See above about Cmd+R).  If you don’t have an emergency disk, you are going to need 3 things.  1) An  8GB or larger Flash Drive, 2) someone with OSX 10.7 or higher installed on their computer, and 3) DiskMaker X.  After installing DiskMakerX on your friend’s computer you can follow the prompts and you will have an emergency drive.
  • Use someone else’s Time Machine Backup:  Since a single machine’s Time Machine disk is bootable, you can borrow it to boot into recovery mode  (See above about Cmd+R).
 3.  GET THE DISK IMAGE MOUNTED.
The Time Machine Recovery program expects to see a hard drive with a special folder attached to the Mac you want to restore.  Unfortunately the network Time Machine doesn’t store the backups this way.  Since the special folder is being stored in a disk image, we need to get the image mounted so that the recovery program will think it is a hard drive connected to our Mac.  Normally we could just double-click on the image file and it would automatically mount.  But recovery mode is not a full version of the OS.  Since there is no Finder, we can’t just double-click.  This is where things become a bit complex, I have created a video showing the steps below.  You can find it in the near the bottom of this post.
  1. Click on Disk Utility.
  2. Click the Continue button.
  3. When Disk Utility comes up, click the name of the hard drive that has the disk image file on it.
  4. Click the Restore tab.
  5. Click the Image button.
  6. Click on the name of the hard drive with the disk image on it.
  7. Find the disk image file and click on it.
  8. Click the Open button.
  9. Find the DMG file in the left column.
  10. Click the DMG.
  11. Click Open.  You will get a message that says the image is mounting, just wait until it goes away.
  12. Quite Disk Utility
4. RESTORE FROM BACKUP.
At this point you should be back to the main recovery mode screen.  Now that we have what the Recovery Time Machine program expects to see, we can finish this up just like a single machine recovery.
  1. Click on Restore from Time Machine Backup.
  2. Click the Continue button.
  3. When the Restore program comes up, click the Continue button.
  4. Select the Disk image icon.
  5. Click the Continue button.
  6. Select which Backup you want to restore and click the Continue button.
  7. Select the drive to restore to.
  8. Click the Continue button.  A warning pane will drop down to tell you that you are going to erase the drive.
  9. Click the Continue button.

PMGTV: NETWORK RESTORE VIDEO

WRAP UP

Once the restore begins it will likely take forever. In my case I did 500GB in about 4 and a half hours.  Your mileage will vary. Obviously this is a bit of a propeller head post. If you are the type that learns better by seeing it done, check out the video. I hopefully you will never have to go through all this to get your data back. Remember, BACKUP, BACKUP, BACKUP!

https://www.personalmacgeniuses.com/2014/08/30/network-time-machine-without-a-network/#.VjnFbn7hCUk

Hiç yorum yok:

Yorum Gönder