Time Machine and ReadyNAS solution (Two Mac method)

Please post anything pertaining to Mac and OS X compatibility issues here.

Moderator: Han Solo

Similar topics


Time Machine and ReadyNAS solution (Two Mac method)

Postby drakino » Sun Oct 28, 2007 5:14 pm

I'm starting this new thread so that people looking to a solution can find it quicker, while the other thread can continue on as the overall discussion thread.

A few of us here have pieced together a solution that requires the following:
  • An external USB or Firewire drive with enough space for a complete backup
  • Two separate Lepoard running Macs on the same network
  • ReadyNAS unit of some sort
To make this easier, lets call the two Macs Mini and MacBook. The steps below are to get Time Machine working for the MacBook.

Starting out, run through these steps on the Mini (Mac 1)
  1. Connect the external drive to the Mini
  2. Run Disk Utility, and click the external drive, then click the erase tab.
  3. Select Mac OS Extended (Journaled) as the type.
  4. Name the Disk something you like, using no spaces. I picked TM_MBPro as this will hold my MacBooks files
  5. Click Erase and wait till the process finishes
  6. Close Disk Utility, and open System Preferences
  7. Go to Sharing, and ensure File Sharing is checked
At this point we are done for now working on the Mini. The following steps should be done on the MacBook (Mac 2):
  1. Go to the Finder, and find the Mini on the left under Sharing
  2. Click Connect As, and type in the username and password of an account on the Mini
  3. You should now see a TM_MBPro share. Click it to open.
  4. Open System Preferences and go to Time Machine
  5. Click Choose Backup Disk, and TM_MBPro on Mini should appear, click it
  6. Wait for Time Machine to do the initial backup
You may want to take a coffee break now, as this may take anywhere from a few minutes to a few hours depending on the speed of your network and the amount of data you have. Once the initial backup completes, follow the steps below:
  1. On the MacBook, open System Preferences
  2. Pick Time Machine and turn backups off, then close System Preferences
  3. In the Finder, eject the TM_MBPro disk
Now you need to create the share on the ReadyNAS:
  1. Open the FrontView web page, go to Shares and Add Shares
  2. Name the share TM_MBP for now (intentionally leaving off a few characters, this makes tracking what is where easier)
  3. Click Apply, then go to Shares, Share Listing
  4. I'd recommend going into CIFS, NFS and any other non AFP protocol and disabling access to the share, just to prevent any issues
  5. Next, go into the AFP properties for the TM_MBP share and set permissions. I personally denied everyone access, then added only my username to the write list. This may vary depending on how your ReadyNAS is configured.
  6. Make sure to apply any changes and for now close FrontView.
Back on the Mini (Mac 1), do the following
  1. In the Finder, select the Go menu, and Connect to server
  2. Type in "afp://<ip of ReadyNAS unit/" and hit Connect
  3. Type in your username and password, then select the TM_MBP share
  4. Open Terminal. This is where we are now going to mirror the initial backup over.
  5. In the terminal, type
    Code: Select all
    sudo rsync -xrlptgoEv --progress --delete /Volumes/TM_MBPro/ /Volumes/TM_MBP

    What this is doing is running rsync with all the recommended options for preserving Mac specific metadata, the command comes from the Carbon Copy Cloner site. When asked for a password, type yours in.
  6. This process will take a bit, as it is copying your initial backup over the network to the NAS. Once it is complete, run the command again to verify, it should complete in a matter of seconds.
    Ignore any errors like this:
    Code: Select all
    rsync: chown "/Volumes/TM_MBP/MacBookPro_001611111111.sparsebundle/bands/25c" failed: Operation not supported (45)
    , this is the rsync process trying to set some exact permissions that the NAS isn't allowing, my backups worked fine with this.
  7. Once complete, I'd recommend running disk utility and erasing the disk to ensure that if it is connected again, Time Machine doesn't see it and get confused.
  8. Also eject the network drive "TM_MBP" when complete.
