Access iCloud Drive via Command Line - Where is the Truth ?

Hello friends of iCloud and especially of the iCloud Drive.


I want to access my documents which are stored in the iCloud to do a replication of the files by using RSYNC within the terminal. First of all I thought, that

 

~/Library/Mobile\ Documents/com~apple~CloudDocs

 

is the right source (https://discussions.apple.com/thread/7388762). But it seems not to be the right source.

 

This gets obvious when looking into the details in terminal and in finder. The size is different and in terminal it can only be displayed with “ls -la”.


So, this can’t be the real source for a complete synchronization.

 

Does anybody has an alternative source which can be used to do a replication of folders from iCloud to another drive?


Cheers

RACABRA

Posted on Feb 22, 2021 9:28 AM

Reply
2 replies

Feb 22, 2021 8:13 PM in response to RACABRA

RACABRA wrote:

Hello friends of iCloud and especially of the iCloud Drive.

I want to access my documents which are stored in the iCloud to do a replication of the files by using RSYNC within the terminal. First of all I thought, that
 
~/Library/Mobile\ Documents/com~apple~CloudDocs
 
is the right source (https://discussions.apple.com/thread/7388762). But it seems not to be the right source.
 
This gets obvious when looking into the details in terminal and in finder. The size is different and in terminal it can only be displayed with “ls -la”.



https://discussions.apple.com/content/attachment/b6260e57-4b6f-4860-bd11-42aa08505faa

So, this can’t be the real source for a complete synchronization.
 
Does anybody has an alternative source which can be used to do a replication of folders from iCloud to another drive?

Cheers
RACABRA

That folder is indeed a "copy" of your iCloud Drive. But not a byte by byte copy and iCloud is not designed to be managed from that local location. Caveat Emptor is in play.


The folder is hidden by default and like all things macOS, fragile if handled improperly. If you optimize iCloud Drive, that folder will have items come and go as the optimize process takes place. You will never have complete confidence that files are locally present or in iCloud only at this time.


I am no expert in command line, but I know enough to be respectful of it and to be aware.

Feb 24, 2021 12:46 AM in response to LACAllen

In the meantime I have the impression that it is NOT intended to access the files directly (hard core) within the iCloud (e.g. via terminal). It seems to be integrated very deeply in macOS without having the option to access the data as I would be able do it by using for instance a NAS.


But I'm happy to be proven wrong. 😃


Best regards

RACABRA

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Access iCloud Drive via Command Line - Where is the Truth ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.