Time Capsule Software Broken

| | Comments (0)

Brand new 500 MB Time Capsule. Latest firmware, latest AirPort software, latest Mac OS X version.

One of my computers, a Titanium PowerBook, connects just fine and backups and it all seems happy and joyous.

My other one, the MacBook Pro ... not so much. No matter what I try, I get "The backup volume could not be mounted." Here's the system log:

Jun 18 00:49:47 bourque kernel[0]: AFP_VFS afpfs_mount: /Volumes/Shore, pid 206
Jun 18 00:49:47 bourque /System/Library/CoreServices/backupd[327]: Backup requested due to disk attach
Jun 18 00:49:47 bourque /System/Library/CoreServices/backupd[327]: Starting standard backup
Jun 18 00:49:47 bourque /System/Library/CoreServices/backupd[327]: Network mountpoint /Volumes/Shore not owned by backupd... remounting
Jun 18 00:49:47 bourque /System/Library/CoreServices/backupd[327]: [SnapshotUtilities remountVolumeRef] url could not be resolved via BonJour
Jun 18 00:49:47 bourque /System/Library/CoreServices/backupd[327]: Failed to remount network volume.
Jun 18 00:49:52 bourque /System/Library/CoreServices/backupd[327]: Backup failed with error: 19

It's some sort of authentication problem. I could not figure out what it is, tried everything. Tried messing with the Keychain, tried deleting all prefs. Nothing works. I saw a bunch of other people online with the same problem; some had fixed it, some had (apparently) not.

Eventually I figured out that if I mounted the volume as root -- which is what backupd runs as -- then it works just fine.

$ mkdir /Volumes/Shore
$ sudo mount_afp afp://pudge:mypassword@Shore.local/Shore /Volumes/Shore

Then I can run Time Machine and all is happy. Until the next time.

So I wrote this script that gets called from root's crontab. It basically does the same thing (though not quite as "neatly") as Time Machine itself should. Until Apple fixes this insanely stupid bug -- you'd think the thing would work out of the box! -- it should keep me going, although to actually enter Time Machine, I need to manually mount the sparsebundle that's sitting on the Time Capsule, but I can do that without root.

#!/usr/bin/perl
use warnings;
use strict;
 
my $backupd = '/System/Library/CoreServices/backupd.bundle/' .
	'Contents/Resources/backupd-helper';
 
# put password in this file, chmod 0600
my $passf = '/Users/pudge/.backupd-helper-helper';
my $user  = 'pudge';
my $share = 'Shore.local';
my $vol   = 'Shore';
 
chomp(my $pass = do { open my $fh, '<', $passf; <$fh> });
my $dir   = "/Volumes/$vol";
my $url   = "afp://$user:$pass\@$share/$vol";
 
 
rmdir $dir; # let fail silently, we only want to remove if dir is empty,
            # and if it doesn't exist, that's OK too
mkdir $dir or die "Can't mkdir $dir: $!"; # NOW complain loudly if it fails
system '/sbin/mount_afp', $url, $dir;
system $backupd;
 
# usually not necessary, but will fail silently
system '/sbin/umount', $dir;
 
__END__

use.perl.org

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

About this Entry

This page contains a single entry by pudge published on June 19, 2008 1:24 PM.

More Leftwing Lies about McCain was the previous entry in this site.

Australia: Hey Kids, If You're Not Green, You Should Die! is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.