Back on the MacBook (Mac 2), we have just a little more to go to finish this up.
  1. Open FrontView, and go to Shares, Share Listing
  2. Rename the TM_MBP to TM_MBPro, matching what you called the external disk earlier.
  3. Apply the changes and wait for FrontView to indicate it is complete
  4. In the Finder, click on Go, Connect to server
  5. Type in "afp://<ip of ReadyNAS unit/" and hit Connect
  6. Type in your username and password, then select the TM_MBPro share
  7. Now, open System Preferences and go to Time Machine
  8. Turn Time Machine back on, and it should look similar to the screenshot below.
  9. Clicking Change Disk shows nothing, but the existing mappings seem to work

You can at this point close System Preferences, and click the Time Machine icon in the dock to verify it still works. At this point you should be good to go, though I would recommend adding the NAS share to your Login Items, so that it mounts automatically in the future. Time Machine doesn't automount the disk when it needs to, so if the mount is not present, backups will not occur and old documents cannot be retrieved.

Below is a screenshot of this working for me, note the Network Disk icon as the disk, and the large size.

If you want to set this up for the second mac, follow the same instructions above, reversing the roles. I'd recommend creating a new share for each machine that will backup, and locking down security to only allow the user of the machine to get to their share if this is being used in a multi user environment.

I take no responsibility for anyones data with this. It is your job to verify this works, and if not, ensure your data is backed up in other ways.

Image
User avatar
drakino
Advanced ReadyNAS User
 
Posts: 110
Joined: Sun Sep 02, 2007 12:15 pm
Location: Austin
ReadyNAS: NV+

Postby agorski » Wed Oct 31, 2007 12:06 pm

This hint at MacOSXHints may explain why your method works:

10.5: Make Time Machine work with AirPort and AFP disks

