10.5: Store Time Machine backups on an AFP NAS

Nov 07, '07 04:30:00PM

Contributed by: Drakino

I was a bit bummed to find my ReadyNAS NV+ wasn't seen by Leopard for Time Machine backups, but I found a workaround. This does require two machines running Lepoard, so if you only have one, beg and plead with a laptop owning friend to borrow his for a few hours.

[robg Update: The original content of this hint can be found in the "Read More" area below. However, since it was published, a much simpler method was discovered, as noted in the comments. Open Terminal, and type:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Mount the share in the Finder, and it should show in the Time Machine System Preferences panel. Note that this is unsupported, and the data you risk is your own!]

Please see the comments -- this method will not work as expected, and backup data will be lost when the drive fills up. This is not a recommended hint!

To get started, here is what is needed:

To make this easier, lets call the two Macs Mini and MacBook. The steps below will get Time Machine backups 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 NAS. Each NAS is different, so make sure you set up a share based on the following points: 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://Type in your username and password, then select the TM_MBP share
  3. Open Terminal. This is where we are now going to mirror the initial backup over.
  4. In the terminal, type
    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.
  5. 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:
    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.
  6. 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.
  7. 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. Using your NAS configuration tool, rename the TM_MBP share to TM_MBPro, matching what you called the external disk earlier.
  2. In the Finder, click on Go, Connect to server
  3. Type in "afp://Type in your username and password, then select the TM_MBPro share
  4. Now, open System Preferences and go to Time Machine
  5. Turn Time Machine back on, and it should start an incremental backup soon
  6. Clicking Change Disk shows nothing, but the existing mappings seem to work as long as you don't change disk to None.
You can at this point close System Preferences, and click the Time Machine icon in the dock to verify it still works. Now 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.

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.

[robg adds: Please note the warning at the end -- you'll be using Time Machine in a capacity that Apple doesn't officially support. If it were my data, this would not be my only backup solution, just in case things go horribly wrong at some point. I have not tested this one.]

Comments (14)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20071028173642747