QRecallDownloadIdentity KeysForumsSupport
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
auto unmount after action complete?  XML
Forum Index » General
Author Message
David Cretney



Joined: 03-Sep-08 18:16
Messages: 15
Offline

I want to me able to grab my laptop and go in the morning. But often It is plugged in and I forget to unmount the USB backup drive, I get to my destination and get the reminder that I failed to properly unmount the volume.

My backup action starts at 0300. How can I set it to unmount the volume when it is complete? This way if my MacBook is asleep I can unplug it and go without potential for corruption etc...

Thanks,
David
James Bucanek



Joined: 14-Feb-07 10:05
Messages: 1434
Online

David,

QRecall already unmounts the volume containing the archive, but only if it wasn't mounted when the action started. QRecall automatically tries to mount the archive volume before the action starts. If the volume previously offline and is successfully mounted, it will also attempt to unmount it again when the action finishes. If the volume was already mounted, it does nothing before or after.

So one solution would simply be to leave the volume unmounted. QRecall will mount it before the 0300 action runs, and unmount it again when it's finished.

If that's not practical (because most external drive auto-mount when connected, or maybe you're just using it for other documents), there's another approach.

You could create an epilog script to unmount the archive volume at the end of the action. A bash script to accomplish this would look like this:


QRecall provides the script with the mount point of the volume containing the archive; all this script does is pass that to the diskutil tool requesting that the volume be unmounted.

You can create this script in any plain ASCII text editor (I would suggest BBEdit, which is free to use). Save the file with 7-bit ASCII or UTF-8 encoding (no BOM) and name the file with a .sh extension. If you're not using a smart editor like BBEdit, you'll need to use the chmod a+x ... command to assign execution privileges to the script file.

Then go into capture action and add the script as the action's epilog.

Note: in all cases (this script, QRecall, dragging the volume to the trash), the volume will not be unmounted if other software has files open on it.

This message was edited 1 time. Last update was at 07-Dec-18 15:58


- QRecall Development -
[Email]
David Cretney



Joined: 03-Sep-08 18:16
Messages: 15
Offline

HI James, I followed your directions and it worked! Thanks so much.

-David
 
Forum Index » General
Go to:   
Powered by JForum 2.1.8 © JForum Team