Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

anthonymoody

macrumors 68040
Original poster
Aug 8, 2002
3,120
1,211
So I moved everything in my Documents folder on my mac to my iCloud drive, and it *literally* moved them. I assumed it would copy/paste them, the way Dropbox works. Is there a way to get iCloud Drive to mirror Documents? (Or more pertinently, a way to get Documents to mirror iCloud Drive, so that if/when I make changes on my iPad they flow all the way back to Documents on my mac?)

TIA
 

aggiesrwe03

macrumors regular
Jan 25, 2009
211
22
TEXAS
If I understand you correctly you want to have the documents folder update, when you update something on your iCloud Drive? I get that but why not just store your documents folder exclusively in the iCloud drive folder? Any time you needed to you could move the documented to and from the cloud, I get what you are asking just curious why you wouldn't? Not trying to be an ass maybe you have thought of something I haven't considered. I upgraded, and moved everything to the cloud, I no longer have the files on my computer. It works for me because I have a MBP retina with 256gig, and my cloud drive is now 1TB so essentially I save HD space for programs, and use the cloud for storage. I realize that won't work for everyone just worried maybe I didn't think of something lol.
 

impaler

macrumors 6502
Feb 20, 2006
475
52
USA
It doesn't mirror a folder or drive locally. It is cached but it's transparent to the user. You just update it like any other folder, except it's synced across devices and on icloud.com.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,201
California
So I moved everything in my Documents folder on my mac to my iCloud drive, and it *literally* moved them. I assumed it would copy/paste them, the way Dropbox works. Is there a way to get iCloud Drive to mirror Documents? (Or more pertinently, a way to get Documents to mirror iCloud Drive, so that if/when I make changes on my iPad they flow all the way back to Documents on my mac?)

TIA

With Dropbox you could create a symlink to the Documents folder with this Terminal command and get the behavior you described.

Code:
ln -s ~/Documents ~/Dropbox/Documents

So I am wondering if this would do the same with iCloud Drive (assuming I have the path correct)?

Code:
ln -s ~/Documents ~/iCloud\ Drive/Documents
 

anthonymoody

macrumors 68040
Original poster
Aug 8, 2002
3,120
1,211
If I understand you correctly you want to have the documents folder update, when you update something on your iCloud Drive? I get that but why not just store your documents folder exclusively in the iCloud drive folder? Any time you needed to you could move the documented to and from the cloud, I get what you are asking just curious why you wouldn't? Not trying to be an ass maybe you have thought of something I haven't considered. I upgraded, and moved everything to the cloud, I no longer have the files on my computer. It works for me because I have a MBP retina with 256gig, and my cloud drive is now 1TB so essentially I save HD space for programs, and use the cloud for storage. I realize that won't work for everyone just worried maybe I didn't think of something lol.

I think if I simply put the Documents folder into iCloud Drive it would just do the same thing as I've already experienced...i.e. just move it. I guess what I'm really wondering is if the files are also stored locally? Which leads me to...

It doesn't mirror a folder or drive locally. It is cached but it's transparent to the user. You just update it like any other folder, except it's synced across devices and on icloud.com.

When you say cached, is that another way of saying that they're stored locally even though it doesn't obviously look that way? That would make me feel somewhat better. My fear is obviously that the cloud goes down, and I lose access to my files or worse, lose them outright.

With Dropbox you could create a symlink to the Documents folder with this Terminal command and get the behavior you described.

Code:
ln -s ~/Documents ~/Dropbox/Documents

So I am wondering if this would do the same with iCloud Drive (assuming I have the path correct)?

Code:
ln -s ~/Documents ~/iCloud\ Drive/Documents

Funny - I had that working with Dropbox and my Documents folder and it worked great. In fact, it's how I realized that moving the files from Documents -> iCloud Drive actually moved the files...my Dropbox emptied out because it was pointing/syncing to the Documents folder!

