Tuesday Tip: Backups (Part 2: Locally Hidden)

As mentioned last week, we sometimes receive support requests from people where the best option is to restore data from backups. All too often we find out they have not been diligent in keeping their backups current, and some have never even started them! Is there really no solution for them? For people who have used Time Machine but haven’t connected their backup drives in some time, there may be hope as Time Machine keeps a local hidden backup too.

Using restoring a DEVONthink database as an example,

  1. In the Finder, navigate to the folder where your database resides. You can do a Spotlight search for .dtBase2 and click the database in the results while holding the ⌘Command key. This will reveal the database file.
  2. Click the Time Machine icon in the menubar at the top of your screen and select Enter Time Machine. You will see the familiar “galactic timeline” just as if your backup drive was connected.
    You should find daily backups up to one week ago.
  3. Select the desired file and press the Restore button. If you had deleted the file you’re restoring, you can restore it with no more intervention. If you have a newer file, you will be prompted whether to overwrite it or not.

On a sad note: For people who have never used Time Machine, this is not be an option. You have to have turned it on and designated a drive at least once. Let this be the impetus to do it today.

And for those interested, this is what the /volumes/MobileBackups folder is. Some people have suggested deleting this volume to conserve space, but I think that would be a bad decision given its potential to save the day.

14 Responses to “Tuesday Tip: Backups (Part 2: Locally Hidden)”

  1. Bernhard says:

    Thank you so much for your tip.

  2. Jim Neumann says:

    You’re very welcome!

  3. Tim W says:

    This post is specific to restoring DEVONthink databases from local Time Machine backups. Can one also restore using DEVONthink’s sync (that I call “DEVONsync”!), either from a sync store over webdav, or from Dropbox or iCloud?

  4. Jim Neumann says:

    If the sync data is intact, yes it’s possible. However, sync is not a backup. It is neither advertised nor advocated as a backup and should not be relied on as such.

  5. Tim W says:

    I see. Would the process of restoring from a sync be as follows:

    1. Open new installation of DEVONthink -> preferences -> sync
    2. Create new sync location to remote where sync data is stored
    3. Check off the databases you want to restore
    4. Start laughing maniacally while sipping your latte?

  6. Jim Neumann says:

    No. Checking off databases only involves local databases, so you’d be uploading or merging data at that point. The Remote section shows unopened or importable databases. Right-click each and choosing Import Database, saving ideally to a folder in your Home directory like ~/Databases. Then you may maniacally laugh as required.

  7. Tim W says:

    So long as I get to laugh so hard that I fall back in my chair and spill latte everywhere.

    Thanks for the correction.

  8. Stephen Weil says:

    I tried out Step One in your email and was unable to locate the .dtBase2 file, let alone use ⌘Command to reveal the database.

    I don’t use Time Machine but rather a cloud-based backup (that backs-up selectively). I also use a cloning product (Carbon Copy Cloner) – so theoretically, I could restore the database if I knew where to find it. Could you please send me the default location?

  9. Jim Neumann says:

    Except for the Global Inbox, there is no “default location” for databases.
    Note: “cloud-based backups” are not necessarily data-safe. What are you using?

  10. Stephen Weil says:

    I use iDrive. But other than my Home Folder, I only backup specific folders inside the Library. e.g. Mail and a couple of Folders under Application Support that I know contain information I might need to restore. The clone backs-up everything (including the macOS), so I can perform a full restore but not a selective restore of only one file/folder (like DEVONThinks database.)

    If there’s no “default” location for DEVONThink databases, what do I need to do to get your Step One to work for me so that I can locate the original?

    The only other alternative would be to backup the Application Support container for DEVONThink and then I could refer back to the most recent Backup stored there and restore that.

    What say you?

  11. @ Stephen Weil: The global inbox is stored in ~/Library/Application Support/DEVONthink Pro 2/. All other databases are stored wherever you saved them in the first place. Searching in the Finder for “.dtBase2” or “kind: DEVONthink 2 Database” should reveal them all. By default DEVONthink points you to your Documents folder for creating a new database but that, of course, can be different depending on what you do with your Mac, where you usually save your documents, etc.

  12. Jeff Harper says:

    Is it easy/possible to restore a single file in a database? For instance, if I accidentally overwrite a file in my database, can I just pull the previous file out of time machine. Obviously the file is there in time machine but how do I find it down in the sea of directories that make up a DEVONThink database.

    I use Time Machine, Super Duper!, and arqbackup for my cloud backup, it would be nice to know how to restore a single database entry from any of them.

  13. Jim Neumann says:

    Restoring a single file from Time Machine may be possible, but these comments aren’t a good place for this kind of discussion. Please hop on over to our forums where we have more room. Thanks!