Messed up my databases rearranging tags

Hello. I’m in desperate need of some serious advice.

Yesterday evening (after 8 pm) I was playing around with rearranging some tags (I wanted to make everything clearer using nested tags), so I dragged tags into other tags. I only discovered later that I actually rearranged tags from files that are spread over many databases (I have 9 databases). Later on I did “Verify & repair” and it found almost 2000 inconsistencies. I let everything repair… a little later I again realized that many many files were moved out of their original locations (groups) back into inboxes of some databases and all my files are really messed up and nothing is in place anymore. I have almost 30000 files in my 9 databases and putting everything back in place manually would take forever and I don’t have time for this.

My suspect now is that I mixed tags from different databases, and this confused DEVONthink, so it put the corresponding files back into inboxes?!

Fortunately, today I realized that I do have a CCC backup from 31-12-2022, and maybe even a more recent TimeMachine backup.

Can some gentle person please guide me through a decent recovery process, and maybe also explain how I messed things up? I just want everything to be as before and that all my files are back in their corresponding groups like they used to be… :frowning:

Is there any way to track changes since 31-12-2022, if I apply the backup from 31-12-2022? Because I would like to still preserve my work from 31-12-2022 until yesterday afternoon (02-01-2023, 4 pm) …

I’m really shocked right now, this is a little catastrophe for me and my work. Thank you so much in advance, for helping me out of this desaster.

EDIT: I also have 2 iOS devices (iPhone and iPad) which I usually sync over Bonjour (my Mac is the server), and which (of now) do NOT yet reflect the latest changes from yesterday evening to my database… is this of any relevance? Is there a way to “sync backwards” and revert those changes on my Mac? Or would recovering from my CCC backup be easier?

Should I manually recover the backup as described here? Restore Backup - #6 by BLUEFROG

1 Like

While sync does not serve as a backup, it may be useful in this case and also ensure the databases are in the same state on the devices.

  • Are you doing a shallow or a full sync on the mobile devices?
    • If a full sync, choose one of the mobile devices as the master, then…

Quit DEVONthink on the Mac then open DEVONthink To Go and disable the Bonjour sync. This should isolate the good copy of the database in DEVONthink To Go.

Open DEVONthink and remove each affected database via File > Delete Database. Then disable Preferences > Sync > Bonjour Options > Enable Incoming Connections.

Launch DEVONthink To Go on the master device.
Enable Settings > Bonjour, leaving the Port empty (as it will self-assign), and set the mandatory password.

In DEVONthink’s sync preferences, enable the mobile device running as the Bonjour server and enter the password.
In the Remote section you should see the databases available to import. Double-click one and save it to your Databases folder in your home directory.
Continue importing the needed databases.

When done, quit DEVONthink and run a manual CCC backup to get current.

Lastly, if you want the Mac to act as the Bonjour server, you can disable Bonjour on the mobile master device, enable incoming connections in DEVONthink, and re-enable the Bonjour sync in DEVONthink To Go.

1 Like

Mr. Bluefrog, thank you very much indeed for this super quick and helpful answer, so late in the evening! I really appreciate your service.

One more question: What do you mean by this? Should I create another CCC backup after the process? Or should I apply the CCC backup from 31-12-2022 additionally? And why would I do this?

You’re welcome!

I would just make sure your backups are current, especially once you get things back in order. You can launch CCC, select the backup you’re using, and hit the Start button to initiate a manual backup.

Got it, thanks!

One more thing I just realized: I have a PDF heavy database on my Mac, which I DO sync to my iPad. And then I have another VIDEO FILE heavy database on my Mac, which I DON’T sync to my iPad (because of storage reasons). Nevertheless, both databases are affected by my changes from yesterday evening. So this leads me to the conclusion, that I first should apply the CCC backup (to repair all databases), and then apply the “iPad backup” as you suggested, to also get the latest wanted changes?!

If yes, should I first apply the CCC backup as you described here? Restore Backup - #6 by BLUEFROG

For the unsynced database, yes it would be good to restore it from your backups.
You could also restore the synced database. However, if it were me and I knew the one on the mobile device was intact, I would delete the copy on the Mac and import it afresh so I KNOW they are in the same state.

This is obviously up to your own comfort level.

1 Like

I see! Thanks again.

So how exactly would I do that? Pardon me asking so repetitively, but I have never restored a DEVONthink database from a backup and just want to make sure everything is going well.

I guess no answer equals rtfm?! :sweat_smile:

Restoring files from a backup is not DT-specific in any way. If you have TimeMachine, simply navigate to your database folder in Finder, then activate TimeMachine and go back in it to a point where everything was ok. Then select the database(s) in TimeMachine and restore them.

You’ll probably find more information online by using your favorite search engine.

1 Like

Sorry, I’m on the road at the moment.
And the procedure for a restoration is specific to CCC. Check their help.

Yes, absolutely, that makes sense, thanks. I was just unaware of which exact files (DT database files) I have to restore and where to find them.

Am I right that in my case it is sufficient to restore just the database files (= only metadata), not the actual database contents (= documents, videos etc.) themselves?

I don’t know. I’d simply restore the complete database, i.e. the .dtBase2 file

2 Likes

Thanks!