If I were to try this, is there code I should first do to disable the symlink from dropbox to Documents? Also would you please double check what you wrote for the iCloud Drive symlink? Looks like there is an inconsistent / or \ from the Dropbox one...

TIA
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,201
California
Funny - I had that working with Dropbox and my Documents folder and it worked great. In fact, it's how I realized that moving the files from Documents -> iCloud Drive actually moved the files...my Dropbox emptied out because it was pointing/syncing to the Documents folder!

Yep... that makes sense. :)

If I were to try this, is there code I should first do to disable the symlink from dropbox to Documents? Also would you please double check what you wrote for the iCloud Drive symlink? Looks like there is an inconsistent / or \ from the Dropbox one...

Just drag the Documents folder out of the Dropbox folder to the trash and the link will be gone.

Click the Desktop then the Go menu then Go to Folder and enter ~ and return and confirm the folder "iCloud Drive" is there like I think it is before you do anything. Also backup in case this goes badly.

The \ I put there is on purpose and correct. When entering folder paths in Terminal any spaces in the path will not work without that escape character \ in there. It is not needed in the Dropbox command since there are no spaces.

Let me know how it goes. :)
 

anthonymoody

macrumors 68040
Original poster
Aug 8, 2002
3,120
1,211
Yep... that makes sense. :)



Just drag the Documents folder out of the Dropbox folder to the trash and the link will be gone.

Click the Desktop then the Go menu then Go to Folder and enter ~ and return and confirm the folder "iCloud Drive" is there like I think it is before you do anything. Also backup in case this goes badly.

The \ I put there is on purpose and correct. When entering folder paths in Terminal any spaces in the path will not work without that escape character \ in there. It is not needed in the Dropbox command since there are no spaces.

Let me know how it goes. :)

Many thanks. The iCloud Drive is not in ~. Doh!

At the bottom of the Finder window, for ~ it reads:
Macintosh HD -> Users -> anthonypmoody

For iCloud Drive, the bottom of finder just reads:
iCloud Drive (preceded by a little image of a cloud)

Thoughts from here?
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,201
California
Many thanks. The iCloud Drive is not in ~. Doh!

At the bottom of the Finder window, for ~ it reads:
Macintosh HD -> Users -> anthonypmoody

For iCloud Drive, the bottom of finder just reads:
iCloud Drive (preceded by a little image of a cloud)

Thoughts from here?

In the left pane of Finder select iCloud Drive then hit command-i for the get info screen and look up where it says "Where:" and tell me the full path, then we can tweak the command to get there.
 

anthonymoody

macrumors 68040
Original poster
Aug 8, 2002
3,120
1,211
In the left pane of Finder select iCloud Drive then hit command-i for the get info screen and look up where it says "Where:" and tell me the full path, then we can tweak the command to get there.

Whoa! There is no Where field for the iCloud Drive! It's there for other local folders (I checked...)

Strange. Some new juju that Apple is doing..? It must be on my HD somewhere...right?
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,201
California
Whoa! There is no Where field for the iCloud Drive! It's there for other local folders (I checked...)

Strange. Some new juju that Apple is doing..? It must be on my HD somewhere...right?

Just tinkering on Mavericks here and the iCloud folder is at this path. Maybe it is the same for iCloud Drive in Yosemite?

Code:
~/Library/Mobile Documents/

You could try this. Make a text file with a unique name like test483.txt and put it in iCloud Drive. Then install iFileX that will allow a full system search and search for test483 and see where it is.
 

anthonymoody

macrumors 68040
Original poster
Aug 8, 2002
3,120
1,211
Just tinkering on Mavericks here and the iCloud folder is at this path. Maybe it is the same for iCloud Drive in Yosemite?

Code:
~/Library/Mobile Documents/

You could try this. Make a text file with a unique name like test483.txt and put it in iCloud Drive. Then install iFileX that will allow a full system search and search for test483 and see where it is.

