Restoring database from backup - then syncing?

A colleague has accidentally deleted some important files from his database. That deletion has synced across all the users.

We use Arq to backup all the databases every hour - so I can easily download an “older” version of his database from the time before the files were deleted, and restore this database.

My question is - what is the best way to restore this database to ensure it syncs back out to the other users?

My concern is this restored database will be seen as “older”, and the files will again be deleted when syncing to the “newer” ones across the other users?

Or is this not an issue?

Assuming the deleted files are not in the TRASH, then what I would do is restore a COPY (do not over-write) of the last “good” version of the database to your colleague’s computer (the person who deleted the files). Open the COPY database with DEVONthink, then copy the missing files from COPY to the current version of the database (drag and drop works). Then carry on as before. Eventually delete the COPY database.

If in TRASH then just put back.

I recently had to do a database restore because a smart rule I set up incorrectly tagged 8000+ files. I haven’t seen the behavior you are concerned about after the restore (I use iCloud CloudKit for sync), but your setup might be different, so I would wait for an official answer here.

What I wanted to mention though, if you know which files are missing, you could just restore them from Arq without restoring the whole database. Arq search can find them inside the database. I’ve done this before as well.

Thank you both - good suggestions. (Unfortunately the files were not in DV trash or Mac trash).

Have you checked the database for orphaned files?

You mean after restoring the database? Not sure how I do that, but I haven’t run into problems by chance so far.

No. It appears you said you restore files within the database itself, i.e., within the .dtBase2 file. Is that correct or not?

PS: File > Verify & Repair lets you check a database’s health.

Ah, I understand now.

When I used Arq to restore single files, I restored them to the Desktop first and imported them as new. I never touch the database structure itself directly.

Good catch!

PS: I do like to press cmd + option + control + y on a daily basis :slight_smile:

Excellent!
I’m glad to hear it on both counts. :smiley:

So, @peter999 : What @chrk suggested in his last post is what I’d suggest as well.

A similar issue, but in reverse (sort of).

In this case a colleague has “rejoined” our group and opened a much older version of one of our synced Databases. His old database has now synced, but at the same time also added a lot of old files which were deleted months ago.….

We have many users who all sync this database, and will now all have the extra unwanted files.

I have a copy of the “clean” database before he synced. I can easily clean the syncstore and then sync the clean database back to the syncstore.

However - my concern is if I restore (from time machine) the clean (but older) database - will it be seen as older and then all the unwanted files will be added again?

What would be the best method to restore the clean database and ensure it syncs cleanly out to the other users?

Any suggestions for this?

The safest solution is probably to…

  1. Disable the sync location on all Macs

  2. On one Mac restore the Time Machine backup of the database

  3. Use File > Verify & Repair Database…. to ensure that the restored database is fine

  4. Clean the database in the sync store (see contextual menu of Databases list in Preferences > Sync). It’s not necessary to clean the complete sync location if it should contain multiple databases. Afterwards enable the sync location again and upload the restored & verified database.

  5. On the other Macs delete (!) the database (inside DEVONthink, not via the Finder), then enable the sync location again and finally download the database from the sync location.

Thanks Cristian, I kinda figures as much…

Our users are spread far and wide around the world, so trying to get all to do this in a timely fashion is not easy…

I know it’s not possible, but having a “Master” which has “priority” and can always overwrite existing databases remotely would be ideal.

Instead of cleaning the existing database in the sync store, another option might be to create a new, second sync store and to upload the restored database to this sync store.

That is a good option, but then I need to get all users to setup the new sync store credentials, and then still be sure they only download the new one - and not to accidentally start syncing the old database into the new sync store etc.…

Some of the users are surface level only, and anything which requires changing of options, preferences or any nuts & bolts is a bit of a mission!

We have a few Windows users who access the various databases via the DT web server. That works well because on the master database they have read-only access, so can’t do anything wrong. Only the database owner has RW rights.

Before anyone suggests this should be the way for all users, the Mac users absolutely want DEVONthink and the databases available off-line, with all that DT offers. If you are used to DT software the web server is very limited.

The perfect scenario would be to have RW permissions for a DT Database between Macs. We could have some databases which all users can only view, some which certain users can edit, etc.

So a team who share a database can all have RW rights, while other users only have R rights, so they can still access the team’s info, but can’t screw it up by mistake.

I could have a master library with R rights for all, and only RW for me.

But I know this is not the essence of DT, and do not expect this to be on any request list. (although, if you want requests for DT Pro 4.….:grinning:)

A future release might support read-only databases via the synchronization.

Wow Christian - that would be fantastic!

If you need a beta tester just let me know!