PDA

View Full Version : Cloning (synchronizing) with Applescript


Harry Cover
03-01-2010, 01:14 PM
Config:
Disk A: Boot disk
Disk B: backup disk

I have written an Applescript which copies my Disk A important database documents to Disk B (keeping all different daily versions of my work).

I would like to clone/synchronize Disk A on Disk B, so that I can boot safely from Disk B, if needed.
So, I must first copy Disk B backup folders, to disk A avoiding those folders to be erased when cloning Disk A
I have written an Applescript to perform it.
Then I would like this script to launch SD and make it:
- Repair permissions on Disk A
- Smart update Disk B from Disk A
- Quit

Is it possible ?
How ?

Thanks to help me.

dnanian
03-01-2010, 03:28 PM
Well, I'd probably just run your applescript using osascript as a 'before copy' script. Then, when it's done, your regular backup will continue, and can be configured to do the other parts.

You can get documentation for osascript in Termninal with:

man osascript

Hope that helps!

Harry Cover
03-02-2010, 01:22 AM
Yeah !!

Why have I not seen this before ? To simple ? Temporary blindness ?

Many thanks Dave.

dnanian
03-02-2010, 08:09 AM
Don't know! But this is exactly the kind of thing the 'before copy' script is for -- to let you prepare things before the copy. If there are things to clean up after, you can use the 'after copy' script, too.