Very interesting. I used Go To Folder to get to library, then clicked on the Mobile Documents folder. Inside it, rather than seeing a folder for iCloud Drive, I see all the contents of iCloud Drive. And, in the Finder tab, rather than seeing it labeled as Mobile Documents, it's labeled iCloud Drive (and the path at the bottom is just the cloud icon and iCloud Drive).

Soooooo....does this mean I should make a symlink to Mobile Documents?

BTW, THANK YOU for walking me through this. Deeply appreciated.
 

impaler

macrumors 6502
Feb 20, 2006
475
52
USA
Very interesting. I used Go To Folder to get to library, then clicked on the Mobile Documents folder. Inside it, rather than seeing a folder for iCloud Drive, I see all the contents of iCloud Drive. And, in the Finder tab, rather than seeing it labeled as Mobile Documents, it's labeled iCloud Drive (and the path at the bottom is just the cloud icon and iCloud Drive).

Soooooo....does this mean I should make a symlink to Mobile Documents?

BTW, THANK YOU for walking me through this. Deeply appreciated.

The Mobile Documents folder is the folder that OS X has stored "Documents in the Cloud" for some time. The Interwebs are full of nightmare scenarios for people that tinker directly with this folder, rather than let the apps supporting these documents to manage content in these folders. Just a fair warning to be VERY careful what you do in there.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,201
California
Very interesting. I used Go To Folder to get to library, then clicked on the Mobile Documents folder. Inside it, rather than seeing a folder for iCloud Drive, I see all the contents of iCloud Drive. And, in the Finder tab, rather than seeing it labeled as Mobile Documents, it's labeled iCloud Drive (and the path at the bottom is just the cloud icon and iCloud Drive).

Just poking around Mavericks here with iCloud, it seems to work the same way at the same path.

Soooooo....does this mean I should make a symlink to Mobile Documents?

BTW, THANK YOU for walking me through this. Deeply appreciated.

I'm thinking yes. Make sure (if you did not already) to remove that Documents folder you earlier dragged in there first though and put it back where it was.

Code:
ln -s ~/Documents ~/Library/Mobile\ Documents/Documents

Please make sure you have a good backup. I don't want to see your Documents folder go POOF! when we do this. :)
 

anthonymoody

macrumors 68040
Original poster
Aug 8, 2002
3,120
1,211
The Mobile Documents folder is the folder that OS X has stored "Documents in the Cloud" for some time. The Interwebs are full of nightmare scenarios for people that tinker directly with this folder, rather than let the apps supporting these documents to manage content in these folders. Just a fair warning to be VERY careful what you do in there.

:eek::eek::eek::eek::eek:

Just poking around Mavericks here with iCloud, it seems to work the same way at the same path.



I'm thinking yes. Make sure (if you did not already) to remove that Documents folder you earlier dragged in there first though and put it back where it was.

Code:
ln -s ~/Documents ~/Library/Mobile\ Documents/Documents

Please make sure you have a good backup. I don't want to see your Documents folder go POOF! when we do this. :)

I have removed the Documents folder from Dropbox.