(Sorry about the lack of a U R L. The Infrant forum software won't let me post one due to my newbiness.)

Note the comments there that warn about the reliability of this method. One poster even said that you can't restore from this backup. I don't have Leopard yet so I can't test it.
User avatar
agorski
ReadyNAS Newbie
 
Posts: 14
Joined: Fri Oct 13, 2006 9:56 am

Postby jig » Wed Oct 31, 2007 5:56 pm

agorski wrote:Note the comments there that warn about the reliability of this method. One poster even said that you can't restore from this backup. I don't have Leopard yet so I can't test it.


I've restored from one of these backups to test it out. Worked fine.
You just have to get the sparseimage back to an external drive so the installer will see the Time Machine image.
jig
ReadyNAS Newbie
 
Posts: 4
Joined: Sun Oct 28, 2007 11:41 am

Postby pjc » Wed Oct 31, 2007 6:32 pm

An interesting data point:

Running v3.01c1-p6, when I mount my backup share manually using AFP (via cmd-K), the icon for the server is a PC, and getting info on the newly mounted server says "PC Server". If I select the mounted share, and get info, it says "AppleShare" for its type.

I did the above with a backup account that only has access to the backup share.

I then mount my media share manually using SMB (again via cmd-K) using my account that has access to all my shares, Leopard mounts all the shares my account has access to, not just the one I selected by smb : // u r l. The newly mounted shares are all listed as "SMB (Other)" when I get info.

However, this dual mounting confuses the Leopard sidebar a little bit, as the icon now turns into the same icon used for a Mac, but when I get info on the server it says "Server" for its type. (For reference, if I get info on my wife's Mac, it says "Mac Server".)

So apparently there's something in AFP that tells Leopard whether it's talking to a Mac or not. Has anybody tried backing up to a a pre-Leopard Mac using AFP? Is Leopard really looking for Leopard? (Maybe that's the . com.apple.timemachine.supported file.)
pjc
ReadyNAS Newbie
 
Posts: 34
Joined: Thu Apr 12, 2007 1:11 pm

Postby drakino » Wed Oct 31, 2007 11:35 pm

jig wrote:
agorski wrote:Note the comments there that warn about the reliability of this method. One poster even said that you can't restore from this backup. I don't have Leopard yet so I can't test it.


You just have to get the sparseimage back to an external drive so the installer will see the Time Machine image.


With a little terminal elbow grease, moving the sparse image off the NAS isn't even necessary. Notice how the Leopard installer has the Airport icon in the corner? Thats an indication we can get out to the network, and with a few steps restore completely from backup. Those steps are:

1. Boot off the Leopard DVD and choose your language when prompted.
2. Connect to your wireless network with the Airport icon in the Menu Bar, or connect an ethernet cable
3. Go to the Utilities menu, and select Terminal
4. Type in "mkdir /Volumes/<Name of your Time Machine Share>". Using my example above, this is "mkdir /Volumes/TM_MBPro"
5. Now we need to mount the file server. To do this, type:
Code: Select all
mount_afp afp://<username>:<password>@<NAS IP>/<name of share> /Volumes/<name of share>
An Example:
Code: Select all
mount_afp afp://drakino:password@192.168.0.1/TM_MBPro /Volumes/TM_MBPro

6. Go to the Terminal menu and select Quit
7. Go to the Utilities menu and pick the Restore from Backup option

At this point Time Machine restoration will begin once you confirm the operation and the source Time Machine disk.
User avatar
drakino
Advanced ReadyNAS User
 
Posts: 110
Joined: Sun Sep 02, 2007 12:15 pm
Location: Austin
ReadyNAS: NV+

Postby jig » Wed Oct 31, 2007 11:51 pm

drakino wrote:With a little terminal elbow grease, moving the sparse image off the NAS isn't even necessary.


I had attempted this when I did my restore. I made it as far as the mount command but couldn't get it right. But now I know, thanks.
jig
ReadyNAS Newbie
 
Posts: 4
Joined: Sun Oct 28, 2007 11:41 am

Postby pjc » Thu Nov 01, 2007 7:03 pm

Can you tell us what files your procedure creates on the drive? I'm trying to do this by hand (with only a single Leopard machine) and haven't had any luck with:

.001122DDEEFF (MAC address of my Leopard client)
. com.apple.timemachine.supported (without the space)

I'm not sure why this isn't working...

(I'm also not sure why the spam filter is still refusing to let me insert things that look like links!)
pjc
ReadyNAS Newbie
 
Posts: 34
Joined: Thu Apr 12, 2007 1:11 pm

Postby pjc » Thu Nov 01, 2007 7:18 pm

Doing a little digging, I've also noticed the following:

> sudo fs_usage -w | grep 'System P'
22:01:51.554 statfs /Volumes/test 0.000022 System Preferenc
22:01:51.554 open F=12 (R_____) /Volumes/test 0.000037 System Preferenc
22:01:51.555 fcntl F=12 [ 45] <FULLFSYNC> 0.000898 W System Preferenc
22:01:51.555 close F=12 0.000031 System Preferenc

It looks like Time Machine might be looking for support for the F_FULLFSYNC fcntl. The ReadyNAS is returning ENOTSUP.

This happens when mounting /Volumes/test (via AFP, dedicated share, on my ReadyNAS) and when clicking on the "Choose Backup Disk..."

For reference, it's similar when mounting a share from the Tiger server, except fcntl returns [ 22] (EINVAL). What does Leopard return?
pjc
ReadyNAS Newbie
 
Posts: 34
Joined: Thu Apr 12, 2007 1:11 pm

Postby drakino » Thu Nov 01, 2007 7:55 pm

pjc wrote:Can you tell us what files your procedure creates on the drive? I'm trying to do this by hand (with only a single Leopard machine) and haven't had any luck with:

.001122DDEEFF (MAC address of my Leopard client)
. com.apple.timemachine.supported (without the space)


Those look right, however the MAC address file is 16 bytes of binary for me, and I'm not sure what it is. The .com file is a 0 byte file, so a simple touch command is all that is needed for it.

Code: Select all
21:39:23.801  statfs                                 /Volumes/backup                                                                         0.000011   System Preferenc   
21:39:23.801  open              F=15       (R_____)  /Volumes/backup                                                                         0.000020   System Preferenc   
21:39:23.804  fcntl             F=15  <FULLFSYNC>                                                                                            0.003066 W System Preferenc   
21:39:23.804  close             F=15                                                                                                         0.000032   System Preferenc   


Thats what I get when having Time Machine see a mounted disk on my other Leopard mac.
User avatar
drakino
Advanced ReadyNAS User
 
Posts: 110
Joined: Sun Sep 02, 2007 12:15 pm
Location: Austin
ReadyNAS: NV+

Postby pjc » Thu Nov 01, 2007 8:19 pm

drakino wrote:Those look right, however the MAC address file is 16 bytes of binary for me, and I'm not sure what it is.

Ah, I didn't realize the MAC file wasn't empty. I bet it's a GUID. Is it "00 53 46 48 00 00 AA 11 AA 11 00 30 65 43 EC AC"? (48465300-0000-11AA-AA11-00306543ECAC is the GUID Partition Table type for HFS+) If it looks nothing like that, it might be the GUID unique to the partition. (Are the last 6 bytes your MAC address?)
Thats what I get when having Time Machine see a mounted disk on my other Leopard mac.

It looks like the fcntl request succeeded. That would explain the Leopard requirement, and it seems to be a fairly important one. Did anything else follow before Time Machine listed it as an available drive?

Also, try omitting the grep -- do you see any accesses of either the .MAC or the timemachine.supported files?

(For others' benefit, the F_FULLFSYNC fcntl performs an fsync() and then requests that the drive flush any cache to disk. I'm guessing Apple wants some guarantee from the target drive that the backup is really on the disk. I wonder if the netatalk or Infrant guys know about this yet.)
pjc
ReadyNAS Newbie
 
Posts: 34
Joined: Thu Apr 12, 2007 1:11 pm

Restoring Using the Time Machine Browser

Postby wileyc » Sun Nov 04, 2007 11:44 am

The way to restore using the Time Machine Browser is simple yet not obvious.

1. Browse to the sparseimage file on the AFP volume you used to backup
2. Open it with DiskImageMounter.app which should be the default. This will mount the sparseimage and the mounted disk will appear on your desktop name something like "Backup of MyComputer".
3. Right click on TimeMachine Doc Icon and Choose "Browse Other Time Machine Disks"

The Time Machine Browser will open and you can restore away
wileyc
ReadyNAS Newbie
 
Posts: 1
Joined: Sun Nov 04, 2007 11:39 am

Re: Restoring Using the Time Machine Browser

Postby drakino » Mon Nov 05, 2007 11:13 am

wileyc wrote:The way to restore using the Time Machine Browser is simple yet not obvious.

1. Browse to the sparseimage file on the AFP volume you used to backup
2. Open it with DiskImageMounter.app which should be the default. This will mount the sparseimage and the mounted disk will appear on your desktop name something like "Backup of MyComputer".
3. Right click on TimeMachine Doc Icon and Choose "Browse Other Time Machine Disks"

The Time Machine Browser will open and you can restore away


With my method, and the method of changing the System Preference setting, this isn't necessary. Clicking the Time Machine icon just works. The restore information above is for when you boot off the Leopard DVD and want to do a full system restore from there, IE, for when a drive failure occurs.
User avatar
drakino
Advanced ReadyNAS User
 
Posts: 110
Joined: Sun Sep 02, 2007 12:15 pm
Location: Austin
ReadyNAS: NV+


Return to Mac / OS X

Similar topics


Who is online

Users browsing this forum: No registered users and 1 guest