[Guide] 10.6 (Snow Leopard) Time Machine backup to network share

Posted 06 September 2009 - 04:03 AM

sunkid

InsanelyMac Protégé

Members

41 posts

The upgrade to Snow Leopard breaks 10.5.x time machine backups configured with AFP shares on non-mac based network volumes as per these instructions, for example. After some trial and error, I was able to find out that the secrect lies with a hidden property list file that specifies the hardware UUID for the machine to be backed up. The following are some simple instructions to set up a new backup volume from scratch. They may work for upgrading a Leopard TM disk to SL, but I have not been able to verify this. Attached are a shell script that will do all the work for you and a property list file in case you want to try it yourself.

1. SETUP

If your time machine is already configured to backup to a networked AFP share, move on to the next step. Otherwise, follow the setup procedure in the link above.

2. SIMPLE PROCEDURE

Run the attached shell script with command line arguments specifying the maximum size for your backup image and the shared directory you want to backup to (the second argument is optional).

Example:

sh ./makeImage.sh 600 /Volumes/backup

This will create a time machine ready disk image named with your computer's name with a maximum size of 600GB and copy it to /Volumes/backup. The image "file" (it's a directory, really) will contain the property list file that SL's TM needs.

If you don't specify the backup volume, you will need to do the coying yourself:

You may or may not have to execute the script and the copy command as root. I have not tried it out both ways and only done it as root.

3. "MANUAL" PROCEDURE

a. Create a disk image named with the name of your machine's computer name (not sure that this is crucial; you can find it in System Preferences -> Sharing). This example is for a 500GB (max size) image for a machine named snowy:

Posted 07 September 2009 - 04:57 PM

Posted 07 September 2009 - 05:21 PM

skabob11

InsanelyMac Protégé

Members

7 posts

I haven't been able to get this to work. It mounts the sparsebundle and then when it gets to Indexing Backup it just unmounts the disk and sets the next backup to an hour from now. I had this running fine on 10.5 but its since broke when I updated to snow leopard.

I have tried running the shell script as root and doing it manually both no go.

Posted 07 September 2009 - 08:47 PM

sunkid

InsanelyMac Protégé

Members

41 posts

I haven't been able to get this to work. It mounts the sparsebundle and then when it gets to Indexing Backup it just unmounts the disk and sets the next backup to an hour from now. I had this running fine on 10.5 but its since broke when I updated to snow leopard.

I have tried running the shell script as root and doing it manually both no go.

Any ideas?

Check your logs, they may indicate what the issue is. Maybe your disk image doesn't have enough space for the backup.

As for how I found the trick: to get a working image, I pointed my time machine at a leopard-bases AFP share on a mac laptop. Once I had that, I saw the new plist file in it. Took me a while to figure out that the extended properties on it where doing nothing else other than hiding it from the Finder. Time machine doesn't seem to care about that though.

Posted 08 September 2009 - 04:11 AM

robbtheknob

InsanelyMac Protégé

Just Joined

1 posts

I haven't been able to get this to work. It mounts the sparsebundle and then when it gets to Indexing Backup it just unmounts the disk and sets the next backup to an hour from now. I had this running fine on 10.5 but its since broke when I updated to snow leopard.

I have tried running the shell script as root and doing it manually both no go.

Any ideas?

I have this same problem since upgrading to 10.6. After looking in the system log, I see that 'diskimage helper' is automatically unmounting the sparsebundle before the backup can be made. (09-09-07 8:11:06 PM diskimages-helper[5439] terminating disk1 - image is no longer available)

Posted 08 September 2009 - 01:19 PM

I'm uploading my logs from watching backupd in Console. Perhaps we can compare it to someone's logs with a working backup in 10.6?

A few things I notice from looking at the logs:

afp://admin@donald.selfip.org/Clyde is my home server. Clyde is the name of the hard drive hooked up to the server. When backupd refers to the drive on line 4-6 it calls it Clyde-1. Not sure why. I can erase, partition this disk, whatever if there are any suggestions

Another thing. Time Machine says in System Prefs 299.02 GB of 299.93 GB available. If I login to the server it has the correct size of the drive: 279.5 GB. The logs show 269.28 GB available on line 9 which makes sense because using the shell script I had the sparsebundle made for 270 GB. In the finder the afp share shows 299.02 GB as well. The same happens if I mount any of the other drives hooked up to the server, the size of the drive in 10.7 is larger then it is on the server.

The server by the way is running 10.4.11

So it's doing the same thing as I mentioned before and as @robbtheknob but I'm not seeing the same message you are.

Posted 08 September 2009 - 01:24 PM

