Sunday, 3 February 2008

Time Machine Wireless Backup without Time Capsule

Now updated with all necessary information for 10.5.5!

I upgraded to Leopard with one of the main reasons being to take advantage of Time Machine.

My previous backup routine was to rsync important documents to a remote server on an hourly basis. Whilst this works well, it’s no good for large files like my iPhoto or iTunes libraries, and it relies on my choosing the right files to backup. It was also subject to network connectivity both on my Mac and the remote site — and keeping track of when the backup was working or failing was a pain in the butt.

Now I simply leave my Mac on for a while when I’m at home and Time Machine will make sure that everything is stored on my home network. I’m confident that the backup has worked as I can see the old data through the Time Machine interface. Large files are only copied when they’re changed and then only over my home network.

Although I’m using my wireless network for transfer (and the wireless router only does 802.11g not n), one of the surprises in this setup was that it didn’t take that long to do the first backup. I left it going overnight and it had finished another couple of backups by the following morning. This gives me confidence that if a machine goes completely dead, it won’t take more than a day to restore from scratch.

I’m using a QNAP TS-109 NAS box as my networked storage. It’s supposed to offer AFP sharing, but this doesn’t work yet with Leopard (the security requirements are stricter). Instead I use an SMB share which works fine.

Time Machine creates a sparse disk image on the NAS box, which it mounts and pretends is a local HFS+ disk. This approach has a few advantages: firstly, the Mac can use any fancy filesystem tricks it needs to in order to ensure that the backup is a true copy of what on my machine; and secondly, the image is compressed and so takes up less space on the NAS box. One disadvantage is that I can’t see the files when I log in to the NAS box directly — I have to mount the image on a Mac first. Another advantage is that Time Machine can create separate sparse images for each Mac to backup — so it’s easy to have multiple Macs backing up to the same SMB share.

I suspect that any home office NAS box would work just as well. I chose the QNAP as it has very good support (just check out their forum) and it doesn’t have a fan. Similarly, I chose a Western Digital Caviar GP 750Gb as the disk for its low noise output. When there’s nothing accessing the disk, the system is absolutely silent.

There were a few hoops to jump through to get this system to work:

  1. persuade Time Machine to see the SMB share as a Time Machine destination by activating the unsupported network drives feature -- simply open Terminal and type:
    defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
    
  2. set up the NAS box with a quota per Mac so that Time Machine would know when to trim old backups (otherwise it just fills the NAS box with backups)
  3. create an appropriate Time Machine disk image locally and copy it to the NAS box -- see below

The first step does involve using unsupported features for my backup, but I thought I’d try it to see if it works — and I’ve had absolutely no issues for several months of continuous usage.

The second step is QNAP-specific, but involves creating a new user per backed up Mac. The QNAP interface then lets you set a quota for each user, which I set to about twice the disk size that was being backed up. The size of backup space that you need depends on how big your initial data is and how much it changes over time.

I’ve found that the Mac that houses my iTunes and iPhoto libraries had a big initial state but doesn’t change much, whereas the Mac that I use to work on and check my mail had less initial state but changes much more often. The compression done by the sparse disk images means that I may have overestimated the quota for each machine — I’m nowhere near the quota on either machine after over a month of backups.

Creating the disk image

To create the disk image, you'll need to find out two pieces of information about the computer you want to backup: its Computer Name and its Ethernet ID (also known as Ethernet MAC address). The Computer Name is the one that you set in the Sharing System Preferences pane. Open it up and you'll see it at the top. For the purpose of this example, let's say you've called your computer "Adam's Mac".

You can get the Ethernet ID from the Network System Preference pane. Open it up and click on the Built-in Ethernet network adapter (one of the items on the left). Then click on the Advanced button at the bottom right. Click on the Ethernet tab at the top of the resulting dialogue and the Ethernet ID will be displayed at the top. It should look something like "00:18:b3:11:84:dd". Note that you want the wired Ethernet ID even if you'll be using Airport to back up wirelessly.

The name of the Time Machine disk image that you want to create will then be "Adam's Mac_0018b31184dd.sparsebundle", i.e. the Computer Name, followed by an underscore, followed by the Ethernet ID without the colons, followed by .sparsebundle.

You'll have decided on a maximum size for the backup in the previous step and you'll need this again here. I use about twice the size of the disk that is being backed up.

Now go to Terminal and type the following commands (based on Mac OS X Hints):

DISK_IMAGE_NAME="disk image name"
DISK_SIZE=max backup size in megabytes
hdiutil create -library SPUD -megabytes $DISK_SIZE -fs HFS+J -type SPARSEBUNDLE -volname "$DISK_IMAGE_NAME" "$DISK_IMAGE_NAME"

In our example, the commands might be as follows:

DISK_IMAGE_NAME="Adam's Mac_0018b31184dd.sparsebundle"
DISK_SIZE=200000
hdiutil create -library SPUD -megabytes $DISK_SIZE -fs HFS+J -type SPARSEBUNDLE -volname "$DISK_IMAGE_NAME" "$DISK_IMAGE_NAME"

After you've run this command, you should end up with a disk image in your home directory called something like "Adam's Mac_0018b31184dd.sparsebundle". It looks like a single file, but it's actually a directory (just like a Mac OS X application). Don't forget to copy this disk image to the appropriate share on your NAS box. Just dragging and dropping from the Finder should work fine.

Now make it work

To get Time Machine started, you follow these simple steps:

  1. connect to the NAS box share from the Finder using the machine-specific user
  2. open Time Machine Preferences and point to that drive as your backup destination
  3. make sure the "Show Time Machine status in the menu bar" option is checked
  4. click on the Options button in Time Machine Preferences and ensure that the "Back up while on battery power" checkbox is not checked (see note below as to why you want to do these last two steps)
  5. Click Done

Now sit and wait as your initial backup takes ages... You might want to let it go overnight as I did. Don't worry -- subsequent backups are much shorter as only the changed files are backed up.

There's one further step you can take to make wireless backup more effective. I tweak the Time Machine schedule so that my laptop doesn’t back up every hour — it’s not in the house all the time so I only really need it backed up once each evening. There's a really useful utility called Time Machine Editor that gives you much finer control over when backups happen. It's pretty self explanatory to use.


History and solved issues

This is the brand new updated page with all current information. Everything is currently working for me with no issues. However, there have been issues previously and if you've been searching around you may have come across them. This section is intended to put your mind to rest :-)

Creating the initial Time Machine image used to be automatic

The step to create the Time Machine disk image used to be done automatically by Time Machine itself, but something in OS X 10.5.2 stopped this. Now you have to create the image yourself as I've documented above.

Time Machine used to have problems when it ran out of space

When Time Machine fills up the backup disk it deletes the oldest backups to make room, leaving you with hourly, daily, weekly and monthly checkpoints. Until Apple released Time Machine and AirPort Updates v1.0, there was a bug that meant that all your old backups would be deleted when there was no more room on the disk. Obviously not what was intended!

See my blog entry on the Time Machine update, complete with proof from my logs showing that this issue has definitely been addressed.

Backup fails when interrupted by sleep

Five months in to using my wireless backup system, I had two backups fail on me in quick succession. It turned out that the Time Machine backup failed badly when the machine was put to sleep during the backup process. The failure was so bad that the backup image was irretrievable!

This is still an outstanding issue, as far as I'm aware, but there's a very simple workaround: don't put your machine to sleep while Time Machine is backing up. To help me in this, I've set the option to prevent backups when on battery power -- this is the most common time that I put my machine to sleep.

You can tell if a backup is progress because the little Time Machine icon in the menu bar rotates. Make it your habit to check that icon before you put your computer to sleep...

124 comments:

hedgert said...

