View Full Version : Mount remote disk

01-25-2006, 07:25 PM
I would like to schedule backups on a remote server.
For that I thought about writing an AppleScript that would be executed before the backup. It would mount the remote disk (mount afp://, execute the backup, and then execute another script to unmount the remote disk.

The problem is that when I connect to the remote disk, I have to click on the "connect" button which will interrupt the connect procedure.

How can I do to automate to complete scheduled backup procedure?



01-25-2006, 09:19 PM
Well, if you place the image -- using SD's "Disk Image..." choice in the destination po-up -- on the remote machine, and tell the system to add the password to keychain, it should mount automatically, without clicking "Connect". That'd be how I'd do it.

01-25-2006, 09:47 PM
Unfortunately it fails to mount the destination image

01-25-2006, 10:03 PM
But does it mount the remote volume? If so, what error do you get when it fails to mount the destination? Could it be a permission problem on the remote side?

01-26-2006, 06:37 AM
Yes there was a permission problem. I fixed it but it still fails to mount the remote volume. I get this error in the log:

| 11:34:00 AM | Info | ...ACTION: Mounting Backup - Titan
| 11:34:00 AM | Info | ......COMMAND => Preparing Backup - Titan
| 11:34:02 AM | Info | hdiutil: create failed - No such file or directory
| 11:34:02 AM | Error | ****FAILED****: result=256 errno=0 (Unknown error: 0)


01-26-2006, 12:58 PM
OK: that indicates that the destination of the backup isn't mounted, indeed. But it won't mount it if SD! is running and you click "Copy Now". The mount is part of an alias dereference that happens when settings are loaded (which is also what happens when you start SD!). So -- try to set things up the way you want. Then, quit. Restart SD! and it'll restore the source and destination, and *that* will mount the remote volume. If it prompts for your password, make sure you add things to the keychain.

01-26-2006, 08:49 PM
Ok Dave. Thanks for your answer.
I'm making a new backup over the network now. By the way, it has been running for almost 5 hours now and has only completed 15.5Gb (out of 38). Is that normal it's so slow?
Anyway, if it succedes to complete this backup, I hope it will solve my problem ;)

I'll post the results here when it's finished.

Thanks again!

01-26-2006, 08:54 PM
This is over a WAN, Nick? It doesn't surprise me hugely that it would be slow, especially the first time...

01-26-2006, 09:04 PM
No, it's over a LAN. I just made the calculation. I guess it sould take about 8.5 hours on a 10Mb/s LAN... Hmm... Why can't SD! use a sparse image that wasn't created over a network, but which already exists on a remote destination? It's not possible to choses an existing image or have I missed something?

01-26-2006, 09:08 PM
It can, actually. While the image is "grey" you can still select it. Ignore the "overwrite" warning, and we can use it without any problem.

01-27-2006, 07:21 AM
So the backup is now finished. It worked fine. So I scheduled an automatic backup, which started automatically, but it failed, because it couldn't mount the remote volume... What am I doing wrong?

01-27-2006, 09:09 AM
Which mount failed? The image or the remote volume?

01-27-2006, 10:05 AM
Actually it's the remote volume that doesn't mount. If it's already mounted, the image mounts fine.
I have some news though. When I open SD!, it automatically connects to and mounts the remote volume.
If it runs a scheduled backup, the remote volume doesn't mount...

01-27-2006, 10:09 AM
That's strange, because a scheduled item launches SD and resolves the same alias that should do the mount.

Was the schedule starting SD from the "quit" state? What happens if you double-click the scheduled settings in ~/Library/Application Support/SuperDuper!/Scheduled Copies, with SuperDuper not running?

01-27-2006, 10:28 AM
If I double-click that file, it opens SD! but the remote volume still doesn't appear...

01-27-2006, 10:31 AM
Hm. I don't see the difference between this and the "default" settings -- they're both settings being loaded, Nick. Could you Quit and restart SD! with the defaults again. If it does mount the volume, please remove what's already scheduled and schedule this instead. Then, quit and try the experiment again.

01-27-2006, 11:03 AM
Yeeeeeeess!!!! That worked. Now I've set my Mac to wake at 4AM and SD! to start an automatic backup at 4:01AM. I'll see tomorrow if it works.
Thank you so much for your help!!!!!!!!!!

It worked on the Mac with which I created the backup over the network.
Now I have a second Mac. I created a backup with the disk attached to it. But this disk is attached to the server now. How can I make SD! recognize that the file is now on the network? Will I have to recreate a new backup over the network to make it work properly?

01-27-2006, 11:10 AM
I'm not quite sure I can parse what you've said there, Nick (other than the success -- great!). You created a backup sparseimage locally? If so, you can move it to the server, no problem, and then just set up the Mac to use that image, as you did with the other one.

01-27-2006, 11:44 AM
Yes that's what I did, but it fails to mount the remote volume, just like Mac#1 did before...

01-27-2006, 11:51 AM
I think you need to go through the same steps, Nick. There shouldn't be any difference...

01-28-2006, 08:39 AM
Ok, I made a new backup file over the network of Mac#2.
I think it's the easiest way to have it work like I want.

Dave, thank you very much for all your help. It works exactly the way I want. SuperDuper is the best buy I've made for quite some time!

Thanks again.
Nicolas :D

01-28-2006, 11:13 AM
You're quite welcome!

01-18-2007, 04:16 PM
I am having the same issue here and can't find a solution.

System is 1.8ghz iMac PPC (10.4.8)
Network drive is a 1TB Lacie Ethernet Disk (Gigabit) with AFP

Problem is that when SD automatically launches it does not mount the drive before it tries to find the sparseimage.

When I manually load settings in SD the volume mounts before I click copy. It happens right when the settings load. If I throw away the network volume and click copy SD will not find find the sparseimage.

When SD automatically launches to do a backup it seems that the modal sheet with the coutdown prevents the loading of the network volume. When it goes on to the copy screen it fails.

If I load the network drive before SD automatically launches everything is fine.

This is repeatable.

Any ideas?

01-18-2007, 05:05 PM
What you're describing -- that when you load settings the volume mounts but doesn't when you unmount then click copy with the settings loaded -- is by design. Schedules, though, load the settings just like you did, and thus should mount as expected... they certainly do here!

03-28-2007, 11:18 PM
I have this same issue on my two macs (PPC & Intel) with a network backup. I use this applescript to mount the drive. It opens an alias (in my ~/Library/Favorites) I have stored to the network drive. As long as you have the user and pass stored in the keychain this will require no user input. Just replace the "alias-file-name" below with the name of your alias in your favorites folder. The script will input your correct username.

set thePath to ((get path to startup disk) & "Users:" &
(do shell script "echo $USER") &
":Library:Favorites:alias-file-name") as string

tell application "Finder"
open alias thePath
end tell

And then I use this script to unmount it. Be sure to put the name of the network drive here, not the alias name.

tell application "Finder"
eject disk "name-of-network-disk"
end try
end tell

You can add these directly into CopyJob.applescript inside your schelduled backup package. Just don't forget to toggle the checkbox for the script inside the SuperDuper! interface to recompile the script.