Jump to content
  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 
sunkid

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

172 posts in this topic

Recommended 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:

cp -pfr <computer name>.sparsebundle /Volumes/backup/<computer name>.sparsebundle

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:

hdiutil create -size 500G -fs HFS+J -volname 'Time Machine Backups' -type SPARSEBUNDLE snowy.sparsebundle

b. Edit the attached com.apple.TimeMachine.MachineID.plist file and copy your machine's hardware UUID in the correct place. You can find your hardware UUID in the System Profiler

 

c. Copy the modified com.apple.TimeMachine.MachineID.plist file into your disk image directory:

cp com.apple.TimeMachine.MachineID.plist snowy.sparsebundle/

d. Copy your disk image file to your mounted backup volume. This example assumes an AFP share with the name backups:

cp -pfr snowy.sparsebundle /Volumes/backups/snowy.sparsebundle

 

Please let me know if you run into any issues. The attached script works for me but it may not work for you. I make no guarantees whatsoever!!

NOTE: remove the '.txt' extension from the attached files.

 

UPDATE 9/6/9: Fixed shell script to handle computer names with spaces.

UPDATE 9/24/9: We made it onto macosxhints.com :(

com.apple.TimeMachine.MachineID.plist.txt

makeImage.sh.txt

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)

 

Does anyone know why this might be happening?

Share this post


Link to post
Share on other sites

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.

 

The logs are below

9/8/09 9:02:18 AM	com.apple.backupd[630]	Starting standard backup
9/8/09 9:02:18 AM	com.apple.backupd[630]	Attempting to mount network destination using URL: afp://admin@donald.selfip.org/Clyde
9/8/09 9:02:19 AM	com.apple.backupd[630]	Mounted network destination using URL: afp://admin@donald.selfip.org/Clyde
9/8/09 9:02:19 AM	com.apple.backupd[630]	Warning: Destination /Volumes/Clyde-1 does not support TM Lock Stealing
9/8/09 9:02:19 AM	com.apple.backupd[630]	Warning: Destination /Volumes/Clyde-1 does not support Server Reply Cache
9/8/09 9:02:34 AM	com.apple.backupd[630]	Disk image /Volumes/Clyde-1/Winston.sparsebundle mounted at: /Volumes/Time Machine Backups
9/8/09 9:02:34 AM	com.apple.backupd[630]	Backing up to: /Volumes/Time Machine Backups/Backups.backupdb
9/8/09 9:02:40 AM	com.apple.backupd[630]	Backup content size: 172.7 GB excluded items size: 5.7 GB for volume Macintosh HD
9/8/09 9:02:40 AM	com.apple.backupd[630]	No pre-backup thinning needed: 200.47 GB requested (including padding), 269.28 GB available
9/8/09 9:02:40 AM	com.apple.backupd[630]	Waiting for index to be ready (101)
9/8/09 9:02:41 AM	mds[37]	(Normal) DiskStore: Creating index for /Volumes/Time Machine Backups/Backups.backupdb
9/8/09 9:02:41 AM	com.apple.backupd[630]	Stopping backupd to allow ejection of backup destination disk!
9/8/09 9:02:42 AM	com.apple.backupd[630]	Indexer unavailable (200)
9/8/09 9:02:42 AM	com.apple.backupd[630]	Copied 0 files (0 bytes) from volume Macintosh HD.

Share this post


