See the post I just made at the thread you linked to.
You should keep backups of your databases on a medium such as an external drive, in case of a hard drive failure or other catastrophic event. DT Pro and Office include routines that provide a complete, compressed archive of a database – see Scripts > Export.
If you don’t have a complete backup of your database, and the database cannot be opened by the DEVONthink application, here’s a procedure that will likely recover all or most of your data:
I’m assuming that you are using DT Pro or DT Pro Office version 2.x and these instructions apply to those applications (but not to DT Personal).
If you have a good, recent external backup of your database, you should now use it. If you do not, the following procedure may let you recover a working database from the contents of the damaged database.
Here’s a procedure to recover a new database from the damaged one, based on recovery from an internal Backup folder within the database package file, and the ‘Files.noindex’ folder that holds all of your document files.
Quit the DEVONthink application. In the Finder, select the damaged database file. Control-click and make a zipped copy of it, which will be retained in case it might be needed later.
In the Finder, create a new folder, which we will use to create a new database. For the sake of illustration I’ll call it ‘Harry’ — but you can give it any name you wish, so long as the name isn’t exactly the same as the original database.
Select the damaged database file, Control-click and choose ‘Show Package Contents’.
DISCUSSION: Within the opened folder displaying the contents of your database, you will see three internal Backup folders (by default). These Backup folders contain data about the state of the database as of the time that internal backup was made. We are going to recover a previous state of your database, hopefully before it became damaged.
Normally, we start with the most recent one, check the results in the recreated database, and if that was also damaged, start over by creating another recreated database based on the next most recent backup, and so on.
Open the most recent internal Backup folder. Select ALL the contents and copy (Option-drag) them into ‘Harry’.
Now select the ‘Files.noindex’ folder and copy (Option-drag) it into ‘Harry’.
Select ‘Harry’, Control-click and choose ‘Get Info’. Within the Info panel, rename ‘Harry’ by adding the filename suffix, “.dtBase2” (without quotes). The result should be ‘Harry.dtBase2’. Close the Info panel.
8 ) ‘Harry.dtBase2’ has become a DT Pro/Office 2 database package file, with a blue shell logo. Double-click on it to open it under DT Pro/Office.
Does the database open? If so, inspect it. Does it appear to be complete at first glance? Now run Tools > Verify & Repair. If there are no errors, or if there are minor errors that are corrected on a second run of Verify & Repair, great! You have recovered a working database, although there is a possibility that you may have lost some files because of an incomplete Rebuild. You may see an Orphans folder that contains files that the database wasn’t able to place within your organizational structure; if so, choose Help and search for “orphan” to find out what to do with those files.
ELSE if the recovered database won’t open or is damaged, go back to 2) above, create a new Finder folder we’ll call ‘Joe’ and repeat the procedure using the next most recent internal Backup folder, and so on.
DISCUSSION: If all the recovery attempts failed, and if you have no other backups of your database (you should have), it’s likely that you can still recover all or most of your document files back to the Finder from the contents of the ‘Files.noindex’ folder. Within ‘Files.noindex’ your files are stored by filetype, and probably with cryptic subfolders within each filetype folder, e.g., PDFs. You can drag them into a new folder in the Finder, then capture them into a new DT Pro/Office database - but you will have lost all your organizational structure and tags.
THE IMPORTANCE OF A GOOD BACKUP STRATEGY: Bad Things can - and do - happen. Your hard drive could crash. A burglar could steal your computer equipment, or you could lose your laptop. Your house or office might be destroyed by a fire. An internet online backup service could go bankrupt and shut down.
I use and recommend a redundant backup strategy, and one that maintains backups external to the computer that hosts the database as well as to a different location than the computer that runs the database.
My DT Pro Office databases contain my most valuable information. Periodically, especially after major changes, I use File > Export > Database Archive to create a complete, compressed archive of each database. These are stored on an external hard drive. Periodically, I update the archives on a portable hard drive that I store offsite. These are my most important and reliable database backups. A similar procedure in DT Pro Office allows one to store database archives online - see Scripts > Export, which will create and store an archive on JungleDisk or iDisk.
I also use Time Machine, although I don’t make offsite or online backups of my Time Machine backups.
My DT Pro Office databases are probably worth as much to me as the combined value of my home and auto. I pay for insurance to protect me from the loss of my home and auto. A good backup strategy for your computer’s data has much the same purpose as insurance, but is much cheaper. Better yet, the data is actually recovered, so you don’t have problems such as having to buy a new car or building a new house.