How to get iCloud Drive to mirror Documents folder?

Discussion in 'Apple Music, Apple Pay, iCloud, Apple Services' started by anthonymoody, Sep 17, 2014.

  1. anthonymoody macrumors 68020

    Joined:
    Aug 8, 2002
    #1
    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
     
  2. aggiesrwe03 macrumors regular

    Joined:
    Jan 25, 2009
    Location:
    TEXAS
    #2
    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.
     
  3. impaler macrumors 6502

    Joined:
    Feb 20, 2006
    Location:
    FL
    #3
    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.
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    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
     
  5. anthonymoody thread starter macrumors 68020

    Joined:
    Aug 8, 2002
    #5
    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...

    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.

    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
     
  6. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #6
    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. :)
     
  7. anthonymoody thread starter macrumors 68020

    Joined:
    Aug 8, 2002
    #7
    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?
     
  8. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #8
    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.
     
  9. anthonymoody thread starter macrumors 68020

    Joined:
    Aug 8, 2002
    #9
    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?
     
  10. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #10
    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.
     
  11. anthonymoody thread starter macrumors 68020

    Joined:
    Aug 8, 2002
    #11
    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.
     
  12. impaler macrumors 6502

    Joined:
    Feb 20, 2006
    Location:
    FL
    #12
    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.
     
  13. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #13
    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. :)
     
  14. anthonymoody thread starter macrumors 68020

    Joined:
    Aug 8, 2002
    #14
    :eek::eek::eek::eek::eek:

    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?
     
  15. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #15
    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.
     
  16. anthonymoody thread starter macrumors 68020

    Joined:
    Aug 8, 2002
    #16
    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?
     
  17. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #17
    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?
     
  18. anthonymoody thread starter macrumors 68020

    Joined:
    Aug 8, 2002
    #18
    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.
     
  19. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #19
    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.
     
  20. anthonymoody thread starter macrumors 68020

    Joined:
    Aug 8, 2002
    #20
    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!
     
  21. mgirg macrumors regular

    Joined:
    Mar 19, 2008
    #21
    Hi, I am interested in doing the same. Have you tried it yet, did it work? How did you set up the symlink?
     
  22. silvetti macrumors 6502a

    silvetti

    Joined:
    Nov 24, 2011
    Location:
    Poland
    #22
    So, what was the end result ? :)
     
  23. PowerBook-G5 macrumors 65816

    PowerBook-G5

    Joined:
    Jul 30, 2013
    Location:
    The United States of America
    #23
    Yes, please do tell us what happened, as I am looking to try this out myself.
     
  24. arni macrumors newbie

    Joined:
    Oct 19, 2014
  25. anthonymoody thread starter macrumors 68020

    Joined:
    Aug 8, 2002
    #25
    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.
     

Share This Page