Export Daily Backup Script crashes

I have bene trying to do an Export daily Backup of a particular database and the system just spins with a beachball and never completes. The eventual error is “DEVONthink 3 got an error: AppleEvent timed out.”

The database is one in which I have dragged mail messages in to specific folders for an archive and it contains about 30K items.

I have done a verify and repair and the database is ok.

It took several tries to even see the error message as the window with the message displays behind the DT window so the appearance is that the script completed when it didn’t.

I am running on High Sierra 10.13.6

Could you please post a screenshot of File > Database Properties? Maybe the default timeout of 20 minutes (with timeout of 1200 seconds) isn’t sufficient in this case.

here you go

Thanks for the screenshot. Does File > Export > Database Archive… work? How much time does it require?

Yes that did work took something over 30 minutes to complete, not sure on exact time. I watched it for that long then I had to go feed sheep and it was done when I came back. I was only away from my desk for half an hour so it took less than an hour total but more than half an hour.

Which brings up a question on backup practices. What are the current recommendations?

I have been doing monthly verify and repair on all my databases and weekly export daily backup archives. The archives get moved to offsite storage weekly. I also use Time Machine but have had issues when restoring DT databases from that so I don’t depend on that for the DT backups. I do a bootable clone nightly after I’ve shut down all running apps as well and once a month one goes to an offsite location. I am also in the process of implementing a long term (multi-year) backup into AWS services but that isn’t in place yet.

I’d love a way to automate the export backups by setting some sort of script that would fire off on a schedule I choose.

There’s no issue I see with your methods.

We strongly advocate proper primary backups using TimeMachine (or similar snapshot-style backup applications) and external drives. Also, you should read the recent series of articles we posted: https://www.devontechnologies.com/search?q=backups&from=blog​

That’s indeed very slow, I just tried this using a database of comparable size and it took about 150 seconds. What kind of computer do you use and how much RAM does it have?

2013 iMac running High Sierra 10.13.6 with 16GB RAM

Does the iMac have a hard disc, a fusion drive or an SSD?

1TB Hard drive with about 170GB available.

I would also like to explore this option.

We could create a smart rule to launch the script “Daily Backup Archive”. However, if we wanted the rule to be triggered daily or weekly, it’s unclear when exactly that would happen. I’d love to be able to specific “do this rule weekly, on mondays, when I quit”. Is that possible?

If not, than I was thinking of this workflow:

  1. Create a smart rule to launch the script “Daily Backup Archive” on Quit
  2. Modify the script to first check ~/Backup to see if an older backup exists
  3. If an older backup file exists, strip out the date from its filename (e.g. “Business 19-12-11.dtBase2.zip”)
  4. Check that date, and if it is older than a week, create a new backup

A couple things I’m not sure how to do yet:

  • Need the code to find that file, get its filename, and strip out the date
  • Would like a way for the script to backup all open databases, not just the active one