All of my files in ~/Documents & ~/Desktop are being kept synchronized with iCloud Drive. As well, all of the files in ~/Desktop have been indexed in a DT3 database too.
I want to turn off iCloud Drive synchronization.
As far as I understand Apple, turning off iCloud Drive synchronization all files will remain being kept in the Cloud. But if I want to keep them local so I have to move them manually from the iCloud folder into a new created folder ~/Documents.
Whats will happen with the indexed file in the database when I turn off the synchronization with iCloud Drive?
Disabling the option to keep Desktop and Documents in iCloud Drive will leave the folders in iCloud Drive (which is confusing in the first place ). They remain in iCloud Drive after disabling the option. The files are just no longer mirrored locally.
Indexed files would not be affected as the file paths don’t change.
However, if you want to get them off iCloud Drive (and this is a good idea with DEVONthink), you’d need to update the file paths of indexed files.
After you’ve moved the desired items, you can update the path of an indexed item or parent via the dropdown of the Path field in the Generic Info inspector.
AFAIK, appart from what @BLUEFROG tells you, macOS will generate two empty local folders, Documents and Desktop, hanging from your home folder, and those will be the “new” default paths for all applications. If you want to move/copy from the cloud ones, feel free to do it, but have in consideration that this will end in very confusing situations, in what you think this document is in the cloud, but it is only local to your mac, and vice-versa (I tell you this by personal experience).
Hmm. On my machine the folders ~/Documents and ~/Desktop are the folders that are being kept synchronized with iCloud Drive. So, if I would turn of the synchronization with iCloud Drive, would macOS then override these folders with two empty folders, so that I would lose all the local files on my machine?
Or would macOS only refrain from further synchronizations of these both existing folders?
To be honest, I’m not sure what you are doing nor what happens when you try to do what you are doing. But I am wondering if you have set “on” the “Optimise Mac Storage” in the iCloud setting on your Mac.
Probably the best source for these macOS questions, before you lose any data based on what folks here might say, is to call up Apple Support. They will help.
So, if I would turn of the synchronization with iCloud Drive, would macOS then override these folders with two empty folders, so that I would lose all the local files on my machine?
What local files on your machine?
And @rfog and I have both already told you what will happen.
As others have answer you here, don’t believe what you see is the truth. I don’t know the exact mechanism macOS uses to put the virtual iCloud Documents/Desktop in your home directory, but
a) You have those enabled in iCloud, they are the iCloud ones, mapped in any way into your local simulated folders
b) You have those disabled in iCloud, they are real ones existent in your home folder.
In Windows, and for OneDrive same kind of folders, it uses somewhat of “virtualization” that replaces the local ones by the cloud others internally on the fly. Any app querying user Documents folder, will get the cloud ones even if they are specified via static route (C:\users\rfog\Documents) in a relatively modern program (using the modern C++ runtimes). Apple does the same.