I only have one Mac. Is there any way to do something like this (I'm trying to use Time Machine to backup the 1 Mac to a network drive that is also used for backups for my PCs) with only 1 Mac? (I tried creating a disk image on a USB stick from the first Mac - and the first small backup worked fine, but when I went to copy the files on the USB stick had a different name and when I copied them to the network drive I still got the Time Machine backup error message.)

Adam Cohen-Rose said...

I didn't quite understand your post -- I think you mean that you want to get your Time Machine backup working to a network drive using OS X 10.5.2 and you've run into the problem I documented in my follow post.

If so, you may find the macosxhints instructions for creating a Time Machine sparse bundle useful. According to the comments by David on my follow up post, all you need to do is create the sparse bundle, copy it onto your network drive, enable the TMShowUnsupportedNetworkVolumes property and it should show up straight away.

Good luck and tell me how it went!

Adam

Darren Hoch said...

Adam,

Great advice here. Maybe I appear to be a Mac neophyte even though I have been using Linux for 12 years. I have a SMB share to a Fedora box I have had for years. I use this SMB mount for all my file storage. I ran the command line option you talked about, mounted the share, and launched time machine. It forces me to setup a "time capsule" because one has yet to be setup. I click okay and it goes into "Scanning for Apple Wireless Devices", returning none. I am clearly missing something here and it appears the rest of the Internet is doing something right. Can you help me out here? What am I doing wrong? Is there some other setting I am missing? I can't seem to find an option or preference setting to force time machine to use my SMB share.

Jacob Brauer said...

hi! This is really cool. Do you have any idea if it would be possible to somehow fool an airport express to allow time machine backup through an external hard drive via the usb port on the airport express? Thanks!
Jacob

Adam Cohen-Rose said...

@Darren: I've updated my instructions to be a little more comprehensive -- try again and see how it goes!

@Jacob: I had a quick search and it looks like recent firmware updates should let you do exactly this.

Bert Sierra said...

Very nice writeup.

My own feeling is that if your SMB-based approach is working (especially as Time Machine starts running out of space and has to eat old backups), I'd stick with it. There may be unseen issues with going with a third-party AFP-based NAS appliance.

In addition to a little .com.apple.timemachine.supported invisible file that OS X Server places on Time Machine shares, I suspect there's more going on behind the scenes with the specific flavor of the AFP protocol that makes network-based TIme Machine vaults work. You may be in for headaches if you go with third-party AFP devices, unless the manufacturer clearly states that their device is Time Machine compatible in the sales literature, and then I'd pay special attention to what version of Leopard they're supporting.

Rob Hanratty said...

I've set this up identical to your post, with the possible exception that I am using a DNS323 NAS. Everything works throughout each on of the steps, until I try to backup, at which point it fails and the error is:
"The backup volume could not be mounted."

Please, please help!

Adam Cohen-Rose said...

@Rob Hmm. What does it say in your console? Open up /Applications/Utilities/Console.app and have a look for messages from the "backupd" process. You may need to be an administrator user to see these messages.

Rob Hanratty said...

Thanks for checking this adam...the log is below. I am confused by the line that says mountpoint not owned by backupd. What username should I have login to the NAS directory to mount it?

10/30/08 8:20:50 AM /System/Library/CoreServices/backupd[1885] Backup requested by user

10/30/08 8:20:50 AM /System/Library/CoreServices/backupd[1885] Starting standard backup

10/30/08 8:20:50 AM /System/Library/CoreServices/backupd[1885] Network mountpoint /Volumes/backup not owned by backupd... remounting

10/30/08 8:20:58 AM /System/Library/CoreServices/NetAuthAgent.app/Contents/Resources/NetAuthSysAgent[1886] Warning: accessing obsolete X509Anchors.

10/30/08 8:20:58 AM /System/Library/CoreServices/NetAuthAgent.app/Contents/Resources/NetAuthSysAgent[1886] smb_mount: open session failed!: syserr = Broken pipe

10/30/08 8:20:58 AM /System/Library/CoreServices/backupd[1885] [SnapshotUtilities remountVolumeRef] url could not be resolved via BonJour

10/30/08 8:20:58 AM /System/Library/CoreServices/backupd[1885] Failed to remount network volume.

10/30/08 8:21:03 AM /System/Library/CoreServices/backupd[1885] Backup failed with error: 19

Adam Cohen-Rose said...

@Rob: You've got an issue with the authentication to your NAS share.

Open up Keychain Access (also in Applications/Utilities) and search for the host name of your NAS. You should see some Network Passwords. If you search in the System Keychain (select keychains in the left hand pane), you'll see some more.

Make sure you have a separate record of the usernames and passwords you need to connect to the NAS and then delete these Network Passwords (you may have to enter an administrator password).

Now try running a Time Machine backup manually by going to Back Up Now from the Time Machine menu. Hopefully, you will now have to enter a username and password and you'll be able to check a box that says remember this for next time. Once you've logged in successfully, the Time Machine backup should start...

Good luck and tell me how it goes!

Rob Hanratty said...

Ok. So, part of the solution was in the Keychain changes, but then the next part was weird. While checking the logs, I noticed that Time Machine was trying to create a directory with the name which included the MAC address of my Ethernet port, instead of Airport. I created a new sparsebundle with the MAC of the Ethernet (though I am using Airport) and now it's working beautifully (albeit slow, since it's the first time!)

Adam Cohen-Rose said...

@Rob: Glad to hear that it's working for you now.

I vaguely remember something about Time Machine using the wired Ethernet ID rather than the Airport one -- I'll double check what it's doing at home and update the guide appropriately.

Thanks for pointing that out!

OpenMinded said...

Hi all,

I also had the unable to mount error, like Rob.
For me it worked to use the tar gz method to move the sparsbundle file.

Thanks for your efforts, i am looking at the first backup now :)

Brando said...

