Easier Method for Exporting Whole Database?

I’ve figured out how to automate exporting my database. The following script does the job:

tell application “DEVONthink Pro”
set x to every child of root of database 1
repeat with i in x
export record i to theDestination
end repeat
end tell

My only issue is that things are a bit slow and clumsy because I’m cycling through every top level item one by one. I’d love to find a way to export the whole thing without the repeat loop. I run the script almost every day, so every bit of efficiency is welcome.

Select DT Pro Scripts (Stylized S, just to left of the Help menu bar item) > Export > Daily Backup.

This will save the export in a dated folder in /Users/YourUserName/Backup/DT Pro DatabaseNameExported/. A log of any items not exported is provided if you press Tools > Log.

I also recommend another script, Backup Archive, which is in the same location – DT Pro Scripts > Export. Backup Archive automatically runs Verify & Repair, Backup & Optimize and then creates the smallest possible archive of your database in compressed (zipped) archive format, with the backup date appended to the file name. You choose the location for this backup archive.

I’ve been using the Backup Archive script to do semi-regular backups of my DT database and I’ve been wondering if there is a way to schedule regular runs of that script (e.g., once a week). Now that I’m using things like Dropbox and SugarSync to synchronize between home and work machines, I’m getting more worried about the possibility of corruption and I’d like things to be more automatic.

I have Mozy doing regular backups of my home machine, but I’d like a second backup in case it accidentally backups a corrupted database. Plus, I like the fact that it verifies and optimizes as well.