XYMer's Home away from Home

When http://bbs.xlr8yourmac.com is down (i.e. always)
It is currently Mon Dec 22, 2014 10:22 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Oct 30, 2013 11:30 am 
Offline

Joined: Thu May 15, 2008 8:16 pm
Posts: 952
Location: Prescott, AZ
that mounts a hard drive at a certain time/date, then un-mounts it an hour later every Monday morning at 3am.

There are apps that help schedule Time Machine to run say, once a week on Mondays at 3am. I have a FW external drive I do back-ups to. Generally it's not mounted. Right now I'll mount it, run a TM back-up and unmount it myself every so often.

Just curious. I prefer to have the back up drive unmounted, things seem quieter and smoother this way.

_________________
Rich
Drink more coffee!!


Top
 Profile  
 
PostPosted: Wed Oct 30, 2013 12:35 pm 
Offline
User avatar

Joined: Thu May 15, 2008 8:13 pm
Posts: 7037
Location: Inner Suburbia
Should be fairly easy, so long as you don't want to "eject" the disk and just unmount it. Ejecting basically gets it into a state where you either have to physically unplug & plug in the device again (or reboot the system), whereas unmount leaves the HD attached but the partition isn't mounted. You can mount/unmount partitions all day long without effort, while ejecting gets them into a state where you need to manually touch them.

Time Machine runs an incremental backup every hour, that might be the activity you're seeing. Or maybe it's that plus Spotlight dutifully indexing (grrr) the latest hourly backup on the Time Machine volume.

The commands you need to execute are part of diskutil which is the command-line version of Disk Utility. diskutil unmount /Volumes/InsertVolumeNameHere will work but for diskutil mount you need the /dev/disk#s# for the volume (which diskutil will show if you use the list command - e.g. diskutil list - though it'll list every disk and partition in the system so if you have a lot of drives it can make for a long scrolling list of text).


Top
 Profile  
 
PostPosted: Wed Oct 30, 2013 12:47 pm 
Offline
Benevolent Dictator
User avatar

Joined: Mon Apr 21, 2008 2:03 am
Posts: 10853
iCal & AppleScript…

http://katiefloyd.me/blog/automatically ... e-a-backup


Top
 Profile  
 
 Post subject: Thanx guys!
PostPosted: Wed Oct 30, 2013 2:18 pm 
Offline

Joined: Thu May 15, 2008 8:16 pm
Posts: 952
Location: Prescott, AZ
Yes MB, it's not too difficult. You are right, since I was mounting/un-mounting it was pretty easy after reading the link BD posted.

Slight difference in Mavericks- the wording when scheduling a script. I created a new calendar just for this purpose, then set the event to run the scripts that I created after reading the Katie Floyd link. Turns out that 'unmount' is the command do exactly that.

Only odd thing- I had a crash into crash reporter a few times while trying to pick the file to run. It wasn't Calendar, but I quit Calendar and opened it again to get the second event scheduled. So I have 2 events, the first mounts and the second un-mounts. They are 1:30 apart, should be plenty of time. I'll see on Monday morning if it all works.

Oh, I used TimeMachineEditor (from MacUpdate) to get TM to schedule the back up at that time. It seems to work with Mavericks.

I'll report back on Monday on how it works. I wonder what else I could use all that scheduling stuff for...

_________________
Rich
Drink more coffee!!


Top
 Profile  
 
PostPosted: Thu Oct 31, 2013 10:18 am 
Offline
User avatar

Joined: Thu May 15, 2008 8:13 pm
Posts: 7037
Location: Inner Suburbia
That's interesting, I hadn't thought of using iCal for scheduling.

If you want to make the script a little more robust, instead of using diskutil mount /dev/disk#s#, issue a diskutil info /Volumes/VolumeNameHere in Terminal, then copy the Volume UUID value and replace that in your script for the mount (e.g. diskutil mount 1234-5678-9012-3456).

If you were to rearrange your computer system at some point (moving between rooms, cleaning, rearranging, etc.) and didn't plug the disk into the exact same port, it's possible for the disk#s# to change, since it queries ports in a particular order and assigns disk#s# in the order it finds them in. The only time the UUID changes is when you format the disk, so it's less likely to change.

I just poked through UUIDs last night for adding NTFS r/w support to Mavericks, and even though diskutil's help text doesn't mention accepting UUIDs, it does. It's probably in diskutil's man page, but I only read them if I'm really stuck. (which is why last night I read man fstab)


Top
 Profile  
 
PostPosted: Mon Nov 04, 2013 7:50 am 
Offline

Joined: Thu May 15, 2008 8:16 pm
Posts: 952
Location: Prescott, AZ
The Calendar events were giving me grief when creating them. Once they were done the Calendar app would launch, but the scrips didn't run. So I downloaded this app-

http://www.macscheduler.net/whatsnew.html

which does exactly what I want it to.

That app wouldn't let me select the scripts I had written. I had to export them from the script editor so they were apps and not scripts. This way works flawlessly.

For grins I tried Calendar again and selected the app from the script. I got a message saying the event couldn't open the file. Oh well, the Mac Scheduler app is free and it works.

Thanx again for the help!

_________________
Rich
Drink more coffee!!


Top
 Profile  
 
PostPosted: Mon Nov 04, 2013 8:28 am 
Offline
Benevolent Dictator
User avatar

Joined: Mon Apr 21, 2008 2:03 am
Posts: 10853
Great work, thanks Rich! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Bing [Bot], mc68k and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group