Sync database error

Hi there

I’m having issues with sync and CloudKit. I have found several posts about it in here, so I would try to use one of the alternative solutions. At the moment DT is installed on my iMac and on my MacBook. How do I proceed and ensuring that my files won’t get deleted in the process?

On my iMac: I have gone through every database on the Sync preferences, and have done “Verify Database Thoroughly” for each one. One of my databases threw me an error (image attached). If I try to do “Clean database” I get a warning (image attached).

How do I proceed?

Is the database intact on one of the Mac, i.e., checked via File > Verify & Repair Database?

I’m having issues with sync and CloudKit.

The first question you need to ask yourself is, “Do I need a remote sync option?”. Consider these questions…

  • Do you have a colleague, assistant, significant other, etc. that needs frequent updates to synced data?
  • Are you using a shallow sync, i.e., Download Files: On demand in DEVONthink To Go?

If the answer is no to either question, a local sync on your network is suggested.
There is a forum post discussing the options and considerations of the available sync methods: Sync Types Explained​

If you do need a remote option, CloudKit has not been very reliable for many people ​(including developers) ​for several months.​ You may want to consider an alternative.

1 Like

Thank you for getting back to me

On my iMac the " File > Verify & Repair Database" gives me following

CleanShot 2023-08-16 at 16.31.45@2x

and on the MacBook I get

CleanShot 2023-08-16 at 16.35.14@2x

I don’t know if I need sync the way you describe it. In a perfect world I have the same content on my iMac, MacBook and iPhone. The iOS app has been useless for me for a long time. When I open the app to open a file, it does its “thing” (sync) for several minutes and sometimes hours. I often just close the app again and find alternative ways to get to my content.

I’m the only one working on my files, but I switch between machines a lot. I haven’t tried “on demand” options.

I have seen the “Sync types explained” post before, but none og the options stand out as being the perfect one for me. I’m pretty sure I don’t understand DT enough to make that call.

Isolate

I would isolate one device as the master and get it back into proper working order. Unless the iPhone has a fully intact copy, that will be one of the Macs.
Once you have a machine isolated, delete the database on the other devices.

  • In DEVONthink, select the database and choose File > Delete Database, confirming the removal.
  • In DEVONthink To Go, left-swipe the database on the databases screen, and tap the red Trash button. Okay the removal.

Cleanup

Now you have to address the missing files on the master database.

  1. Clear Window > Log.
  2. Do a File > Verify & Repair on the database.
  3. Press Repair when prompted.
  4. Press Ok in the next dialog.
  5. Check Window > Log for missing files.
  6. Control-click a result and choose Reveal if you’d like to see where the file resides in the database. Then use the Move to Trash option.
    1. If you don’t need the file, then use the Move to Trash option.
    2. If you do need the file, you’ll need to find a copy of the file and reimport it. This may involve restoring the database from your backups, opening the restored copy, and moving files between the restored and current database. When you’re done, delete the restored database so you don’t have two of the same database in the system.
  7. Empty the database’s Trash to remove the empty files.

Once that’s all finished, do a File > Verify & Repair Database to ensure the database’s health.

Sync

You need to choose an appropriate sync method. Just having an iCloud account doesn’t make it optimal, especially via CloudKit lately. (Legacy would be a better option if an iCloud sync is required.)

A Bonjour sync while the devices are on the same network is a good way to keep things in sync.
Once a sync method is chosen, you will import the cleaned up database onto the other devices.

PS: We suggest doing a Verify & Repair on your databases weekly or bi-weekly, at a minimum. You can do it more frequently, if you desire.

Thank you again. Can I just delete/uncheck the databases from the sync pref afterwards without loosing files?

I have a NAS where devices has access through VPN. I can live without DT on iOS so perhaps a local sync store would be a good method. Manually syncing with bonjour is not realistic in my workflow :sweat_smile:

No problem :slight_smile:

Can I just delete/uncheck the databases from the sync pref afterwards without loosing files?

Do you mean without deleting the databases from the other machine?

I have a NAS where devices has access through VPN.

While you’re on your own network?
And access to…?

No, I was thinking about starting all over from the others machines. I have chosen my iMac as the “master” until everything is ready. My question is about removing the iCloud sync from the iMac. Will unchecking delete any files on the machine I uncheck on?

Regarding the NAS: My iMac, MacBook and NAS are on the same network through WireGuard VPN, so I thought I could use a local store on the NAS (smb). Did I get that part wrong?

Why not use WebDAV?

No other reason than ignorance. I will look into it, thanks :pray:

I’m suggesting that because it does not require to mount the SMB volume in order to sync. I found this mounting business always a bit shaky on macOS.

1 Like

Actually seems like a very cool option. I get this “error” though. Any thoughts?

The DT folder on the NAS is already 14 GB so something seems to get uploaded :muscle:

Will unchecking delete any files on the machine I uncheck on?

No. As has been discussed often…

  • Your machines are independent. Deleting a database on one doesn’t affect the other(s).
  • Sync data is not your databases. So cleaning the sync data doesn’t affect the databases on your devices.

so I thought I could use a local store on the NAS (smb). Did I get that part wrong?

Not wrong at all and a valid option provided the NAS is mounted so DEVONthink can access the sync store. This is a good, low-hassle alternative to WebDAV IMO.