I am now backing up (from iCloud Drive, as that's the only place my files are right now...) to an external drive.

Interestingly (?) I can only Copy and Paste folders that I created. The folders that Apple makes e.g. Automator, Keynote, Number, Pages, Preview, etc. cannot be copied, only moved (I won't do that). However, their contents can be Copied and Pasted, so I'll do that.

Anyway, once everything is backed up I'll try the symlink code. With all my fingers and toes crossed.

Looks like the backup is going to take a little bit...it's almost 50GB. Any other thoughts while I wait?

----------

BTW...what happens after I hit enter in terminal? I assume I just quit?

Also, is there then a symlink somewhere (desktop?) that I have to drag into dropbox?
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,201
California
Looks like the backup is going to take a little bit...it's almost 50GB. Any other thoughts while I wait?

Just to confirm. all your files (documents) are back in ~/Documents? Confirm by pasted this info the go to folder and make sure they are there.

Maybe option key drag the Documents folder to the desktop to copy it there if you have enough disk space. This will make a second copy of the whole Documents folder just to make it easier to recover if this goes bad.

BTW...what happens after I hit enter in terminal? I assume I just quit?

Assuming, you don't get an error message, nothing happens and the symlink will be in place. You will see it by going to the iCloud Drive folder and you will see a new Documents folder there with a little arrow at the bottom left. If you double click that it will jump you over to the real Documents folder.

Just type exit in Terminal then quit the app.

Also, is there then a symlink somewhere (desktop?) that I have to drag into dropbox?

Nope. If you want the Dropbox symlink back later you can rerun the earlier Dropbox symlink command I gave you.
 

anthonymoody

macrumors 68040
Original poster
Aug 8, 2002
3,120
1,211
Just to confirm. all your files (documents) are back in ~/Documents? Confirm by pasted this info the go to folder and make sure they are there.

Maybe option key drag the Documents folder to the desktop to copy it there if you have enough disk space. This will make a second copy of the whole Documents folder just to make it easier to recover if this goes bad.



Assuming, you don't get an error message, nothing happens and the symlink will be in place. You will see it by going to the iCloud Drive folder and you will see a new Documents folder there with a little arrow at the bottom left. If you double click that it will jump you over to the real Documents folder.

Just type exit in Terminal then quit the app.



Nope. If you want the Dropbox symlink back later you can rerun the earlier Dropbox symlink command I gave you.

I haven't yet put any of the documents into Documents. They're in a temp folder on an external drive (still copying). That said, somewhere along the way I have become confused. Or more confused to be accurate.

Thinking it through (and I know the thread title says what it says), I kind of feel like maybe I'd rather have Dropbox mirror iCloud Drive. Is that possible? This way, I have two cloud services, one for primary (iCloud Drive), the other for dynamic back up (Dropbox).

This way I also have full access to my documents via iCloud Drive on my iPad. And if I change something on my iPad and save it to iCloud Drive, it'll also make it over to Dropbox.

And if my desktop goes boom I still have two full sets in the cloud.

Or am I making no sense?
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,201
California
I haven't yet put any of the documents into Documents. They're in a temp folder on an external drive (still copying). That said, somewhere along the way I have become confused. Or more confused to be accurate.

Thinking it through (and I know the thread title says what it says), I kind of feel like maybe I'd rather have Dropbox mirror iCloud Drive. Is that possible? This way, I have two cloud services, one for primary (iCloud Drive), the other for dynamic back up (Dropbox).

This way I also have full access to my documents via iCloud Drive on my iPad. And if I change something on my iPad and save it to iCloud Drive, it'll also make it over to Dropbox.

And if my desktop goes boom I still have two full sets in the cloud.

Or am I making no sense?

I hear what you are saying and understand your goal, but I don't see how that would work.

In theory I suppose you could symlink the iCloud Drive folder back to a folder in Dropbox, but with all the odd folder permissions and meta data we are seeing in that iCloud Folder, I don't think it would work reliably.

If you just want to get the Documents folder synced to two places, I think you could just symlink it to both Dropbox and iCloud Drive.

Using these "sync services" like a backup is a bit dangerous. If something goes wrong with the sync service it could hypothetically reach out to your synced folders and erase everything.

How much data are we talking about total?
 

anthonymoody

macrumors 68040
Original poster
Aug 8, 2002
3,120
1,211
I hear what you are saying and understand your goal, but I don't see how that would work.

In theory I suppose you could symlink the iCloud Drive folder back to a folder in Dropbox, but with all the odd folder permissions and meta data we are seeing in that iCloud Folder, I don't think it would work reliably.

If you just want to get the Documents folder synced to two places, I think you could just symlink it to both Dropbox and iCloud Drive.

Using these "sync services" like a backup is a bit dangerous. If something goes wrong with the sync service it could hypothetically reach out to your synced folders and erase everything.

How much data are we talking about total?

Hmm. Yeah I don't want the cloud to eat my homework!

It's 50GB of data. Basically "everything in my life" going back to the beginning of computing time (which for me is...a very long time), not including photos/videos or music, which I have on external mirrored raid and also time machine back up.

I think I should put my documents back in Documents, symlink with iCloud Drive, and continue to back up the files locally with time machine. What do you think?

That said, do we know how iCloud Drive (or documents within) would work with a symlink? Will the documents be accessible from say my iPad? And once saved back to iCloud Drive from the iPad, will it push/sync a copy back to Documents? (Or is that exactly what the symlink does?)

Thanks again.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,201
California
Hmm. Yeah I don't want the cloud to eat my homework!

It's 50GB of data. Basically "everything in my life" going back to the beginning of computing time (which for me is...a very long time), not including photos/videos or music, which I have on external mirrored raid and also time machine back up.

Ahh... okay. Sounds like you have a good backup setup going there. I was just worried you were relying entirely on Dropbox for backup.

I think I should put my documents back in Documents, symlink with iCloud Drive, and continue to back up the files locally with time machine. What do you think?

That's what I'm thinking would work best.

That said, do we know how iCloud Drive (or documents within) would work with a symlink? Will the documents be accessible from say my iPad? And once saved back to iCloud Drive from the iPad, will it push/sync a copy back to Documents? (Or is that exactly what the symlink does?)

Well I guess that's what you (the guinea pig!) will be testing :D, but yes that is exactly how it works with a symlink to Dropbox with Documents, so I would think iCloud Drive will do the same. If I add a file to Dropbox from the Dropbox app on my iPhone is does appear in my ~/Documents folder. It acts just like the ~/Documents folder part of Dropbox.

I have read of Yosemite users just making a new folder in iCloud Drive and dropping files in it and that appears to work just like Dropbox does, so I believe this symlink will also.
 

anthonymoody

macrumors 68040
Original poster
Aug 8, 2002
3,120
1,211
Ahh... okay. Sounds like you have a good backup setup going there. I was just worried you were relying entirely on Dropbox for backup.



That's what I'm thinking would work best.



Well I guess that's what you (the guinea pig!) will be testing :D, but yes that is exactly how it works with a symlink to Dropbox with Documents, so I would think iCloud Drive will do the same. If I add a file to Dropbox from the Dropbox app on my iPhone is does appear in my ~/Documents folder. It acts just like the ~/Documents folder part of Dropbox.

I have read of Yosemite users just making a new folder in iCloud Drive and dropping files in it and that appears to work just like Dropbox does, so I believe this symlink will also.

Ok fantastic! That's what I'll do (also just ordered a 128GB usb stick to do manual backups every now and again to store elsewhere).

I'd buy you a beer except internet. But I owe you one, or several!

Thanks again!
 

mgirg

macrumors regular
Mar 19, 2008
106
18
Ok fantastic! That's what I'll do (also just ordered a 128GB usb stick to do manual backups every now and again to store elsewhere).

Thanks again!

Hi, I am interested in doing the same. Have you tried it yet, did it work? How did you set up the symlink?
 

anthonymoody

macrumors 68040
Original poster
Aug 8, 2002
3,120
1,211
Hi, I am interested in doing the same. Have you tried it yet, did it work? How did you set up the symlink?

So, what was the end result ? :)

Yes, please do tell us what happened, as I am looking to try this out myself.

Sorry for the delayed response. I was very nervous about the recent issues with iCloud Drive docs being erased when wiping an iDevice. So I held off trying to do too much of anything. In the interim I did three things:

-copied everything from iCloud Drive to a thumb drive (do this monthly)
-copied everything from iCloud Drive to dropbox (so the latter is now used for backup rather than access)
-copied everything from iCloud Drive to a local drive, which is now also part of my Time Machine backups

Now that iCloud Drive is baked into the iWork apps I'll probably just leave this system in place.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.