I also get the 'backup volume could not be mounted' message (although the volume's certainly mounted in Finder), almost immediately after it enters 'preparing' mode. Console doesn't have any mention of it even trying, either (no messages from backupd). I'm using the proper ethernet MAC address and I moved the sparse bundle file with tar gz.

It's brilliant that you've posted this, but...any other suggestions? I've spent HOURS trying to back up to my Media Vault NAS server. Please help!

Adam Cohen-Rose said...

@brando: you need to have admin rights to see the backupd messages -- they live in /var/log/system.log. Either log in as an administrator user, or use the excellent Pseudo tool from Brian Hill to launch Console as root.

Once you've seen the logs you should have a better idea of what's going wrong.

Cheers,

Adam

Brando said...

Adam - thank you. It turned out not to be an admin thing, but just that I didn't realise Console defaults to showing only Console messages (instead of 'All Messages'), and defaults to hiding the Log List so I didn't even know there were messages I wasn't seeing. Sneaky.

Once I could see the backupd attempts, I saw that it was trying to unmount and then remount the volume, but was remounting it with a -1 added at the end, so that the names no longer matched (error: 18).

Unmounting the volume before requesting the backup solved the problem - now it's backing up! Hooray.

Only thing is, I guess this means I'm going to have to remember manually to unmount the volume before every backup, which is kind of annoying. Unless you have any ideas?

Again - excellent post, thanks for the help.

Adam Cohen-Rose said...

@brando: great to know it's working for you. You shouldn't need to keep unmounting the backup volume -- Time Machine will do that for you when it finishes the backup. Time Machine will also mount the volume for you when you want to view your backups.

If you need to keep the same disk mounted for other reasons, try to create a separate share on the NAS box and use that instead.

Brando said...

You're right - mounting and unmounting is not a problem at all.

Unfortunately, actually using the back-ups is. I know it's backing up, since I can see the folder getting larger and Time Machine says it's completed the original back-up as well as several hourlies, but when I go into Time Machine it only has empty windows behind 'Now'; it doesn't show any backups, no matter what's selected in Finder.

Any thoughts?

Mark Wheadon said...

Adam - any thoughts on whether it will be possible to restore a trashed Mac from your network share?

If you boot from the OS X DVD, will disk utility (or is it Time Machine? (I'm new to Mac OS)) see the SMB share? Do you know of anyone who has successfully restored the whole system from an SMB mounted share?

Cheers,

Mark

Will said...

What a great step-by-step. I have been trying to set up my time-machine to work with my NAS for weeks with no success until now. Kudos!

Adam Cohen-Rose said...

@Mark Wheadon: I've written a new blog post on how you might restore from a trashed Mac using wireless Time Machine on an SMB share. In short, I don't think it's possibly directly, so have a belt and braces approach.

Amr said...

Hi, thanks for the instructions.

I have entered the three commands in to the terminal as you suggested in order to create the sparsebundle, but upon hitting 'enter' nothing seems to happen.

I have a '>' displayed in the terminal directly under the last command.

Any ideas what the issue could be?

Thanks.

Mark Wheadon said...

Hi - I would think that's almost certainly that you have mis-matched quotes - you've opened a quote but not closed it again.

Cheers,

Mark

Patrick said...

I followed the terminal prompts and created the disk image, copied it to the root of my share and set it up in Time Machine as the share accessed via SMB. The instructions are very clear - thanks! I'm getting an error: "The backup disk image could not be created." Seems odd since I copied the initial image to that location. I've verified it is there, and updated the user/passwords to make sure it is all set up properly. I must be missing something. Thoughts?

Patrick

Adam Cohen-Rose said...

@Patrick: sounds like you've got the file name wrong for your disk image. Check your logs in the Console app (look for backupd messages) and it might tell you the file name it's trying to create, so you can see if there's any errors.

Patrick said...

That is what it was - when i created the disk image nae i used he hardware adderss of the airport and not the builtin ethernet. Once I created it again with the correct name it has started the backup. Thanks!

Brando said...

Hi Adam. When your backups failed due to the computer going to sleep, what was the error message? After months of working perfectly, suddenly this morning I got 'Sparsebundle: resource temporarily unavailable' and now I'm getting 'The back-up volume could not be mounted'. Wondering if I put it to sleep while backing up by mistake. Any advice? These are the console messages:

1/8/09 11:36:34 AM. Thursday, January 8, 2009 /System/Library/CoreServices/backupd[2229] Ejected Time Machine network volume.
1/8/09 11:37:37 AM. Thursday, January 8, 2009 /System/Library/CoreServices/backupd[2229] Network volume mounted at: /Volumes/TimeMachine
1/8/09 11:37:39 AM. Thursday, January 8, 2009 /System/Library/CoreServices/backupd[2229] Failed to mount disk image /Volumes/TimeMachine/Brando_00224126f79b.sparsebundle (DIHLDiskImageAttach returned: 35)
1/8/09 11:37:39 AM. Thursday, January 8, 2009 /System/Library/CoreServices/backupd[2229] Waiting 60 seconds and trying again.
1/8/09 11:37:39 AM. Thursday, January 8, 2009 /System/Library/CoreServices/backupd[2229] Ejected Time Machine network volume.
1/8/09 11:38:39 AM. Thursday, January 8, 2009 /System/Library/CoreServices/backupd[2229] Network mountpoint /Volumes/TimeMachine not owned by backupd... remounting
1/8/09 11:38:39 AM. Thursday, January 8, 2009 /System/Library/CoreServices/backupd[2229] [SnapshotUtilities remountVolumeRef] url could not be resolved via BonJour
1/8/09 11:38:39 AM. Thursday, January 8, 2009 /System/Library/CoreServices/backupd[2229] Failed to remount network volume.
1/8/09 11:38:45 AM. Thursday, January 8, 2009 /System/Library/CoreServices/backupd[2229] Backup failed with error: 19

Cheers for any thoughts.

sashas said...

I've got the same problem as Brando. Any updates on this?

Adam Cohen-Rose said...

@Brando (& sashas): Sorry to hear that your backups have stopped working. I don't have the logs any more from when my backup stopped (it happened in July) -- but I documented some of the errors in another blog entry. From an initial comparison, the errors are different, but you might want to try searching around in your logs for earlier errors.

I didn't manage to recover the disk images when they died, but this person did so you might still be in luck.

Tell me how it went when you get somewhere!

Good luck,

Adam

sashas said...

Never mind...got it working on my HP Media Vault after following some of the user comments on the macosxhints.com article.
Two things that finally got rid of the errors:
1. Renamed computer to not have an apostrophes or spaces
2. Ejected the drive from Finder

Backing up now. Thanks for all your help!

Chris Dahl said...

Is the sparse image bundle supposed to be mounted on the desktop when time machine is backing things up?

Thanks for all your help

455pm said...

Hi Adam,

Thanks for your post. Unfortunately I am the dumbest mac user here.

in my Finder it shows "Thomas Wu's Computer"

and The 3rd command I typed was [hdiutil create -library SPUD -size $200000 -fs Journaled HFS+ -type SPARSEBUNDLE -volname "Thomas Wu_ 0017f2d8d591.sparsebundle"]

However, I can't find the file. what have I done wrong?

Adam Cohen-Rose said...

@Chris Dahl: You may see your mounted Time Machine volume on the desktop when Time Machine runs, according to your Finder preferences. Expect to see something like "Backup of ..."

@455pm: Look at the commands more carefully. To create the disk image when your computer name has an apostrophe in it, you must type three separate lines. In your case, it would be something like:

DISK_IMAGE_NAME="Thomas Wu's Computer"
DISK_SIZE=200000
hdiutil create -library SPUD -megabytes $DISK_SIZE -fs HFS+J -type SPARSEBUNDLE -volname "$DISK_IMAGE_NAME" "$DISK_IMAGE_NAME"

Note that the final line (starting "hdiutil ...") has words with dollars in front. You need to leave those words and dollars alone as they will be replaced automatically according to the information you typed in the previous lines.

The disk image will then be created in the directory where you typed the command (it defaults to your home directory).

Good luck!

455pm said...

only had i just realized I had put in the wrong mac Address.

after correcting that, everything went very very smoothly. and This works on Thecus N4100PRO.

Thanks once again

Anonymous said...

I tried your method, using 10,5,6 the terminal says:Rep argument is not a dictionary
Have you got an explaination?
Thanks for your job.
Michel

Adam Cohen-Rose said...

@Michel: could you be a little more specific? What was the command that you actually typed?

Anonymous said...

You will get the error "Rep argument is not a dictionary" if you leave off the number 1 at the end of the command. I did the same thing.

Floatinglint said...
This comment has been removed by the author.
Floatinglint said...

I must have missed something...

Ive found the drive in my devices, that went fine...
Time Machine STILL wont see it.
I've just made the swap from PC so..this is a little new for me
Any suggestions?

Anonymous said...

Great post! Thanks!

Contact said...

I am trying to set up a Time Machine backup through my AEBS USB HDD Disk.

The USB disk is formatted GUID with a single partition (1TB Fantom) and appears in the shared menu and mounts in the finder on all three of my computers on the AEBS.

I just cannot get it to show up in Time Machine as an available drive to back up to.

I partitioned using GUID as many posts suggest.
Drive appears in shared menu and mounts in finder
In Time Machine drive does not appear as a destination from all three of my computers on my network

In Airport Utility
Firmware version 7.4.1
File Sharing Tab: Enable File Sharing is checked
I have tried "with accounts", "with a disk password" and "with airport extreme password".
Remember this password in my keychain is checked
Airport Disks Guest Access: Read and Write
Share Disks over WAN (I tried checked and unchecked)

I am running 10.5.6 on all three Macs. A G5 tower and two MacBooks.

I have read a lot of troubleshooting posts on this issue, but I believe I have tried everything I should. I imagine it is something simple at this point.

Any thoughts and guidance greatly appreciated.

Henry

Contact said...

This is what I have learned in setting up my Airport Extreme USB Airdisk for Time Machine.

Your HDD has to be initialized properly, especially if it is or has been formatted to FAT32.

Using Apple Disk Utility located in the Utility's Folder.
Go to the Partition tab.
Create two partitions.
Under Options, select GUID Partition Table (what you would use to make a Mac OS boot disk) and click OK then Apply.

Once your partitions are in place, go back to the Partitions Tab and revert back to just one partition, still keeping the GUID Partition Table option.
Click OK and Apply.

Some people have gotten this to work without creating two partitions. If you like, try creating just a single partition, but using the GUID Partition Table option. This may be all it takes to break the chokehold.

After my drive was properly partitioned and initiated, it was available in the "Shared" menu (assuming file sharing is enabled), and I was able to set up an ext USB Airdisk in the Airport Extreme using the Airport Utility found in the "Utilities" folder of your Applications folder.

Connect the hard disk into the USB port on the back of the AirPort Extreme Base Station.
Launch AirPort Utility from the Applications:Utilities folder.
Select your Base Station from the list on the left then click the Manual Setup button.
Click Disks in the toolbar.
Click to select the File Sharing tab.
Make sure Enable file sharing is selected.
Choose With a disk password, or With base station password if you want to secure the shared disk with a password, it seems the "With Accounts" ption is to be avoided.
Choose Not allowed, Read only, or Read and write to assign guest access to the disk.
Select the Share disks over Ethernet WAN port checkbox if you want to provide remote access to the disk over the WAN port. If you do share disks over the Ethernet WAN port you can also select to Advertise disks globally using Bonjour.
Finally set the Workgroup and WINS Server for Windows File Sharing if you choose to do so.
Click the Update button to complete your changes.
AirPort will need to reboot the Base Station to continue.
Click the Continue button.

After doing these steps I was still not able to use it in Time Machine until I did the following:

Open Terminal and paste in the following command:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Hit return and I imagine your disk is now available in the Time Machine

I have read that the name of your Airdisk is case sensitive, it was not the case, but worth changing if you still have issues.

Also, the initial backup via wireless is quite slow. I recommend hardwiring to the network, ie, plugging the computer in question into your AEBS for the first Time MAchine backup, then use wireless Airport for subsequent backups.

I now have all four of my computers backing up to a single 1TB Airdisk and very happy about it.

Another tidbit I found was that people were not seeing the new Airdisk auto mount when Time Machine tried to do its thing. To enable auto recognition it seems all you need to do is mount the disk via the shared menu of any finder window, then go to your System Preferences and the Accounts preference pane and in the Login Items, just add the Airdisk to the menu.

Good luck to all and please post back with questions or comments.

Henry

Anonymous said...

Hi Adam,
First of all many thanks for this useful post.
I have made the 3 steps and the Time Machine started work succesfully, but during the backup process the computer freeze and I need to shutdown by pressing the power button.
Could you please give some help.
Notes:
- MacBook Pro
- Mac OS X Version 10.5.6
- HD External 500GB iomega (smb://192.168.0.100 connected as admin)
- Wireless Router Linksys
Thanks in advance,
Wesley.

Eric said...

This is a great blog.
I have done everything Henry has instructed, and I do get my LaCie HD to show up in the Time Machine setup window. However, when I try to do a backup, it fails. Please provide a bit more help for me. Thanks

yourmanstan said...

thank you for this find (defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
). i will be using this to help me have time machine sync to a REMOTE server using dropbox! thanks!

Anonymous said...

Thank you for your advice! I have successfully tried a full restore from TimeMachine set up through your advice - allthough a wired connection to my NAS was neccesary for it to work :-)

You could use the following to automate your steps even more (assuming en0 is the correct interface):

HNAME=`hostname -s`
MAC=`ifconfig en0 | perl -ne 'print $_ if ( m/ether/ && s/(?:ether|:|\s)//g )'`
DISK_IMAGE_NAME=${HNAME}_${MAC}.sparsebundle

Additionally, hdiutil takes a more saner "-size" parameter. Using "-size 200g" would equal "-megabytes 200000"

Anonymous said...

Adam, many thanks for your excellent write-up. It has saved me a lot of effort and confusion.

Barry from Florida

Jens said...

To create the drive, I had to use:

sudo hdiutil create -size 160g -type SPARSEBUNDLE -nospotlight -volname "Backup of My Mac" -fs "Case-sensitive Journaled HFS+" -verbose ./jensMac_0017f2f08127

Jens said...

I could not get this to work with a NFS protocol though.... any clues?

Marc said...

I am using this approach to backup to a WD ShareSpace (over wired gigabit ethernet). Setup went fine and initial back and first few hourlies seemed fine. After a week or two of running this I am noticing that the hourlies are taking 1.5 to 2 hours sometimes. The main time consumer seems to be the "preparing" and "finishing" stages. Anyone seen this? Solutions?

Aidsky said...

Thanks for the blog Adam. I can't seem to get this to work. I followed your steps in creating the disk image but it doesn't seem to work. I can't find the disk image after going through the steps in terminal. I've searched my hard drive and haven't found anything.

Here is what I've entered so far:
> DISK_IMAGE_NAME="Keith Brown's Computer_001b63b50343.sparsebundle"
> DISK_SIZE=250000
> hdiutil create -library SPUD -megabytes $DISK_SIZE -fs HFS+J -type SPARSEBUNDLE -volname "$DISK_IMAGE_NAME" "$DISK_IMAGE_NAME"

I'm not sure where to go from here.

Thanks,
Keith

Adam Cohen-Rose said...

@Keith: if the commands worked, you should see a line saying something like: "created: /Users/.../Keith Brown's Computer_001b63b50343.sparsebundle"

Your disk image should then be in the location where you started your terminal session. Try typing "open ." to open a Finder window showing your current folder. You should see a file called "Keith Brown's Computer_001b63b50343.sparsebundle"

josh said...

hi adam. your article was very intersting. Some fo the tech coding stuff is beyond me tho so i wanted to ask a quick question.

i just bought a lacie 500g network space drive and realized it doesn't say "timemachine compatible". My intent was to use this as network backup device for my macbook pro incase it is stolen.

based on my situation/hardware, is what you've described the most likely / appropriate plan of action?

sorry for being a little dim, but appreciate your detailed article!
thanks.

Adam Cohen-Rose said...

Hi Josh,

Yes, your LaCie network drive should work fine with these instructions. It's an unsupported method, so don't rely on it as your only backup -- try keeping important files on http://getdropbox.com or something similar as well.

Good luck!

Adam

Anonymous said...

Hi Adam,

I have a macbook pro and for some reason the time machine will not create a disk image. Can you tell me what to do?

Adam Cohen-Rose said...

@Anonymous: You'll have to provide a little more detail... In what way did it fail? Were you following the instructions in this blog post?

Dan said...

Adam, so close to getting this working thanks to this topic.
I backed up overnight via Ethernet and am now trying via Wireless but it can't mount the image (i can see it via finder). I think perhaps it's do with the MAC address I used to create the sparsebundle image, as I used the Ethernet address. If so, any way to change or do I have to start again? Cheers. Dan

Adam Cohen-Rose said...

@Dan: the Ethernet MAC address bundle name should be fine for backing up over Wifi. Don't change it!

Take a look in your system.log after a failed wireless backup to see what's wrong.

Cheers,

Adam

Staby Aka James Stapleton said...

Thank you for sharing this information.

I am happily backing up my MacBook Pro to my Windows Server 2008.

Cheers, and thanks once again.

James

Gavin said...

Once I get to the point where I am copying the sparsebundle to the NAS share, I run in to a disk full error at 111.1 MB....The sparsebundle is 249.6 MB (does this make sense?) and the Share has over 900GB of space available. Any ideas why/what is blocking this copy? I do not have the ability (easily anyway) to put a cap on the share/user size as mentioned in the sequence of events, but I did put a cap of 900GB in the terminal line as discussed.
I also got a repetitive error (3 times) once I ran the hdiutil line in the terminal...
Error loading /Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin: dlopen(/Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin, 262): no suitable image found.
I found this VirtualPC...plugin.bundle, but do not know why it was looking for it and what the error resulted in.
In the end, it did create the sparsebundle as expected, so not sure what is going on there.
Any help is appreciated.

Anonymous said...

To continue from my last post....I 'solved' that issue. I needed to Mount the sparsebundle that was created and copy this to the NAS drive, correct?...as this worked and allowed me to select it in Time Machine...it shows as a standard Folder on the NAS, not as a Mounted Drive icon...

Now, I get the infamous 'Disc can not be mounted' error after a few minutes of attempting to start backing up in time machine.

Here is the console error messages that repeat 3 times.

7/8/09 3:30:55 PM com.apple.backupd[2418] 2009-07-08 15:30:55.216 diskimages-helper[2422:1603] Error loading /Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin: dlopen(/Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin, 262): no suitable image found. Did find:


7/8/09 3:30:55 PM com.apple.backupd[2418] /Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/Contents/MacOS/VirtualPCDiskImagePlugin: mach-o, but wrong architecture


7/8/09 3:30:55 PM com.apple.backupd[2418] 2009-07-08 15:30:55.220 diskimages-helper[2422:1603] Cannot find function pointer MacDiskImagePluginFactory for factory 7F1FD83E-6684-11D8-968F-000A957703C0 in CFBundle/CFPlugIn 0x5229f0 </Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle> (bundle, not loaded)


This VirtualPCDiskImagePlugin.bundle is located in my /Library/Plug-ins/DiskImages folder...not sure what it has to do with this routine and saw no other posts regarding it.
Any help is appreciated....getting closer to my first backup to NAS....

Adam Cohen-Rose said...

@Gavin: Try checking out these instructions. Looks like you have an old PPC plugin from VirtualPC that's mucking up hdiutil.

Knycklas said...

Thanks a million, Adam, I followed you instructions on my TS-101 and it works like a charm! Brilliantly clear instructions that even I, a total Mac newbie with no unix skills whatsoever could follow. Great work!

One question about wireless restore. Reading the comments above, it seems as if your preferred method is still the one you link to in your 14 December 2008 comment above (ie http://adamcohenrose.blogspot.com/2008/12/can-i-restore-trashed-disk-using.html), or have you changed your mind in review of the comments people added? Eg there is an anonymous comment above (05 MAY 2009) mentioning restore from NAS via wired connection, which seems perfect, although I am too much of a computer ignorant to know what his code means.

Keep up the great work, you are indeed expanding my horizons!

Adam Cohen-Rose said...

@Knycklas I'd still recommend making a clone of your disk once a month or so and starting from there, rather than using a wireless Time Machine as your only backup. Two reasons for this:

1. The time involved! Restoring from Time Machine takes a long time. If you can start from most of your disk, you'll save a lot of time.

2. This method is still unsupported and so I wouldn't recommend using it as the only backup. I'm using three methods now -- remote Time Machine to my QNAP NAS; a clone whenever I remember (using Mike Bombich's Carbon Copy Cloner); and DropBox for remote storage of the most important files (in case a fire wipes out the NAS and the clones).

Knycklas said...

Thanks for the swift reply, Adam!
I hear you, it makes complete sense not to reply too heavily on an unsupported feature.

I will still try to make a restore from the NAS, just to see if it works. Due to a speaker problem I have to return my 2-weeks-old MBP and get a new one. They let me keep the current one till the replacement arrives, however, so I can try a restore on the new w/o having to risk it all.

I'll let you know how it works out!

Thx!

Anonymous said...

I've been successfully backing up
my macbook pro this way, but I got
one of the models with the defective
nvidia chips and had to have the motherboard replaced - when I got my computer back, of course timemachine will no longer work, because the setup depends on the mac address of the network adapter and this has now changed. I found some general instructions to fix timemachine problems when the network device has changed, but they are for supported timemachine configurations and are not working. I'm getting the error 35 mounting the sparsebundle in the logs. What I did was to rename the sparsebundle to have the new mac address and also change the .macaddress file at the root where the sparsebundle sits. My backup disk shows up in timemachine, but does not backup and when I enter timemachine I do not see my older backups...

Gavin said...

@Gavin: Try checking out these instructions. Looks like you have an old PPC plugin from VirtualPC that's mucking up hdiutil.

11 JULY 2009 19:09

Adam, I removed that Virtual PC bundle from the /Library/Plug-ins/DiscImages folder and now have the correct sparsebundle (the one I created) there. Still no luck, same 'cannot mount' error.
Just to be sure, this sparsebundle 'file' looks like a folder (typical blue apple folder) and not a file or a disk image icon. This is true at this location and, obviously, when I copied it to my NAS drive. Is this correct, or do I have it set up incorrectly? There is nothing in the 'folder', but all the posts say 'file' or 'disc image', so I am wondering if I have it set up incorrectly. It does show in Time Machine and I do have to enter my username and password if I select it for use with TM. Any thoughts on this.
Gavin

Gavin said...

@Adam
I got it working....
I had another folder on the NAS where I was putting the sparsebundle. I answered my last question, as it should be the disk image I am copying to the NAS and not the mounted disk image (the folder icon). When the other folder was present on the NAS, it would not allow me to copy the disk image (I had tried this first) as it said there was not enough disk space to copy it? That is still an issue I can not understand, but everything works now and my first TM backup is under way.
Gavin

Gavin said...

@Adam
OK. Time Machine ran for approx 6 hours and copied just about 7GB (of 294GB that is on my hard drive)...then it failed. It gave me the message that 'File Name 001b......(my ethernet ID in the sparsebundle file name) could not be saved to the backup drive.
I figured something was going to go wrong as backing up 7GB in 6 hours was not going to fly for me.
The odd thing is, the sparsebundle disk image is no longer visible on the NAS drive, but if I try to re-copy it there, it asks if I want to replace it? Is it hidden now for some reason?
Here is what my console gave me:
7/28/09 5:57:11 PM System Preferences[192] Time Machine: Error setting backup path: Error Domain=NSCocoaErrorDomain Code=512 UserInfo=0x1a5fa1d0 "The file “.001b6398c0e1” could not be saved in folder “falcobup”."
7/28/09 5:57:11 PM [0x0-0x2a02a].com.apple.systempreferences[192] chown: /Volumes/falcobup-5/.001b6398c0e1: Input/output error
7/28/09 5:57:26 PM System Preferences[192] Time Machine: Error setting backup path: Error Domain=NSCocoaErrorDomain Code=512 UserInfo=0x187ade60 "The file “.001b6398c0e1” could not be saved in folder “falcobup”."
7/28/09 5:57:26 PM [0x0-0x2a02a].com.apple.systempreferences[192] chown: /Volumes/falcobup-6/.001b6398c0e1: Input/output error
7/28/09 5:58:21 PM System Preferences[192] Time Machine: Error setting backup path: Error Domain=NSCocoaErrorDomain Code=512 UserInfo=0x187b4f80 "The file “.001b6398c0e1” could not be saved in folder “falcobup”."
7/28/09 5:58:21 PM [0x0-0x2a02a].com.apple.systempreferences[192] chown: /Volumes/falcobup/.001b6398c0e1: Input/output error
7/28/09 6:04:58 PM com.apple.launchd[115] (0x1112a0.Locum[1395]) Exited: Terminated
7/28/09 6:06:08 PM System Preferences[192] Time Machine: Error setting backup path: Error Domain=NSCocoaErrorDomain Code=512 UserInfo=0x187b4f20 "The file “.001b6398c0e1” could not be saved in folder “falcobup”."
7/28/09 6:06:08 PM [0x0-0x2a02a].com.apple.systempreferences[192] chown: /Volumes/falcobup-1/.001b6398c0e1: Input/output error

TM will no longer attempt to run a backup...it immediately fails (no processing time, but it does show the NAS in the backup drive list.)
That is where I am at.

Gavin

BitterAmerican said...

Thanks for your article Adam. I've used this method for my three other macs including a wireless backup of my PowerBook G5. However, I cannot get Time Machine to backup my new MacBook Pro. I get the following error:

Time Machine Error
The backup disk image could not be created

I'm using a DNS-321 that contains my three other sparsebundles. I've tried various names for my Mac Book Pro and sparsebundle image but I get the same result.

Can you provide any ideas for me to try? Thanks in Advance.

BitterAmerican said...

Follow up to my question:

I watched my backup drive as it tried to create the backup image and I saw a sparsebundle image being created that had a similar name to mine...except the ethernet address is totally different.

I quickly copied down the strange ethernet address, modified the sparsebundle image I created, and then started up TM and it worked!

I have no idea where the new address came from. I look on my AirPort Extreme and can't find it anywhere. Go figure. I wish I knew what was going on but it works.

pooz said...

Hi Adam,

thanks for your great tutorial.

There is still one thing, which is totally unclear to me:
Why do I need to create an Sparse-Bundle-Image on my network-share (-drive) at all ?,

Why can't I make my complete NAS-Drive availible for Time Machine?

And: Does TM handle normal USB-Drives the same way, by creating a sparse-bunlde on this drive and beginning to backup all the data into that image?


I would be really glad, if you could help me with my questions.

Thanks in advance
greetings

Adam Cohen-Rose said...

@pooz: Time Machine creates a sparse bundle on the NAS as it requires an HFS+ format image to write to. A disk image is a good way of doing this (it's mounted locally) and a sparse bundle is a way of creating a disk image that can grow as required.

Unfortunately, you can't make a network disk available as HFS+ as that's not a network protocol. Directly connected drives (e.g. over USB or Firewire) can use HFS+ and so don't need a sparse bundle.

Even HFS+ disks shared from other Macs (using the AFP network protocol) get a sparse bundle created on them.

I hope that explanation made sense -- if not, ask a further question!

Cheers,

Adam

Michael R. said...

Oh No!...Had this working like a charm by following your detailed instructions to the letter, then I upgraded to Snow Leopard.....Now it doesn't backup any more, and yes, I have deleted everything and started over all to no avail!

ADK said...

Hi Adam,

Firstly, great blog. Learnt a lot from the above thread on the parts I've understood : )

Would appreciate your advice on hopefully an easy query. I've just bought a new MacBookPro with Snow Leopard and want to know what hardware I should purchase to use with Time Machine (preferably wirelessly).

Should I just spend the money and get Time Capsule, or are there cheaper ways using NAS solutions? I've read on other forums that the Buffalo Linkstation 2TB LS-XH2.0TL is very good and around 300pounds. Can this work? Will it be much hassle/risk of not getting the Time Capsule seeing I'll be on snow leopard?

Thanks in advance!

Anonymous said...

Hi,

thx,it works,

only i set size limit to 15GB.
How can i change size limit again to i.e. 50GB?

Elizabeth said...

Hey thanks for this incredibly helpful tutorial! I have a couple of (probably really obvious) questions: 1. My drive has an Ethernet port to plug into my router -- I'm assuming I can plug this directly into my Mac via Ethernet too, right?

2. When I do all this set-up, can I be directly connected to the drive (via Ethernet), or does it need to be over my wireless network with the drive wired to the router? Would there be any issue with my Mac locating the drive if it were wired directly or over the network?

3. Basically the same as 2, but once configured, can I at least do my first Time Machine backup while hardwired? I'm assuming this would be faster than over wireless.

Thanks again! I'm not upgrading to Snow Leopard (as I'm still on a trusty old PPC!), but the OTHER Mac user in my house will be -- he looks forward to updates to your tutorial that will work with SL!

Pooz said...

Hi Adam,

thank you very much for your explanation. Now, everything is clear to me:

Time Machine needs a HFS+ Filesystem to write its data on it. Due to the Properties of network disks aka NAS, which should be accesable to many OS, they are not formatted as HFS+. So thats why Time Machine allows to write its Data on a disk image, which itself HFS+ filesystem.

Thank you for your tuturial.
I second the idea of Elizabeth for an update to Snow Leopard :-) :-)

Bye!!

Anonymous said...

Hello Adam,

Thank you very much. It is working now. I spend several hours trying to find how to use Time Machine with a WD MyBookWorld Raid 1 Ethernet HD (somehow considered as a PC server by a Mac). The key of your tuto was that computer name and Ethernet ID have to be included in the process. Thank you again.

Yves

Anonymous said...

Adam, this is not related to wireless but after I ran the first backup (per your great instructions), the next backup errors out saying that the sparsebundle already in use. Any thoughts? Thanks, Steve

Anonymous said...

Nice information you have provided there. Thanks for the sharing the know how about the time machine over leopard.
My Blog : earn money chao!

Knycklas said...

Adam, this summer, I successfully used your information here to set up my MacBook Pro (and it is working splendidly - I even had a network issue during backup and thought 'shit, now I will have to set it up all again' but it worked the next time), but I do not get it to work for my girlfriend's new Air. I am doing exactly the same thing. The only difference I can think of at all is that there is no ethernet ID address showing under the 'advanced' ethernet tab until the USB connector for the Air is attached. Can that be something that is messing it up, even though I have tried to initialize the backup with the ethernet connected?

The message I receive is:

'the backup image "/volume/EvasMacBackup/EvasMacbookAir.sparsebundle" could not be created (error 45).'

Looking at the NAS (which is the same one you have) folder through Finder, I can see that a temporary sparsebundle is created (EvasMacbookAir.tmp.sparsebundle). I can't remember that that happened for me, but I am not sure.

Any thoughts would be very much appreciated!

Thx,
Niklas aka Knycklas

Knycklas said...

The solution!

Hi again, I have now found the solution! As I suspected, it had to do with the only thing that differed from my own MBP attempt. On your instructions, I have to have it connected to get the address (otherwise nothing shows), which made me a bit suspicious. I have not the computer skills (and in particular not the unix skills) to figure out the back-story here, of course, but after some surfing I found out that this command line

ifconfig en0 | grep ether | sed s/://g | sed s/ether//

should give me the correct address to use (as the reply in the terminal window). On my Pro, I get the very same address as when I follow your instructions, but on my gf's Air the two methods render different addresses! I used the address I got from the Terminal to setup the backup, and it now works like a charm! Being the less computer illiterate in our house-hold, my honor is now restored, I am happy to announce.

Since the command line seem to be a more general way of getting the address (and there is no need to remove any colons either, you can just copy and paste), perhaps you should modify your great instructions (which in all other ways was way superior in its simplicity and clarity) above!

Thx for a great guide!

//N aka K

Rick said...

Thanks for your post. I have previously made a mistake with creating a sparsebundle so when I tried to use your instructions, terminal comes back with "hdiutil: create: Only one image can be created at a time.". When the mistake happened, I remember dragging the sparsebundle file into the trash at the time but it is still coming up with the same message when I followed your instructions. Can you please suggest how I can fix this?

Many thanks,

Rick.

bc said...

It works - albeit very slowly (45mins for a 10MB backup, most of which is 'finishing backup'). I get multiples of this message each time:

"Bulk setting Spotlight attributes failed."

Adam, do you get that message? Anyone else? How long do people's backups take under this setup?

Anonymous said...

I just wanted to post a big thank you for this information. I was able to get my DNS-323 recognized and Time Machine backing-up to it.
Only had my iMac a couple months and loving it. Really makes me wonder why I didn't have one earlier :-)

Anonymous said...

Worked like a charm the first time. Great instructions! Many thanks;))

shaneaustin

mark walters said...

Nice post buddy. Works great on a Western Digital ShareSpace 4TB over GigE.

pir8mat said...

Very nice toot. I was able to get a TM backup going to a Buffalo Terastation live using it. Amazes me that Apple makes people jump through all these hoops just to sell a few more time capsules. Thanks much!

Rick said...

thanks.

Bob Banasik said...

Admittedly a Mac neophyte...when I run the third command line [hdiutil create -library SPUD -megabytes $DISK_SIZE -fs HFS+J -type SPARSEBUNDLE] I get the following error in terminal...
hdiutil: create: image name parameter missing
Usage: hdiutil create [options]
hdiutil create -help

I'm obviously missing something...any ideas?

Adam Cohen-Rose said...

@Bob: you've missed the end of the command -- make sure you type it in all the way to the two "$DISK_IMAGE_NAME" parameters.

Anonymous said...

Hi Adam
I've tried creating the disk image as you have described. However, I get the following message:

hdiutil: create: could not read megabytes in "-fs"
Usage: hdiutil create [options]
hdiutil create -help

Can you provide any guidance?

Thanks, Peter

Jon said...

This article is excellent and led me to using Time Machine backups with my Maxtor NAS. and then one day it just stopped working. I've started from scratch several times over the last few weeks and just when everything seems to be going fine, it all falls over again. Any suggestions are very welcome!

I'm left with a sparsebundle that wont mount. Sometimes it says it's in use (even after rebooting Mac and restarting NAS). The latest one won't mount in diskutil and a Verify says there are errors. Repair doesn't work.

The sparsebundle is max size 500Gb and the drive it's on is 1TB with about 750Gb free.

The last time I gradually added more and more to the backup and they all succeeded, then suddenly one backup failed - I checked the logs and there are errors about the indexes and now the image is corrupt - can't be repaired with diskutil. I'm about to give up on TimeMachine as it seems too unreliable with SMB.

GaryD4@gmail.com said...

Adam, this is a wonderful site. It got me up and running with my iMac and a Seagate BlackArmor NAS220. I have a small problem though. My system continues to do time machine backups but I can't see the NAS in finder anymore. I can access the NAS via it's web interface I just can't see it. I do have all options checked in my sidebar to see external drives and shared servers, etc. Any help would be appreciated, Gary

doublelibra said...

I have a theoretical question about all this. I have a NAS setup, and I just installed a 2nd drive there specifically for backups. I have 2 macs, a MBP & an iMac. I followed your instructions for creating a sparsebundle disk image on the NAS drive for each machine to get time machine to work over the network (and got it to work - thanks!!). Since the drive is 1TB, I made 2 images at 450GB each, even though the 2 machines only currently need about 90GB & 150GB.

Now, based on advice elsewhere, I set up Superduper to back up to the same drive. This uses a similar process of creating a sparse image on that drive. Note that I say sparse image, not sparsebundle - I tried using the existing sparsebundles already created, but superduper didn't seem to want to do that, and in fact although sparsebundle is a choice in their menu, only sparse image would work. So I went ahead and did this but only with my MBP. It indeed created a separate sparse image, and it takes up the full amount of space necessary to back up the entire drive (90GB).

What I'm wondering is if I'm running the risk of quickly running out of room on my NAS drive, since I think TM will fairly quickly eat up as much space as you give it (450GB X 2 = 900 GB), and the superduper backup is taking up the full amount of hard drive space needed (90GB) to make a full backup (based on what I had read, I thought that somehow using superduper onto the same drive as your TM backups would mean superduper would 'piggy back' on TM's backed up files and only add the components needed to create a startup disk, and therefore not take up much space.) I was still hoping to also back up the iMac (120GB) with Superduper onto the same drive.

Thanks for any insight you may have!

Andrew said...

Thanks for this guide - worked brilliantly for the most part. One issue I came across which I thought I'd share with everyone, was domain logins. When connecting to the file share I wanted to use for Time Machine, I used a full domain login (DOMAINNAME\username). This caused Time Machine to fail with "disk unavailable". After unmounting the share and removing the saved credentials from the Keychain, I re-connected the share without the domain specified, and it worked like a charm!!

Bob Banasik said...

I have to thank you Adam, albeit a little belatedly. Back in December you helped me on some of the script I had missed. I fixed that per your suggestion and its been working great since!
I am just curious about why the need for the sparsebundle file on the local machine. Is it akin to a path substitution? IOW, a redirection file that sends all data intended for it to the NAS?
--Bob

Anonymous said...

Thanks a lot for this, Adam. I followed exactly your instructions to backup my MacBook Pro (2008) running Mac OS 10.5.8. The hard drive is a LaCie Network Space 2 1 TB connected with ethernet cable to the modem / wifi router (Belgacom B-Box 2). The macbook is connected to the router via wifi. I has been very very long (around 100 GB to save) and interrupted several times (either because I had to or because, for unkonwn reasons, the hard drive stopped). But at the end, I have now a full backup of my system. And this is great ! Thanks again !
Pierre (Belgium)

Anonymous said...

Worked initially. But after reboot - dead!

Syslog says

Feb 11 22:01:10 mikeimac com.apple.backupd[1952]: Attempting to mount network destination using URL: smb://Home@bignas/Volume_1
Feb 11 22:01:12 mikeimac com.apple.backupd[1952]: Mounted network destination using URL: smb://Home@bignas/Volume_1
Feb 11 22:01:13 mikeimac hdiejectd[2127]: running
Feb 11 22:01:14 mikeimac com.apple.backupd[1952]: Failed to mount disk image /Volumes/Volume_1-1/MikeMAC_0026bb4cb15c.sparsebundle (DIHLDiskImageAttach returned: 109)
Feb 11 22:01:14 mikeimac com.apple.backupd[1952]: Waiting 60 seconds and trying again.
Feb 11 22:01:14 mikeimac com.apple.backupd[1952]: Ejected Time Machine network volume.
Feb 11 22:01:23 mikeimac hdiejectd[2127]: quitCheck: calling exit(0)
Feb 11 22:02:12 mikeimac com.apple.launchd[1] (com.apple.netauth.sysagent[2118]): Exited with exit code: 255

Running 10.6.2.

sascha.delberg said...

hello adam, great blog thank you. what is the command to undo the creation of the sparsebundle file? i have created one with the wrong name.

also i keep getting time machine errors constantly although i have turned it off. any idea?

thank you, sascha

Knycklas said...

Maybe I misunderstand you question, but why don't you just delete the sparsebundle file and redo the procedure with the right parameters? The command just create a certain kind of file, so it is totally ok for you to delete it.

Quenton J said...

First of all - thanks Adam for your advice which clearly helped a lot of people.

I am running into problems using TM to back up my new macbook pro over wireless 802.11n to an Iomega network hard drive.

TM worked perfectly with the drive connected via USB, but I really want to back up over wireless. I created the sparse bundle (using the ethernet MAC address) and connected to the drive via SMB, but I get an error when I copy the file to the NAS:

"The Finder can’t complete the operation because some data in “MARGE_34159e0cffc6.sparsebundle” can’t be read or written.
(Error code -36)"

I can see the drive in TM but cannot log in. I get the following error: "Time Machine can't access the backup disk "PUBLIC". The operation couldn’t be completed. (OSStatus error 32.)"

Console reports the following error regularly:
"16/03/2010 20:44:23 kernel smb_maperr32: no direct map for 32 bit server error (0xc0000161)". Unfortunately there is no direct map for this in my brain!! Can anybody help?? Thanks - Quenton.

Alan said...

Followed the instruction listed. Encounter error 5000. It was trying to create disk image without mac address. Any solutions?

Jun 5 00:30:45 AFMBPRO com.apple.backupd[4288]: Attempting to mount network destination using URL: smb://GUEST:@192.168.1.9/Backup
Jun 5 00:30:46 AFMBPRO com.apple.backupd[4288]: Mounted network destination using URL: smb://GUEST:@192.168.1.9/Backup
Jun 5 00:30:52 AFMBPRO /Applications/System Preferences.app/Contents/MacOS/System Preferences[4152]: TMShowUnsupportedNetworkVolumes is set to TRUE which allows selection of unsupported Time Machine network destination volumes. Use of an unsupported network destination can result in silent data corruption and complete loss of backup data under certain circumstances!
Jun 5 00:30:59 AFMBPRO UnmountAssistant[4305]: Volume unmounted successfully
Jun 5 00:31:46 AFMBPRO com.apple.launchd[1] (com.apple.netauth.sysagent[4289]): Exited with exit code: 255
Jun 5 00:32:58 AFMBPRO com.apple.backupd[4288]: Starting standard backup
Jun 5 00:32:58 AFMBPRO com.apple.backupd[4288]: Attempting to mount network destination using URL: smb://GUEST:@192.168.1.9/Backup
Jun 5 00:32:59 AFMBPRO com.apple.backupd[4288]: Mounted network destination using URL: smb://GUEST:@192.168.1.9/Backup
Jun 5 00:32:59 AFMBPRO com.apple.backupd[4288]: Creating disk image /Volumes/Backup-7/AFMBPRO 1.sparsebundle
Jun 5 00:33:02 AFMBPRO com.apple.backupd[4288]: Error -5000 creating backup disk image
Jun 5 00:33:02 AFMBPRO com.apple.backupd[4288]: Failed to create disk image /Volumes/Backup-7/AFMBPRO 1.sparsebundle, status: -5000
Jun 5 00:33:07 AFMBPRO com.apple.backupd[4288]: Backup failed with error: 20
Jun 5 00:33:07 AFMBPRO com.apple.backupd[4288]: Ejected Time Machine network volume.

Dan W said...

Worked like an absolute charm mate, thank you very very much Adam. Cheers!

su said...

Tried it today, couldn't get the backup disk iage to be mounted. I have a WD sharespace etherneted directly (for now until my airport extreme comes in) to the macbook pro. Think you could help?? This is infuriating! Esp. since the WD manual has time machine in its instructions. Here is the log:
Jul 5 17:58:04 Team-Su /System/Library/CoreServices/backupd[9136]: Backup requested by user
Jul 5 17:58:04 Team-Su /System/Library/CoreServices/backupd[9136]: Starting standard backup
Jul 5 17:58:13 Team-Su /System/Library/CoreServices/backupd[9136]: Mounted network destination using URL: smb://admin@susharespace/TimeMachine
Jul 5 17:58:13 Team-Su /System/Library/CoreServices/backupd[9136]: Backup destination mounted at path: /Volumes/TimeMachine-3
Jul 5 17:58:15 Team-Su /System/Library/CoreServices/backupd[9136]: Failed to mount disk image /Volumes/TimeMachine-3/Team Su_0016cb956501.sparsebundle (DIHLDiskImageAttach returned: 35)
Jul 5 17:58:15 Team-Su /System/Library/CoreServices/backupd[9136]: Waiting 60 seconds and trying again.
Jul 5 17:58:15 Team-Su /System/Library/CoreServices/backupd[9136]: Ejected Time Machine network volume.
Jul 5 17:59:23 Team-Su /System/Library/CoreServices/backupd[9136]: Mounted network destination using URL: smb://admin@susharespace/TimeMachine
Jul 5 17:59:23 Team-Su /System/Library/CoreServices/backupd[9136]: Backup destination mounted at path: /Volumes/TimeMachine-3
Jul 5 17:59:26 Team-Su /System/Library/CoreServices/backupd[9136]: Failed to mount disk image /Volumes/TimeMachine-3/Team Su_0016cb956501.sparsebundle (DIHLDiskImageAttach returned: 35)
Jul 5 17:59:26 Team-Su /System/Library/CoreServices/backupd[9136]: Waiting 60 seconds and trying again.
Jul 5 17:59:26 Team-Su /System/Library/CoreServices/backupd[9136]: Ejected Time Machine network volume.
Jul 5 18:00:29 Team-Su bootpd[8319]: DHCP DISCOVER [en0]: 1,0:90:a9:5e:40:ce
Jul 5 18:00:34: --- last message repeated 1 time ---
Jul 5 18:00:34 Team-Su /System/Library/CoreServices/backupd[9136]: Mounted network destination using URL: smb://admin@susharespace/TimeMachine
Jul 5 18:00:34 Team-Su /System/Library/CoreServices/backupd[9136]: Backup destination mounted at path: /Volumes/TimeMachine-3
Jul 5 18:00:37 Team-Su /System/Library/CoreServices/backupd[9136]: Failed to mount disk image /Volumes/TimeMachine-3/Team Su_0016cb956501.sparsebundle (DIHLDiskImageAttach returned: 35)
Jul 5 18:00:37 Team-Su /System/Library/CoreServices/backupd[9136]: Giving up after 3 retries.
Jul 5 18:00:42 Team-Su /System/Library/CoreServices/backupd[9136]: Backup failed with error: 21
Jul 5 18:00:42 Team-Su /System/Library/CoreServices/backupd[9136]: Ejected Time Machine network volume.
Jul 5 18:03:44 Team-Su /usr/sbin/ocspd[9166]: starting
Jul 5 18:05:34 Team-Su bootpd[8319]: DHCP DISCOVER [en0]: 1,0:90:a9:5e:40:ce
Jul 5 18:06:04: --- last message repeated 9 times ---
Jul 5 18:11:04 Team-Su bootpd[8319]: DHCP DISCOVER [en0]: 1,0:90:a9:5e:40:ce
Jul 5 18:11:34: --- last message repeated 9 times ---
Jul 5 18:16:35 Team-Su bootpd[8319]: DHCP DISCOVER [en0]: 1,0:90:a9:5e:40:ce
Jul 5 18:17:05: --- last message repeated 9 times ---
Jul 5 18:22:05 Team-Su bootpd[8319]: DHCP DISCOVER [en0]: 1,0:90:a9:5e:40:ce
Jul 5 18:22:35: --- last message repeated 9 times ---
Jul 5 18:23:34 Team-Su /usr/sbin/ocspd[9206]: starting
Jul 5 18:27:34 Team-Su bootpd[8319]: DHCP DISCOVER [en0]: 1,0:90:a9:5e:40:ce
Jul 5 18:28:04: --- last message repeated 7 times ---

Adam Cohen-Rose said...

@su sounds like it's just having problems with the image. You shouldn't need any special treatment for your WD Sharespace -- make sure you mount the backup share as AFP rather than SMB and it should work without any special tweaking from the Time Machine system preference pane.

BitProcessor said...

Hey,

your post just enabled me to get Time Machine working to a Lacie Ethernet Disk (1TB) ; I already found the parameter to get it to backup on ethernet disks on another website but that wasn't enough to get it working.

The initial image creation you described did the trick. However, I did not specify the size parameter ; seems to work fine without it in my case. Time Machine is now busy doing a complete backup of my system.

Thanks a lot !!!

TMJr said...

Thank you very much for your very helpful article. I followed your instructions and was able to set up TM to back up to my NAS, a DNS323.

However, have you ever restored from the NAS backup volume? I had a major (self-inflicted :-( ) failure on my MBP and now need to restore from the install disk.

However, there seems to be no way to mount the remote SMB volume to get at the backup! The GUI provides no way of selecting the remote volume. If I try to use mount_smbfs in terminal, I get "mount_smbfs: failed to load the smb library: Unknown error: 1102" - it seems the SMB library is not included in the boot-from-install disc environment.

Any suggestions?

Yossi Dahan said...

Thanks for posting this Adam, very clear and very useful!

Bob Banasik said...

I've been running Time Machine wireless backup using the instructions on this original post successfully for about 10 months. Just yesterday Time Machine barfed and could not find the backup volume. I looked at the external drive and saw a sparsebundle file for another macbook, but mine was not there and had to be recreated. Any thoughts as to what might cause the barf? Is there a way that I could have recovered the missing volume?

Darryl said...

Just wanted to say thanks for posting this, and for your ongoing monitoring of the discussion. I'm fairly savvy at finding stuff online but this topic was difficult to source, at least in a way that was easy to understand. You made it very simple. Again....thanks.

daniel said...

Adam, thanks this is great. created the sparse file as you explained, and it worked fine. Time Machine sees the bu drive. The back up starts to run for a good 5 minutes or more and then. I get an error message saying the back up failed. This has happened at least 10 times. The size of the available volume keeps shrinking, so it is really odd. The exact error message is" The backup was not performed because an error occurred while copying files to the backup disk. The problem may be temporary. Try again later to back up. If the problem persists, use disk utility to repair your backup disk."

Thanks!!

TrapBox said...

Hi Adam
is there a way to pubblish the timemachine service via internet with qnap / other for my cients ? as cloud backup with timemachine ?

Josh said...

Hi Adam,

Completely new to world of Mac. fount this guide to be easy to use and understand. Now reading more of your blog :) Thanks!

Josh said...

Hi Adam,

New to Mac world. Great guide! time machine now working with my QNAP TS419P. Awesome! what other nuggets do you have in this blog...hrrmmm.... :)

Josh said...

Hi Adam,

New to MAC world. Time Machine now working with QNAP TS-419P. Great guide easy to follow. Now searching for other info nugggets in your blog! :)

