Archive workflow (rename from Backup workflow)


I’ve searched the forum a few times on the topic of backing up DEVONthink Pro databases and content. Unless I’m overlooking it (possible), I have not yet found in the forums an existing backup solution that matches the backup workflow I’m after.

AppleScript is an “unknown” to me, and while I’ve entertained the notion of learning AppleScript, I have a steep learning curve with AppleScript.

I have 10 databases, each with varying storage sizes from ~100MB through the largest being ~23GB.

My current backup workflow looks like this,

  • Attach removable storage media
  • Create destination folder/directory YYYY-MM-DD_HH:MM
  • For each database, select it, and then File -> Export -> Database Archive... . I like the Database Archive… method because it includes the database and the content in one archive zip file.

Because the storage size of the databases are large, it will take ~45 minutes to process all 10 databases.

The backup workflow I would like to automate is noted by (script) ,

  • (human) attach removable media
  • (human) launch backup script
  • (script) Create destination folder/directory YYYY-MM-DD_HH:MM using the current date and time.
  • (script) For each database, perform File -> Export -> Database Archive... to the folder/directory YYYY-MM-DD_HH:MM
  • (script) Display message “completed msg” when all existing databases are completed archiving.
  • (human) disconnect removable media for offsite rotation.

Does anyone know if a script already exists that would accomplish the above?

FWIW, currently using DEVONthink Pro Office 2.11.3, and plan to upgrade to version 3 when it leaves beta testing. I’m unaware if there are additional features/functions in version 3 that might address what I am after.

Kind regards,

~ Jeff

Are you referring to using this as a secondary strategy? 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:​

PS: DEVONthink 3, like 2, has no file backup processes built in. Backups are up to the individual to tend to. However, there is a new technology called smart rules in DEVONthink 3 that allow for automating many things without having to know programming (though knowing AppleScript makes them even more powerful).

PPS: Using colons in a filename is not a good idea. Punctuation is best reserved to hyphens, underscores, spaces, and periods (though it’s good form to only use one period before the extension when dealing with files).

This process is for facilitating an archive of the complete data-set with the database metadata, which is placed onto external media, and rotated offsite.

  • TimeMachine is not locally used
  • Internet transport for cloud storage is not used

TimeMachine is fine solution, but it is not a panacea for every scenario.

PS: DEVONthink 3, like 2, has no file backup processes built in.

The File -> Export -> Database Archive... does include the data-set (content) along with the database. The outcome is a backup. Its semantics if an “archive” is a meaningful “backup” or not.

PPS: Using colons in a filename is not a good idea.

You are spot-on; agree. I was endeavoring to paint a complete picture of the use-case for the scripting question.