Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Store Time Machine backups on an AFP NAS System 10.5
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:
  • An external USB or Firewire drive with enough space for a complete backup
  • Two separate Lepoard running Macs on the same network
  • NAS unit of some sort that supports AFP. SMB, and other protocols will not work
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:
  • Name the share TM_MBP for now (intentionally leaving off a few characters, this makes tracking what is where easier)
  • I'd recommend going into CIFS, NFS and any other non AFP protocol and disabling access to the share, just to prevent any issues
  • Next, go into the AFP properties for the TM_MBP share and set permissions. Restricting it to the user of the machine in multi user environments is probably best.
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.]
    •    
  • Currently 2.63 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (8 votes cast)
 
[107,751 views]  

10.5: Store Time Machine backups on an AFP NAS | 14 comments | Create New Account
Click here to return to the '10.5: Store Time Machine backups on an AFP NAS' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Store Time Machine backups on an AFP NAS
Authored by: bgreenlee on Nov 07, '07 05:33:18PM

It's a hell of a lot easier than that. Just enter:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

in Terminal, and your network drives will show up when you go to pick a drive in Time Machine. All caveats about doing something that Apple doesn't seem to want you to do apply, though.



[ Reply to This | # ]
Store Time Machine backups on an AFP NAS
Authored by: wreleven on Nov 07, '07 05:43:47PM

Wow - now that is exactly what I was looking for!



[ Reply to This | # ]
Store Time Machine backups on an AFP NAS
Authored by: Drakino on Nov 08, '07 09:54:34AM

Agreed. The preference change makes this whole procedure not really needed anymore. I had thrown this all together pretty quickly after Leopard came out, and before the hidden preference was discovered.

One thing I haven't tested though is to see how the preference affects Leopards ability to see a share booting off the DVD for a complete restore. Using the method above, it showed up as long as I used Terminal to mount the disk first (mount_afp).



[ Reply to This | # ]
first hint worked here, not the second
Authored by: Herve5 on Nov 10, '07 10:33:54AM

I have an iomega NAS server here, and when I tried the "unsupported = 1" prefs change the NAS volumes appeared in Time Machine but I systematically got an error in creating the backup files; on the contrary your longer step-by-step worked perfectly :-)



[ Reply to This | # ]
Be very careful with AFP!
Authored by: dbs on Nov 07, '07 06:31:42PM

Apple may have added some multi-linked file support HFS+/AFP to get TimeMachine to work. (I don't know if directory hard links work before 10.5, for example.) If this is the case, you'd better be sure that the AFP server you're using supports this or you may get incomplete/invalid backups. One way around this is to use a disk image, but that may be much much much slower. (And at least on Intel 10.4 there's a pretty nasty memory leak with large disk images.)



[ Reply to This | # ]
Be very careful with AFP!
Authored by: hbp4c on Nov 07, '07 07:27:24PM

Yes, hard linked directories work in 10.4. Not sure about 10.3, I haven't tried anything there.

If you're on 10.4, you can compile the gnu version of coreutils and together with rsync you can build a home-brew version of time machine.



[ Reply to This | # ]
Be very careful with AFP!
Authored by: Drakino on Nov 08, '07 09:56:42AM

This method forces a disk image to be created, as a sparsebundle. It seems Leopard does this automatically over a network, even when talking to another Leopard machine.



[ Reply to This | # ]
how do you submit a request for enhancement to apple?
Authored by: bloodnok on Nov 22, '07 08:15:01AM

using an afp/hfs+ nas was exactly how i wanted to use time machine. i'd heard about other limitations of the code & this hint reveals another. that there's an unsupported workaround means that it shouldn't be too difficult for apple to make this an official method. i can understand their reluctance - difficult enough to warrant people's usb/firewire drives let alone a nas - but it'd be great if they'd make this an advanced configuration option for those of us willing to give it a go.

so how does one request this?



[ Reply to This | # ]
how do you submit a request for enhancement to apple?
Authored by: xcgr on Mar 07, '08 01:00:12PM
how do you submit a request for enhancement to apple?
Authored by: bloodnok on Mar 26, '08 09:00:04PM

nope. that one just goes into a black hole (or if you're a young kid, you'll get a nastygram from apple legal telling you to bug out). apple is no worse than most firms - it's difficult to make a formal request for enhancement of many products ...



[ Reply to This | # ]
Store Time Machine backups on an AFP NAS
Authored by: Schwie on Nov 23, '07 08:40:50AM
Serious Bug here...
Authored by: dbs on Nov 27, '07 02:51:15PM

I tried this to a Buffalotech NAS using AFP. It kind of works, but not well at all.

Here's the problem I had: when your disk fills up and it goes to delete old backups it screws things up. It succeeds in deleting the old backups (unlike SMB shares) but you loose everything except the most recent backup from the GUI. They're still there on the disk (as far as I can tell). So be forewarned: at least on my AFP NAS this is not an acceptable solution.

(To test this you can make a sparsebundle in the Disk Utility with a small fixed size and name it the same as the one TM makes then tell it to backup just a folder (exclude everything else) and change the name of the folder until it fills up. You can then watch it delete backups and see if it actually works for you. After about 5 old backup deletions it stopped working in the GUI for me.)



[ Reply to This | # ]
Serious Bug here... (no longer)
Authored by: adamcr on Dec 14, '08 08:43:47AM
This bug used to be around until Apple released Time Machine and AirPort Updates v1.0. Now it's no longer a problem. I verified this and you can see my logs on my Time Machine blog.

Cheers, Adam

[ Reply to This | # ]
10.5: Store Time Machine backups on an AFP NAS
Authored by: theosib on Mar 15, '10 06:17:28PM

It is possible for the time machine sparsebundle to get corrupted if you're backing up to an SMB share and you put your notebook to sleep.

The solution is here:

http://www.macosxhints.com/article.php?story=20081115172028293

This sets up a script that causes the backup volume to be safely ejected when you put the computer to sleep. Problem solved.



[ Reply to This | # ]