Good explanation of what happens when Desktop and Documents folders are stored in iCloud

Joined
Jan 1, 2009
Messages
15,510
Reaction score
3,874
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)

A good technical writeup of what happens and how to recover if you turn it off again and think your documents have "disappeared" somehow. SPOILER: They haven't and you can recover fairly quickly.
 

IWT


Joined
Jan 23, 2009
Messages
10,288
Reaction score
2,230
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
M2 Max Studio Extra, 32GB memory, 4TB, Sonoma 14.4.1 Apple 5K Retina Studio Monitor
A great Link, Jake.

I haven't had time to take in the whole article;

but my previous "understanding" was that Desktop and Documents folders were really meant to allow working on documents across multiple devices - and that the "other aspects" of this weren't the primary focus?

Ian
 
OP
MacInWin
Joined
Jan 1, 2009
Messages
15,510
Reaction score
3,874
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
A great Link, Jake.

I haven't had time to take in the whole article;

but my previous "understanding" was that Desktop and Documents folders were really meant to allow working on documents across multiple devices - and that the "other aspects" of this weren't the primary focus?

Ian
No, that isn't what it was for. The sharing across machines was the function of iCloud Drive, in that all systems connected to the same AppleID could see all of the items stored in iCloud Drive if iCloud drive was on, and Optimize Mac Storage was also on. Kind of like Dropbox and others in that regard.

But if you turned on the Desktop and Documents option, what happened was the the contents of Desktop and Documents were moved on the local machine to iCloud Drive, and therefore shared just like anything else in iCloud Drive. The folders where Documents and Desktops used to be locally disappeared as a result of the move, but they worked from iCloud drive. Eventually the system would also "evict" seldom-used files from the iCloud Drive by replacing the local copy with a pointer to the iCloud location where the file really was stored. That happens as a part of the "Optimize" function for anything in iCloud Drive. Any evicted file would then be downloaded "on demand" when the user wanted it, assuming the Mac had Internet connectivity and was logged into the AppleID account. What became scary for some folks what that when you turn OFF the Desktop and Documents option, the system recreated new, empty, Documents and Desktop folders where they had been originally, leading users to think that everything had been erased. The "fix" for this is to move the contents from the iCloud Drive Desktop folder and the iCloud Drive Documents folder to the new, empty locations and all is restored. Evicted files will be downloaded again, if needed, so that at the end of the process, all files will be where they "normally" are. The article goes into a lot of technical detail about HOW that process happens.

What gets ugly is that if you have two machines, lets say "Mac1" and "Mac2" and both are on the same AppleID and both have "Optimize" and "Desktop and Documents" selected, then what appears gets complex. In the cloud iCloud drive there are now three varieties of files/folders: 1) Files stored in iCloud drive on each machine that are NOT in Documets or Desktop, 2) Documents and Desktop folders from Mac1, and 3) Documents and Desktop folders from Mac2. My understanding is that iCloud does NOT merge the two machines' Documents and Desktop folders, but keeps them unique, so they have to be renamed to separate them. The system appends the name of the source machine somehow. l haven't tried it myself, but I've heard that what would appear is somethiing like "Desktop Mac1" and "Desktop Mac2" on both machines, etc. "Normally" shared files on iCloud Drive that are NOT in the Desktop or Documents folder will NOT have the appended machine because they are meant to be shared.

At least, that's how I've heard it works, and the article seems to confirm that.

I don't think Apple could have made it harder if they assigned a full time team on it! :D
 

IWT


Joined
Jan 23, 2009
Messages
10,288
Reaction score
2,230
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
M2 Max Studio Extra, 32GB memory, 4TB, Sonoma 14.4.1 Apple 5K Retina Studio Monitor
I don't think Apple could have made it harder if they assigned a full time team on it! :D

Indeed! But thanks to you, we have learned a lot about how to understand and handle this issue. Or, better still perhaps, avoid it!

Bravo, Jake.

Ian
 
OP
MacInWin
Joined
Jan 1, 2009
Messages
15,510
Reaction score
3,874
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
Indeed! But thanks to you, we have learned a lot about how to understand and handle this issue. Or, better still perhaps, avoid it!

Bravo, Jake.