Link to post
Share on other sites
[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.

Share this post


Link to post
Share on other sites
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.

 

Well its even weirder because its doing it for everything.

 

Hard Drive: Server Size | Mounted AFP Size in 10.6

 

Storage: 395.76 GB | 424.95 GB

Misery: 69.75 GB | 74.89 GB

Clyde: 279.34 GB | 299.93 GB

Macintosh HD: 93.04 GB | 99.9 GB

 

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.

Share this post


Link to post
Share on other sites
Well its even weirder because its doing it for everything.

 

Hard Drive: Server Size | Mounted AFP Size in 10.6

 

Storage: 395.76 GB | 424.95 GB

Misery: 69.75 GB | 74.89 GB

Clyde: 279.34 GB | 299.93 GB

Macintosh HD: 93.04 GB | 99.9 GB

 

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.

Share this post


Link to post
Share on other sites
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.

 

Ok well that explains that.

 

I don't have a chance to play with this right now. If I find anything later I will post it here but I'm not sure if I will get anywhere.

 

Thanks for the help!

Share this post


Link to post
Share on other sites

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:

9/8/09 10:00:26 PM	diskimages-helper[1399]	terminating disk3 - image is no longer available

After that I get about 20 lines about the media not being present. No surprise, it was unmounted some time ago. Why????

 

Any ideas?

--Andy

Share this post


Link to post
Share on other sites

@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.

Share this post


Link to post
Share on other sites

@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?

 

Thanks!

Share this post


Link to post
Share on other sites

Tried resizing the sparsebundle: still bad.

 

But, looks like a bunch of others are having the same problem:

 

http://discussions.apple.com/thread.jspa?threadID=2135602

 

... and it looks like they also have something of a workaround. Mounting the drive via SMB seemed to do the trick! Haven't finished a full backup yet, but certainly got further than ever before!

 

Thanks for the help! Good luck to others!

--Andy

Share this post


Link to post
Share on other sites

Seems you also need a fully numeric SMB password!! Apple needs to fix this.

 

Tried resizing the sparsebundle: still bad.

 

But, looks like a bunch of others are having the same problem:

 

http://discussions.apple.com/thread.jspa?threadID=2135602

 

... and it looks like they also have something of a workaround. Mounting the drive via SMB seemed to do the trick! Haven't finished a full backup yet, but certainly got further than ever before!

 

Thanks for the help! Good luck to others!

--Andy

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

I also get the second, shadow-mount of my AFP share whenever Time Machine runs. The second mount has root-only permissions and I think this is now part of the normal protocol.

 

I am also not able to get this to work on a Tiger-based system:

 

Sep 13 08:52:10 hackintosh com.apple.backupd[3617]: Creating disk image /Volumes/Tiger-2/tarpo.sparsebundle
Sep 13 08:52:23 hackintosh com.apple.backupd[3617]: Error 118 creating backup disk image
Sep 13 08:52:23 hackintosh com.apple.backupd[3617]: Failed to create disk image 
Sep 13 08:52:28 hackintosh com.apple.backupd[3617]: Backup failed with error: 20
Sep 13 08:52:38 hackintosh com.apple.backupd[3617]: Ejected Time Machine network volume.

 

When I try to use an image created by my script. I get the same unmounting issue as y'all ;)

Share this post


Link to post
Share on other sites
I also get the second, shadow-mount of my AFP share whenever Time Machine runs. The second mount has root-only permissions and I think this is now part of the normal protocol.

 

I am also not able to get this to work on a Tiger-based system:

 

Sep 13 08:52:10 hackintosh com.apple.backupd[3617]: Creating disk image /Volumes/Tiger-2/tarpo.sparsebundle
Sep 13 08:52:23 hackintosh com.apple.backupd[3617]: Error 118 creating backup disk image
Sep 13 08:52:23 hackintosh com.apple.backupd[3617]: Failed to create disk image 
Sep 13 08:52:28 hackintosh com.apple.backupd[3617]: Backup failed with error: 20
Sep 13 08:52:38 hackintosh com.apple.backupd[3617]: Ejected Time Machine network volume.

 

When I try to use an image created by my script. I get the same unmounting issue as y'all :wacko:

 

I'm going to try upgrading the server to Leopard and see if that makes a difference.

Share this post


Link to post
Share on other sites

This might be a long shot but could someone give me a step by step explanation (or a more detailed one)?

I'm new to using a mac and have no idea where I'm going wrong.

 

Thanks

Share this post


Link to post
Share on other sites
This might be a long shot but could someone give me a step by step explanation (or a more detailed one)?

I'm new to using a mac and have no idea where I'm going wrong.

 

Thanks

 

Can you give us more detail on what you tried and what happened? Without knowing where to start, it's not so easy to provide a more detailed explanation. Usage of the Terminal application is probably a bit beyond the scope of this guide.

Share this post


Link to post
Share on other sites

I was already able to to pick the folders (Download & Public) in My Book World edition.

I created a sparsebundle file in Disk utility and copied it over to the download folder, naming it the same as the one created when attempting a back up.

Set Time machine to back up to the Download folder where i had copied the new disk image.

But I'm still getting the error 45 after Time machine tried to create it's own.

I have checked and there appears to be nothing different between the one i created and the one Time machine tries to create.

Totally lost.

Share this post


Link to post
Share on other sites
I was already able to to pick the folders (Download & Public) in My Book World edition.

I created a sparsebundle file in Disk utility and copied it over to the download folder, naming it the same as the one created when attempting a back up.

Set Time machine to back up to the Download folder where i had copied the new disk image.

But I'm still getting the error 45 after Time machine tried to create it's own.

I have checked and there appears to be nothing different between the one i created and the one Time machine tries to create.

Totally lost.

 

What operating system is running on the machine that is serving the folder you are trying to use? What protocol do you use (AFP, smb, nfs)?

Share this post


Link to post
Share on other sites

Hi

 

I'm using 10.6.

(What protocol do you use (AFP, smb, nfs)?) I hate looking stupid but i dont even know what that means.

 

I have also tried something from this website

http://forums.mactalk.com.au/46/72807-time...age-10-6-a.html

 

No matter what i have tried Time machine always tries to create a sparsebundle and then fails.

 

 

 

 

 

 

 

Sorry, just realised you weren't referring to Snow leopard when you said op system, do you mean on my book world edition, i would have to try and find out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×