I recently turned off iCloud Drive on my MacBook by accident. I understand that after turning it back on, it takes time to sync all the files back onto my computer. During this time, I checked my files ion my iPhone, they were all right. Then I created a new document under the Pages folder, hoping it would be merged with the old one. However, the old folder was replaced by this new folder which means all my old files under the Pages folder were lost. Files under other folders are not influenced.
I just checked the iCloud Drive on my iPhone. The Pages folder was empty and the "recently deleted" only contains a Pages folder with 1 document (which I assume to be the one I created).
After my previous experience with the Apple Support, I understand that each user's iCloud Drive appears to be an imaging file on the server [like .iso files on Windows] so that they can't actually manipulate or restore my documents. I just want to warn everyone:
If your iCloud Drive is syncing, do not create files[or folders] with the same name as one already existing. The new one would replace the old one.
Please update your algorithm. When syncing iCloud Drive, merge instead of replace folders with same name.