Ian
Thanks, Ian, but not me, Howard Oakley. He spent a lot of time to dig into the inner workings.
 

Rod


Joined
Jun 12, 2011
Messages
9,701
Reaction score
1,888
Points
113
Location
Melbourne, Australia and Ubud, Bali, Indonesia
Your Mac's Specs
2021 M1 MacBook Pro 14" macOS 14.4.1, Mid 2010MacBook 13" iPhone 13 Pro max, iPad 6, Apple Watch SE.
As usual Oakley has provided a great explanation of the what happens "under the hood" when this feature is turned on and off.

The problem with it is that the whole process is not reversed, as could be reasonably expected by the user, when turning the feature off.
Instead the result is the recreation of the Documents and Desktop folder in the Finder sidebar but they are empty. This is bound to be a bit of a scare for a lot of users.

When this happened to me I was prepared because I had done a lot of searching and reading prior to turning the feature off. To me the notification provided by Apple does not even attempt to explain how to complete the reversal of the procedure. It merely tells you what will happen which sounds a bit ominous to say the least. It's now left up to the user to complete the restore process.

As it turns out it's very simple; open the iCloud Drive Folder > Open Documents Folder. Open a second Finder window > open the empty Documents Folder in the sidebar > Select ALL in the Documents folder in iCloud Drive's Documents Folder and drag an drop them into the System Documents Folder. In other words drag your files out of iCloud back into your local Documents and Desktop Folders.

The really good thing about this is, as Oakley points out, "they retain the same inode numbers at each stage of these processes, when they’re finally ‘moved’ manually back into ~/Documents and ~/Desktop, they have remained intact, complete with all their extended attributes and any saved versions. Thus their ‘movements’ preserve both data and metadata at all times."
 
OP
MacInWin
Joined
Jan 1, 2009
Messages
15,510
Reaction score
3,874
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
As usual Oakley has provided a great explanation of the what happens "under the hood" when this feature is turned on and off.

The problem with it is that the whole process is not reversed, as could be reasonably expected by the user, when turning the feature off.
Instead the result is the recreation of the Documents and Desktop folder in the Finder sidebar but they are empty. This is bound to be a bit of a scare for a lot of users.

When this happened to me I was prepared because I had done a lot of searching and reading prior to turning the feature off. To me the notification provided by Apple does not even attempt to explain how to complete the reversal of the procedure. It merely tells you what will happen which sounds a bit ominous to say the least. It's now left up to the user to complete the restore process.

As it turns out it's very simple; open the iCloud Drive Folder > Open Documents Folder. Open a second Finder window > open the empty Documents Folder in the sidebar > Select ALL in the Documents folder in iCloud Drive's Documents Folder and drag an drop them into the System Documents Folder. In other words drag your files out of iCloud back into your local Documents and Desktop Folders.

The really good thing about this is, as Oakley points out, "they retain the same inode numbers at each stage of these processes, when they’re finally ‘moved’ manually back into ~/Documents and ~/Desktop, they have remained intact, complete with all their extended attributes and any saved versions. Thus their ‘movements’ preserve both data and metadata at all times."
What is frustrating is that Apple didn't need to create the confusion. Adding a step to the "undo" process to move the files back from iCloud Drive to the "normal" positions should have been the default, with maybe an option to cancel that step if the user wants to do so. Sometimes software engineers are blind to the fact that "naive" users don't want to have to be experts to turn things on and off.
 

Rod


Joined
Jun 12, 2011
Messages
9,701
Reaction score
1,888
Points
113
Location
Melbourne, Australia and Ubud, Bali, Indonesia
Your Mac's Specs
2021 M1 MacBook Pro 14" macOS 14.4.1, Mid 2010MacBook 13" iPhone 13 Pro max, iPad 6, Apple Watch SE.
I agree wholeheartedly. They really only needed to say something like, "Drag the contents of the two folders into the corresponding empty folders on your Mac."
 
OP
MacInWin
Joined
Jan 1, 2009
Messages
15,510
Reaction score
3,874
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
Or just move them as part of turning the option off. No need for the user to have to do anything. The new folders are empty, so there is no conflict or duplicate file issue, so why not just finish the job? Arrrrgh.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top