Josh said...
This comment has been removed by a blog administrator.
Anonymous said...

Thanks for the blog, I've followed the instructions and everything seems ok excepting that the TM is connecting as Guest, this means of course nothing can be written to the disk image. How can I change this.
I cannot seem to get the TM screen up any longer to alter anything.

Bob said...

Thanks for the blog, I've followed the instructions and everything seems ok excepting that the TM is connecting as Guest, this means of course nothing can be written to the disk image. How can I change this.
I cannot seem to get the TM screen up any longer to alter anything.

Bob said...

Ok! sorted it is backing up now, redid the user passwords, copied the backup to desktop and it started backup.
The only prob it resized the backup image to practically all my network disk????

TalcumBoy said...

Hi Adam.

Can you post the fix for Rick. I have the same problem as Rick had in Oct 2009 that I assume was fixed in Dec 2009 as Rick posted Thanks, but I didn't see an answer to the error only one image at a time message in Terminal when issuing the hdiutil command.

I too have searched the web and can't find any active posts with information on this topic. This is the most up to date thread.

Stephen

TalcumBoy said...

I found the fix to my problem here:
http://www.levelofindirection.com/journal/2009/10/10/using-a-networked-drive-for-time-machine-backups-on-a-mac.html#comments

Basically because my computer name has a space in it I needed to encase the path and file name string (the bit with the computer name mac address and .sparsebundle in double quotes.

s2foster said...

HELP PLEASE!!! Two issues:

1) I was able successfully create the sparsebundle, move it to the external drive and have Time Machine recognize the drive. When it tries to create the initial backup, it fails. The message is that it "could not create disk image". Can someone help??

2) I have successfully been using this for about two months. The computer was stolen, so I am trying to restore specific files (iTunes library, documents, etc.) to another computer (the one mentioned in #1 above). How do I connect to that sparsebundle to access and recover those files?

THANKS for the help...