Jump to content

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


  • Please log in to reply
171 replies to this topic

#1
sunkid

sunkid

    InsanelyMac Protégé

  • Members
  • Pip
  • 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:
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 :(

Attached Files



#2
Brett Whinnen

Brett Whinnen

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 146 posts
  • Gender:Male
  • Location:Bne, AU
Thank you! That was the missing key for me. I had everything else right, just needed the file within the .sparsebundle!

Great work!

Brett

#3
pitt1717

pitt1717

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
not sure how some of you guys find this stuff. but nice job and thank you!!! now on to start a backup

#4
skabob11

skabob11

    InsanelyMac Protégé

  • Members
  • Pip
  • 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.

Any ideas?

#5
sunkid

sunkid

    InsanelyMac Protégé

  • Members
  • Pip
  • 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.

#6
robbtheknob

robbtheknob

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 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)

Does anyone know why this might be happening?

#7
skabob11

skabob11

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts
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
[codebox]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.[/codebox]

#8
sunkid

sunkid

    InsanelyMac Protégé

  • Members
  • Pip
  • 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.

#9
skabob11

skabob11

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts

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.

#10
sunkid

sunkid

    InsanelyMac Protégé

  • Members
  • Pip
  • 41 posts

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.

#11
skabob11

skabob11

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts

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!

#12
GrandPoohBear

GrandPoohBear

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 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:
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

#13
sunkid

sunkid

    InsanelyMac Protégé

  • Members
  • Pip
  • 41 posts
@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.

#14
GrandPoohBear

GrandPoohBear

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 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?

Thanks!

#15
GrandPoohBear

GrandPoohBear

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 3 posts
Tried resizing the sparsebundle: still bad.

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

http://discussions.a...hreadID=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

#16
cchi

cchi

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 1 posts
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.a...hreadID=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



#17
glyphon

glyphon

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 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!

#18
skabob11

skabob11

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts

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.

#19
sunkid

sunkid

    InsanelyMac Protégé

  • Members
  • Pip
  • 41 posts
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 ;)

#20
skabob11

skabob11

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts

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.





6 user(s) are reading this topic

0 members, 5 guests, 1 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy