Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An Applescript to back up five key apps System
After a few frustrating losses of data (and reverting to a week or two old backup), I decided to write AppleScripts to automate nightly backup of my most relied-on apps:
  • iCal
  • Address Book
  • Camino (bookmarks)
  • del.icio.us bookmark file HTML
  • Delicious Library
Then, once I got them all working (note that some of the code ended up needing to be plain old brute force), I put them all together into one script.

I post here not for others to use as-is, but rather so that you might glean parts that are relevant to your system/apps or adapt the whole thing or even add to it. Making frequent backups of this data is something you don't need to remember: simply open and customize as necessary in Script Editor, then save as an application (you can unclick the "Startup Screen" button so it doesn't ask if you want to run), and create an iCal event whose alarm runs the app.

Also note that:
  • All save-as locations are as default. Yes, there are ways to script it so it creates or lets you choose a folder or folders, but I wanted it to be leaner than that.
  • For a couple of them, it overwrites existing copies, and for a couple of others, it relies on there not being one there. Again, that's what worked best for me. You can adjust as needed.
  • The URL for del.icio.us bookmark export needs to be customized with your username instead of "XYZ" -- or removed, of course, if you don't use del.icio.us.
  • The delays coded into the script are what worked best for my system. Your mileage may vary.
  • For you novice AppleScripters (like me), it's a really instructive script in that it shows how some apps for some scripts will play nice with the more descriptive script language, and other times, will only work with the "dumb" brute force code of tab, tab, tab, etc.
  • Big thanks to the kind readers and coders at MacScripter who answered my questions.
  • Of course, use at your own risk, no warrantee is expressed or implied.
Hope you find it helpful.

[robg adds: This previous hint provided a solution for just backing up Address Book. As with that hint, you'll need to make sure that access for assisstive devices is enabled in the Universal Access System Preferences panel.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[16,581 views]  

An Applescript to back up five key apps | 7 comments | Create New Account
Click here to return to the 'An Applescript to back up five key apps' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An Applescript to back up five key apps
Authored by: bobw on Oct 13, '06 07:36:04AM

No Script attached to the post.



[ Reply to This | # ]
An Applescript to back up five key apps
Authored by: Ezra Balaraj on Oct 13, '06 08:05:35AM

I am sorry to note that the script wasn't attached.

---
EB



[ Reply to This | # ]
An Applescript to back up five key apps
Authored by: robg on Oct 13, '06 08:15:15AM

I blame my daughter, whom I was holding on my shoulder while finishing this hint :). Script now attached; sorry about that.

-rob.



[ Reply to This | # ]
An Applescript to back up five key apps
Authored by: frgough on Oct 13, '06 08:10:23AM

A better solution for me is to just get in the habit of dragging my user folder onto disk utility each night before I go to bed and when prompted saving the disk image to my external firewire drive.



[ Reply to This | # ]
An Applescript to back up five key apps
Authored by: macgruder on Oct 13, '06 11:05:21AM

Backup is a question of "How much is my data worth?" If the years of data you have accumulated is worth more than about $30 (and whose isn't) then SuperDuper would seem to be a no-brainer.



[ Reply to This | # ]
An Applescript to back up five key apps
Authored by: Swordfish on Oct 13, '06 12:41:59PM

Why pay when you can use a perfectly good script? :-\



[ Reply to This | # ]
An Applescript to back up five key apps
Authored by: fogboy on Nov 05, '06 08:00:30PM

howdy. i'm the orginal poster of this hint. after using the script for a while, and re-writing some of it to accomodate moving from camino to firefox (and back to camino), i thought i should relay one of the key flaws i discoverd: that depending on your connection speed, and the speed of your browser (i find FF to be a lot slower than camino), and perhaps other factors, you'll need to put in much longer delays -- both after the browser activates and before you get to the export page, and also while the del.icio.us bookmarks page is loading. after tweaking it some and changing those delays to 20, the script now works most anywhere i'm connected.



[ Reply to This | # ]