Backing Up DevonTHINK Databases without Time Machine

The Mac Power Users podcast has a way of costing me money. The most recent example of this is my purchase of DevonTHINK in January. In the months since my usage of DevonTHINK has grown exponentially and, as I’ve put more and more data into it, backing up my DevonTHINK databases has become a major concern for me. I was surprised to discover DevonTHINK doesn’t really have a built-in mechanism for creating full backups and recommends using Time Machine for creating full backups. I’m not opposed to Time Machine and my wife and I use it to backup our MacBook Pros to a Synology NAS, but I wanted additional copies of my DevonTHNIK databases to exist outside of Time Machine so I could do slightly more interesting things with them. For instance, I can back up the secondary copies t two off-site backup providers for maximum redundancy in the event of a nuclear apocalypse, zombie invasion or other equally terrifying disaster. Wait. I’d probably be dead if either of those things happened so having access to my DevonTHINK databases probably wouldn’t matter…I digress.

As it turns out, DevonTHINK databases are directories “masquerading” as flat file databases so they’re actually fairly easy to backup to any destination you like. I’m a huge fan of automation so I wrote a simple shell script to backup my DevonTHINK databases to dated folders on my NAS and a USB hard drive attached to my Mac mini ever morning at 2 A.M. My DevonTHINK databases total about 4 GB in size and I don’t want to keep too many daily copies of them around so my script also looks for folders that are more than two weeks old and deletes them along with their contents. Finally, I want to know if the backup completed successfully or not, but I hate E-mail so the script checks for my databases by name and sends me a message on Slack with either success or failure. This solution has been working great for a few weeks now and it’s nice to know my data will still be available even if my NAS, Mac mini, USB hard drive and MacBook Pro all fail simultaneously or zombies invade. Whichever comes first. Please see below for the full script and leave a comment below with any questions or comments you have.

–J

Leave a Reply

Your email address will not be published. Required fields are marked *