|
|
Time Machine, Multiple Disks, Headless Macs
|
|
|
|
Posting Junkie
Join Date: Mar 2004
Location: UK
Status:
Offline
|
|
I'd like to use a pair of portable USB drives to Time Machine my Mac Mini Server(s) but I need a way to make it safe for someone to pull a drive (during a certain window each day) and connect the other one so that they can always have an offsite backup.
I had an applescript for this but it doesn't seem to work properly any more and since Mountain Lion I can no longer use iCal to schedule it anyway. My script basically just ejected whichever disk was attached at 5pm, then mounted the other one at 6pm so a user could swap them over any time in between without fear of damaging the filesystem or interrupting a backup.
Does anyone have any ideas the best way to do this?
|
I have plenty of more important things to do, if only I could bring myself to do them....
|
|
|
|
|
|
|
|
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
Not sure how much you've tried, but if you just make a shell script that will unmount both drives:
umount /Volumes/BackupDrive1
umount /Volumes/BackupDrive2
It will just throw an error for the one that isn't there and keep working. You might have to manually remove the empty directory to make the new drive mount in the same location (rmdir /Volumes/BackupDrive1 in that case). The drives will then automount when a new one is plugged in. This script can be run by launchd, for instance.
http://nathangrigg.net/2012/07/sched...using-launchd/
If you want to have absolute control over where the drives are mounted, you can disable the automounting using /etc/fstab and then mount them manually in the script, but try this first.
|
The new Mac Pro has up to 30 MB of cache inside the processor itself. That's more than the HD in my first Mac. Somehow I'm still running out of space.
|
|
|
|
|
|
|
|
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
Not sure how much you've tried, but if you just make a shell script that will unmount both drives:
umount /Volumes/BackupDrive1
umount /Volumes/BackupDrive2
It will just throw an error for the one that isn't there and keep working. You might have to manually remove the empty directory to make the new drive mount in the same location (rmdir /Volumes/BackupDrive1 in that case). The drives will then automount when a new one is plugged in. This script can be run by launchd, for instance.
http://nathangrigg.net/2012/07/sched...using-launchd/
If you want to have absolute control over where the drives are mounted, you can disable the automounting using /etc/fstab and then mount them manually in the script, but try this first.
|
The new Mac Pro has up to 30 MB of cache inside the processor itself. That's more than the HD in my first Mac. Somehow I'm still running out of space.
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Mar 2004
Location: UK
Status:
Offline
|
|
Thats basically what I did except the drives both have the same name and the shell script was run from within an Applescript since iCal will only run Applescripts from events. Or at least it would. It doesn't in Mountain Lion that I can find.
Trouble is I log into a server with this setup and I get presented with a whole raft of error dialogues that have just popped up once or twice per day since my last log in.
This is so simple it should be possible to do it in a robust fashion right?
|
I have plenty of more important things to do, if only I could bring myself to do them....
|
|
|
|
|
|
|
|
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
If you want to avoid the error messages, the only way I can think of is to disable auto mount for these drives and have a script that mounts them manually.
|
The new Mac Pro has up to 30 MB of cache inside the processor itself. That's more than the HD in my first Mac. Somehow I'm still running out of space.
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Mar 2004
Location: UK
Status:
Offline
|
|
The errors were mostly about the scripts not running.
|
I have plenty of more important things to do, if only I could bring myself to do them....
|
|
|
|
|
|
|
|
hayesk
|
|
Mountain Lion's iCal stopped supporting "Run AppleScript" alerts.
The trick is to use Automator. Make a "Calendar Alarm" automator action. Then add the "Run AppleScript" step and paste your AppleScript there. Then save it and schedule it in iCal.
In iCal, make an event, set the Alert to "open file" and set it to open "yourcalendaralarm.app" that you just saved from Automator.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|
|