Can a symlink be used to relocate the local com~apple~CloudDocs dir to an external drive?

Before I create something that then needs to be unraveled/repaired...


I'd like to relocate the local com~apple~CloudDocs directory/cache to an external drive (my MBP and MacMinis only have 256GB SSDs).


Basically just doing a copy (cp -r) of:

/Users/<username>/Library/Mobile Documents/com~apple~CloudDocs

to a new dir on the external drive.

And then replacing .../Mobile Documents/com~apple~CloudDocs with a symlink to that new dir on the external drive.


? Has anyone done this successfully (i.e. Cloud syncing / download / remove download / sidebar / affected apps / etc - all still work ok)


? Any gotchas to know about?


? Is it better to just symlink to an empty dir on the external drive and then let Cloud syncing (re-)populate that new dir?


Thanks,

Jim


MacOS Monterey (12.3.1)




Posted on May 3, 2022 11:35 AM

Reply
7 replies

May 3, 2022 1:20 PM in response to jdub9

jdub9 wrote:

I want to copy/backup the entire contents of my iCloud Drive to an external USB/TB SSD (not that I don't trust iCloud to always be there 100% of the time

Absolutely a good idea.

I also don't want to rely on Time Machine backup to do this for me on only one of the many Macs I have around.

Time Machine is great for backups, but it isn't an archive. I'm still with you.

To copy the full contents of iCloud Drive to an external USB/TB drive - ALL of the iCloud Drive contents must first be synced to the Macs physical disk.

Yes

My iCloud Drive is at 150GB and none of my Macs have that much free drive space on Macintosh HD to accommodate the full 150GB of locally-synced iCloud Drive contents (in .../Mobile Docs/com~/apple~CloudDocs) and thus the copy operation fails when Macintosh HD fills up.

You don't have any computer with 150 GB free? That's bad.

I would prefer NOT to move my entire home directory /Users/<username> to an external drive

I haven't tried this, but it should be possible to setup a new user account on your Mac, move the home directory for that user account to the external drive, and then sign in to your iCloud account with Optimize Mac Storage turned off.


I'm not 100% certain this will work. Sometimes iCloud is very picky about "devices" and their uniqueness. But it can't hurt and it's the safest way to go.

May 3, 2022 3:02 PM in response to etresoft

> I haven't tried this, but it should be possible to setup a new user account on your Mac, move the home directory for that user account to the external drive, and then sign in to your iCloud account with Optimize Mac Storage turned off.

> I'm not 100% certain this will work. Sometimes iCloud is very picky about "devices" and their uniqueness. But it can't hurt and it's the safest way to go.


Thx. I'll give this additional-user-with-home-on-external-drive approach a try. Def seems safer than symlinking .../com~apple~CloudDocs to an external drive dir and potentially opening up some issue(s) related to that.


Thx,

Jim


May 3, 2022 12:33 PM in response to etresoft

So, the problem I'm trying to solve is this:

I want to copy/backup the entire contents of my iCloud Drive to an external USB/TB SSD (not that I don't trust iCloud to always be there 100% of the time, but just in case). I also don't want to rely on Time Machine backup to do this for me on only one of the many Macs I have around.


The problem I encountered is that:

  • To copy the full contents of iCloud Drive to an external USB/TB drive - ALL of the iCloud Drive contents must first be synced to the Macs physical disk.
  • My iCloud Drive is at 150GB and none of my Macs have that much free drive space on Macintosh HD to accommodate the full 150GB of locally-synced iCloud Drive contents (in .../Mobile Docs/com~/apple~CloudDocs) and thus the copy operation fails when Macintosh HD fills up.
  • I would prefer NOT to move my entire home directory /Users/<username> to an external drive


So, I suppose the actual problem I'm trying to solve is:

How does one copy the entire contents of their iCloud Drive to an external USB/TB drive when there isn't enough available space on their home directory drive to hold the entire iCloud Drive synced contents?


Does this make sense? (outside of "why do this?" :-)


Thx,

Jim





May 3, 2022 4:30 PM in response to Barney-15E

>Once a folder has copied, remove the download back to iCloud. Rinse, repeat.


Thx. I actually did this ONCE (in chunks), but with 150GB of iCloud Drive content, it was a total pain to do manually (and have no idea how script-able it would be, or if it's even possible to shell script the iCloud Drive "remove download" operations).


I'm going to first try etresoft's idea of creating an additional user with their home dir on an external drive and see if that works (and it if works, then cron script the copying of .../com~apple~CloudDocs to some other external backup drive).


Thx,

Jim


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.

Can a symlink be used to relocate the local com~apple~CloudDocs dir to an external drive?

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