DT desktop and mobile databases out of sync for 8 months - how do I avoid data loss?

DTTG on my iPad and iPhone has not been synchronised since around February this year. I think they stopped syncing when I switched my Sync option from iCloud (Legacy) to iCloud (CloudKit) on my Mac.

When I go to turn on Sync, I receive a pop-up warning:

Warning
This database has not been downloaded completely to this device. Uploading it to a new sync location could cause problems if you haven’t uploaded it fully to the sync store already from another device.
Button: Proceed anyway

If I turn on Sync on my iPhone and iPad, will I be at risk of data loss? My Mac database is the most important, so I would not want to risk losing any files there.

I have mainly used DTTG to capture content from the web, so ideally I would not want to lose any of my research in there.

TL;DR: How can I turn on sync on my iPad & iPhone and get everything back in sync with my main Mac database, without losing any data.

Did you clean the Legacy sync location?
If not, enable it in DEVONthink To Go again. Then enable syncing the database in the CloudKit location and press proceed. Data will be imported from the legacy location as needed until the CloudKit sync is finished.

Thank you. I will give that a go today.

Should I also enable the Legacy sync location on DevonTHINK for Mac? Or just keep CloudKit on Mac?

You’re welcome.
Just keep CloudKit on the Mac.