QRecall Community Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 

Running a script before/after back-ups RSS feed
Forum Index » Cookbook and FAQ
Author Message
Charles Watts-Jones


Joined: Oct 14, 2007
Messages: 57
Location: France
Offline
I have QRecall running a back-up in the evening every day when I am logged in. This means that a number of files are open. Of these I am particularly concerned about my email database. I use PowerMail which keeps email in one database. The PowerMail authors have recently advised that "making a backup of PowerMail's database while PowerMail is open (especially with a scheduled connection) can probably produce a corrupted backup." While, so far as I know, I haven't made a corrupted back-up, this prompts me to ask whether it is possible to script QRecall so that it closes down another programme before running and, even better, will relaunch it after.

-- Charles
James Bucanek


Joined: Feb 14, 2007
Messages: 1567
Offline
Charles Watts-Jones wrote:this prompts me to ask whether it is possible to script QRecall so that it closes down another programme before running and, even better, will relaunch it after.

That's a feature I've considered adding. Let me throw out two other features I have on the drawing board and let me know if those might also meet your needs.

One is an Application launch/close event that could trigger an action when an application is launched or quit. You could use this to create an action that would backup your mail database whenever you close your mail application.

The other is a some scripting support that would allow you to perform captures from AppleScript or a shell script. So instead of QRecall driving the process, you could have a script drive QRecall performing whatever actions it needed to before and/or after the capture.

- QRecall Development -
[Email]
Charles Watts-Jones


Joined: Oct 14, 2007
Messages: 57
Location: France
Offline
James Bucanek wrote:
Charles Watts-Jones wrote:this prompts me to ask whether it is possible to script QRecall so that it closes down another programme before running and, even better, will relaunch it after.

That's a feature I've considered adding. Let me throw out two other features I have on the drawing board and let me know if those might also meet your needs.

One is an Application launch/close event that could trigger an action when an application is launched or quit. You could use this to create an action that would backup your mail database whenever you close your mail application.

I like this though it would mean that I (the user) had to remember to close open databases before running QRecall.
James Bucanek wrote:The other is a some scripting support that would allow you to perform captures from AppleScript or a shell script. So instead of QRecall driving the process, you could have a script drive QRecall performing whatever actions it needed to before and/or after the capture.

I'm not so keen here as I'm not a good Applescripter though I guess I could modify example scripts OK.

I should explain my wishes (not wants) in greater detail. My main wish is to run back-ups with no significant databases open, in my case I define these as my email programme, my information gatherer (Yojimbo) and any FileMaker or similar database.

These wishes 'come true' if I run QRecall when I'm logged out. My habit is to log out night and put my Mac to sleep. I know QRecall won't run when the Mac is asleep so I've organised it to be woken five minutes before the back-up runs. This however fails because the 'wake-up call' doesn't mount my external drive and so QRecall can't find it. Here QRecall differs from Personal Backup which does spin up the external drive after the 'wake-up call'. Maybe I should add this feature to my QRecall wish-list(?). Having no wish to 'go under the hood' I have just found that Cocktail will allow me to set the mount of external disks without user login. I hope this will ensure that QRecall runs its back-up correctly early tomorrow morning. If not, I shall have to set QRecall to run on log-out but wonder if the external drive will be seen a minute after that occurs(?).

If all this fails, then I'm back to my first question with the addition of 'could QRecall mount external disks when needed'.

-- Charles

James Bucanek


Joined: Feb 14, 2007
Messages: 1567
Offline
OS X unmounts all ejectable volumes when you log out. So any action that use an archive on an external drive won't run while you're logged out.

I'm currently looking in to what it would take to remount a volume on an external drive when an action runs.

Note that this would work only with locally connected external drives. Network volumes can't be remounted while logged out because the network server needs a user ID and password to connect; This requires either access to a user interface or your keychain, neither of which are available when you're logged out.

- QRecall Development -
[Email]
Charles Watts-Jones


Joined: Oct 14, 2007
Messages: 57
Location: France
Offline
James Bucanek wrote:OS X unmounts all ejectable volumes when you log out. So any action that use an archive on an external drive won't run while you're logged out.

I'm currently looking in to what it would take to remount a volume on an external drive when an action runs.

I think that I've cracked my problem. Using Cocktail I have set my machine to mount external disks without user login. The machine is woken one minute before QRecall is scheduled to run. QRecall finds the external (firewire) drive, the back-up runs OK. I should add that I had to restart after using Cocktail, a straight logout/login didn't work.

-- Charles
 
Forum Index » Cookbook and FAQ
Go to:   
Mobile view
Powered by JForum 2.8.2 © 2022 JForum Team • Maintained by Andowson Chang and Ulf Dittmer