sunkid

InsanelyMac Protégé

Members

41 posts

[snip]Another thing. Time Machine says in System Prefs 299.02 GB of 299.93 GB available. If I login to the server it has the correct size of the drive: 279.5 GB. The logs show 269.28 GB available on line 9 which makes sense because using the shell script I had the sparsebundle made for 270 GB. In the finder the afp share shows 299.02 GB as well. The same happens if I mount any of the other drives hooked up to the server, the size of the drive in 10.7 is larger then it is on the server.[snip]

That is odd! Did you try a backup with a disk image that has a max of more than 300GB? Seems like TM in SysPrefs wants 299.93GB for whatever reasons.

Each drive, in 10.6, is increased by about 7% +/- 1gb. So I'm thinking this could be less of a Time Machine problem and an OS problem. Time Machine is correctly reflecting the size of the drive according to 10.6, but 10.6 is not showing the correct size of the hard drive. I don't know if this is whats messing up my backups or not. When I get home, I could try just plugging the hard drive into 10.6 and seeing if that shows the correct hard drive size and then it could be an issue with the AFP share.

So my point is, I think even if i get a hard drive bigger then 300 GB, 10.6 may still boost it up 7% like it's doing to all my other drives.

Each drive, in 10.6, is increased by about 7% +/- 1gb. So I'm thinking this could be less of a Time Machine problem and an OS problem. Time Machine is correctly reflecting the size of the drive according to 10.6, but 10.6 is not showing the correct size of the hard drive. I don't know if this is whats messing up my backups or not. When I get home, I could try just plugging the hard drive into 10.6 and seeing if that shows the correct hard drive size and then it could be an issue with the AFP share.

So my point is, I think even if i get a hard drive bigger then 300 GB, 10.6 may still boost it up 7% like it's doing to all my other drives.

Snow Leopard now reports HD size in base 10 and not in base 2 anymore. Thus, that 300GB drive you bought actually shows up as 300GB now and not as 279GB like before.

Posted 09 September 2009 - 05:07 AM

GrandPoohBear

InsanelyMac Protégé

Just Joined

3 posts

I just installed Snow Leopard today and it broke the backup system I had running under 10.5. I was using an old iMac as an AFP server, and then backed up through Time Machine over airport. After having to do the tricky setup linked to in the original post, it worked fine. Since installing 10.6, no luck!

I tried both the manual and automatic methods above. Neither worked. I even checked, and it seemed like the proper UUID was already in my existing sparsebundle! From reading the console output, it seems like everything is going hunky dory until I hit this message about 15 seconds into the process:

Posted 09 September 2009 - 04:14 PM

@GrandPoohBear: how large is the maximum size of your disk image and how big is your disk you are trying to backup?

I think Snow Leopard may be enforcing a larger size of the backup disk images to avoid the problems Leopard ran into when backing up to AFP shares.

Btw - if you are backing up to a Mac-based AFP share, I don't think you need to make any modifications yourself. Linux AFP shares, on the other hand, don't seem to be able to let TM create the disk image.

Posted 10 September 2009 - 05:21 AM

GrandPoohBear

InsanelyMac Protégé

Just Joined

3 posts

@sunkid - I believe it's a 150 GB image for what SL is now reporting as a 137 GB drive (of which only 111 GB is used). When I made the new images per the instructions, I set it at 220 GB, since the backup drive could support it, and still had no luck. I don't have high hopes, but at this point I'd probably try anything! Is there a way to increase the size of one of those images once you've created it?

Posted 13 September 2009 - 04:33 AM

glyphon

InsanelyMac Protégé

Just Joined

1 posts

afp://admin@donald.selfip.org/Clyde is my home server. Clyde is the name of the hard drive hooked up to the server. When backupd refers to the drive on line 4-6 it calls it Clyde-1. Not sure why. I can erase, partition this disk, whatever if there are any suggestions

i had noticed the same thing when looking through my logs. for networked drives, TM seems to want to create the sparcebundle on a non-existant duplicate of the mounted drive. i guess that's a bug...

regardless, adding the plist to the sparcebundle did the trick and TM is happily running. thanks sunkid!

Posted 13 September 2009 - 03:16 PM

i had noticed the same thing when looking through my logs. for networked drives, TM seems to want to create the sparcebundle on a non-existant duplicate of the mounted drive. i guess that's a bug...

regardless, adding the plist to the sparcebundle did the trick and TM is happily running. thanks sunkid!

@Glyphon, what system are you using to connect to the hard drive? My server is using Tiger still and I'm curious if that could have anything to do it. I know snow leopard updated the AFP protocol version.