How-To: Time Machine Backup on a Network Storage

How-To: Time Machine Backup on a Network Storage

Again, I’m writing for convenience here (i.e. for personal reference in the future). There’s a bunch of more helpful posts on the topic out in the information jungle (the Internet). This post is a summary of the command that worked for me based on this macosxhints discussion.

It’s been a while, yes. But now I’m jumping into the bandwagon.


To configure your machine to use Time Machine, go to System Preferences -> System -> Time Machine. Click on the slider to turn it on.

Then select the Disk to be used for backup. Normally, it will only detect local drives. If you are going to use network storage, like what i will do, make sure to issue this command. Time Machine should now list your network storage along with local disks.
defaults write TMShowUnsupportedNetworkVolumes 1

Now this is the usual error i get. This is the culprit why i did not continue setting up Time Machine before. If like me, you encounter the message “The backup disk image could not be mounted” after a few minutes of “preparing”, then issue the ff. command:
hdiutil create -size $SIZEg -fs HFS+J -type SPARSEBUNDLE -volname "Backup of $HOSTNAME" $HOSTNAME_$MACADDR.sparsebundle

$SIZE is the size of the backup volume; the appending g is for GB, m for MB and so on..
$HOSTNAME is the computer name
$MACADDR is well, the mac address of the machine, without the colons. This is the same mac address of the ethernet card. To check, go to System Profiler -> Network -> Ethernet, then copy the mac address field.

Mount your network storage (as AFP in my case).  Then copy the file created above.

cp -r $HOSTNAME_$MACADDR.sparsebundle /Volumes/Backup/

Open Time Machine settings from System Preferences. Select the NAS Volumes as backup disk. Set Options to select which folders not to backup. Then you’re all set.

So that’s it. You’re done.



Commands to use after changing the Logic Board:

cd /Volumes/Time Machine/Backups.backupdb
xattr -p MyMac

$ sudo fsaclctl -p /Volumes/Time Machine -d
$ sudo mv .00f9e8d7c6b5 .001a2b3c4f56
$ sudo xattr -w 00:1a:2b:3c:4f:56 Backups.backupdb/MyMac
$ sudo fsaclctl -p /Volumes/Time Machine -e

Note: This doesn’t seem to work for NAS. One reason probably is the mac address of the Sparse Bundle. I’ll give it another go sometime.

  • Jackie

    I do not understand the terminal command for the second part of your solution. The first part works, I can start Time Machine across the network but then get the error message after the “preparing” stage. Can you please be more specific for us non-unix people?

    Would create -size $SIZEg -fs translate to something like
    create -size 1g -fs or do I keep the $?

    HOSTNAME is the name of my computer or the network volume? (I assume it’s mine but I don’t want to assume anything).

    -volume Is this the entire path to the network backup volume?

    It would be very helpful to me if you could write out an entire example with sample size, volume and hostname information. Sorry but I’m not as Unix savvy as you. 🙂

    Thank you!

    • A short answer to your question:
      1. No need to keep the $ sign.
      2. HOSTNAME is the name of your computer, not the network storage
      3. Network VOLUME should be mounted on your local machine before you can use it for time machine. Make sure it is shared via AFP. Then connect through Finder: Go->Connect to Server. Server Address: afp://your.ip.add.ress

      Thanks for dropping by. 🙂

Comments are closed.