Welcome to the forum, and good choice to use DEVONthink.
Apple’s TimeMachine backup and restore. You can do a selective restore, but it might help you with other files being restored after the reformat. Lots of articles on the “net” to explain how to do this.
Create an Archive zip of the databases, save them to the external hard disk. Read and understand the Section “A Word about Backups” starting page 19 of “DEVONthink Handbook”. (Same content in help)
As a new user, while looking at this particular section about backups, would be good for you to peruse other parts of the “DEVONthink Handbook” to at least be aware of its contents. Often a first place to go before asking questions here.
FYI: the global inbox is located at /Users/*yourusername*/Library/Application Support/DEVONthink 3/Inbox.dtBase2. The inboxes associated with individual databases are included in the respective database files.
A simple way to do what you want to achieve is to copy the file referenced above to an external drive and to put it back after the fact. If you want to keep other bits of DEVONthink (scripts, settings…) you may want to see this post and this post.
I’m sure you’ll get responses that the sync store is not a backup tool
Regardless, the sync store is an excellent tool for loading/updating databases on a device
As to backup - You should be backing up your databases
I recommend Mac Time Machine backing up to an external drive (RAID or duo drives)
Also archived copy(s) stored to both an external drive and iCloud
A problem with the sync store as a backup tool is that it’s a single snapshot of the datatabase at the most current time
If the database has been compromised, the sync store has also been compromised
Backups allow us to restore a previous version of our data to recover from a compromise
As long as the self-described “new user” has got sync running properly with everything synced so as to not have undetected data loss on the new machine. Would be hard to tell, I would guess. Unless reason not to, I’d prefer relying on the zip archive or TimeMachine. Just me.