I don’t think this questions has been asked in quite this way. I want a script that can duplicate a FileMaker DB to a Windows Small Business Server volume, without being logged in (on the Mac Mini that’s running as the FileMaker Server 7 Advanced box).
I’m having to do this because I can’t get FileMaker Server 7 (on the Mini) to backup to the windows server. So, I wrote a little script that mounts the Windows volume and duplicates the FileMaker DBs. The script is triggered by an iCal alarm.
But, I don’t want people walking by the Mini and realizing it’s on and doing nasty things. Yes, I can turn off the monitor and hide the keyboard, but I’d like to find a more elegant solution.
Although I can get the script to run from iCal, even when no one is logged in, the script is stalled because it can’t write to a volume that isn’t mounted. And it can’t mount because there isn’t an active desktop on which to mount because no one is logged in.
So, I need some alternative to mount volume “afp:// …” and then duplicate. I guess I need a duplicate command that can duplicate to an unmounted volume. Or a way for AppleScript to login (after iCal trigger), mount the volume, duplicate the DBs, and then logout. Everything is easy except the first part. I know of no way to get AppleScript to login.
Any ideas?
Thanks,
Jennifer Petkus
Model: Mac Mini
Operating System: Mac OS X (10.3.9)
‘mount volume’ will happily mount any volume regardless of whether any user is logged in or not. Mount points do not require any active desktop - in fact they don’t depend on anything to do with the desktop at all. The fact they appear there is a facet of the Finder looking in /Volumes for a list of mount points to show.
The issue, of course, is that you need to provide a username and password in the afp url:
mount volume "afp://user:password@server/share"
From there you should be able to copy your files around.
Yeah, I already tried that. I can get this script to work when logged in. I use the mount volume command and duplicate the files. The username and password are embedded per your example. It works sweet. But when the same script was triggered by iCal, here’s what I thought I saw after I logged in. I saw the volume mount, the folder opened and I thought I saw the files populate the backup location.
Now, it’s possible what I saw was just the delay of getting the icons from a foreign server. Which makes this like the problem of knowing whether your refrigerator light goes off when you close the door.
So, if you’re saying mount volume should work even when logged out, I guess I’ll login to the volume from another computer and see if the files are there.