luke-wd

Q: How to mirror 'Documents' folder in 'iCloud Drive'

Can someone please let me know whether it is possible to store a copy (mirror) of my 'Documents' folder in my 'iCloud Drive'?

 

I have managed to do a similar thing with storing my 'Desktop' folder on Dropbox using the following symbolic link command entered into terminal:

 

ln -s ~/Desktop ~/Dropbox

 

Can anyone tell me what the symlink command would be to do that for iCloud Drive?

MacBook Air (13-inch Mid 2012), OS X Yosemite (10.10.1)

Posted on Sep 17, 2015 3:00 AM

Close

Q: How to mirror 'Documents' folder in 'iCloud Drive'

  • All replies
  • Helpful answers

Page 1 Next
  • by Alfred DeRose,

    Alfred DeRose Alfred DeRose Sep 17, 2015 3:09 AM in response to luke-wd
    Level 5 (7,153 points)
    Mac OS X
    Sep 17, 2015 3:09 AM in response to luke-wd

    Just to be clear, you realize you are not really mirroring the files but creating symlinks to the files in their original location, yes? It would help to understand what you are trying to accomplish by doing this and someone might be able to advise on a way to do what you need.

  • by luke-wd,

    luke-wd luke-wd Sep 17, 2015 3:20 AM in response to Alfred DeRose
    Level 1 (1 points)
    Sep 17, 2015 3:20 AM in response to Alfred DeRose

    The end result of what I'm trying to achieve is: if I create a new file in my documents folder, I want it to be available on my iPhone via iCloud Drive...

     

    This is exactly what happens with my desktop and Dropbox using the symlink above. Essentially any documents I create on the desktop end up being sync to my Dropbox online so I can access them from anywhere.

     

    I want to do a similar thing with iCloud Drive because I have a ton of free storage space there and none left on Dropbox...

  • by benwiggy,

    benwiggy benwiggy Sep 17, 2015 3:44 AM in response to luke-wd
    Level 4 (1,430 points)
    Mac OS X
    Sep 17, 2015 3:44 AM in response to luke-wd

    iCloud Drive is a "special" place and not really a folder in the same way that Dropbox is. Sure, there is a location in your user Library where iCD is synced to (Mobile Documents), but you can't normally access that in the Finder, and I'm not sure it would be wise to sym link to it.

     

    Why not just save files directly into iCloud Drive from the file dialog, and not put them into your Documents folder?

  • by Alfred DeRose,

    Alfred DeRose Alfred DeRose Sep 17, 2015 3:53 AM in response to luke-wd
    Level 5 (7,153 points)
    Mac OS X
    Sep 17, 2015 3:53 AM in response to luke-wd

    Exactly what Ben said. Plus, iOS9 has it's own iCloud drive app.

  • by luke-wd,

    luke-wd luke-wd Sep 17, 2015 4:53 AM in response to benwiggy
    Level 1 (1 points)
    Sep 17, 2015 4:53 AM in response to benwiggy

    Thanks Ben. I understand what you're saying about it not being a normal folder, and therefore not wise to sym link TO it. However, what about symlinking FROM it?

     

    For example, actually moving the whole 'Documents' folder into this iCD folder, and then creating a symlink back to the home drive ~/Documents. That way any files are stored in iCD without any trickery, but they are accessible from the built-in shortcuts to the Documents directory...

     

    I appreciate your suggestion of just saving files in iCD from the file dialogue instead of in the Documents folder... but my actual real motivation for this, is for files which i forget to store in a specific place, or files that an app automatically to the Documents folder without a dialogue. I want those files stored in the cloud for backup and access from any device.

     

    How can you get this symlink to work for ICD? I see this MacDropAny app can do it, so surely you can do the same thing manually...

  • by Alfred DeRose,

    Alfred DeRose Alfred DeRose Sep 17, 2015 4:56 AM in response to luke-wd
    Level 5 (7,153 points)
    Mac OS X
    Sep 17, 2015 4:56 AM in response to luke-wd

    Don't think of iCloud Drive as back up. It's a live directory. Delete something in one place and it's gone from all. Use a different backup strategy.

  • by Barney-15E,

    Barney-15E Barney-15E Sep 17, 2015 4:58 AM in response to luke-wd
    Level 8 (49,645 points)
    Mac OS X
    Sep 17, 2015 4:58 AM in response to luke-wd

    How can you get this symlink to work for ICD? I see this MacDropAny app can do it, so surely you can do the same thing manually...

    That's not linking to iCloud Drive. That is its own cloud storage.

     

    Go ahead and try symlinking to the mobile documents folder, but you may find it doesn't work because they didn't set it up to follow symbolic links. Dropbox obviously does. You will also need to ensure you have enough storage on your iCloud account to hold all the Documents as they will be copied into the Cloud. iCloud Drive doesn't just got get stuff off your computer when needed, it copies the documents into Apple's iCloud servers.

  • by luke-wd,

    luke-wd luke-wd Sep 17, 2015 5:06 AM in response to Alfred DeRose
    Level 1 (1 points)
    Sep 17, 2015 5:06 AM in response to Alfred DeRose

    Thanks Alfred, but that's not useful at all. I'm well aware of how iCD works, and that if you delete from it, it deletes everywhere. But you're not listening to what I'm trying to achieve. For whatever reason, I'm essentially trying to store my local Documents folder in the cloud. Ideally using iCD because I've paid for a ton of storage on it, and have used hardly any of it.

     

    With regards to not thinking of iCD as a type of backup: it is a type of backup, because if i lose my MacBook, all of my current files would still be accessible on all my other devices. And even better, when I get a new MacBook, I just connect it back up to iCloud, and all my files will get synced back down... i.e. restored.

     

    And before you tell me this is not a good backup strategy, for the record I have a TimeCapsule too. But storing things in the cloud not only creates redundancy from my TimeCapsule, but is also very convenient.

     

    Now could someone please just tell me how to symlink to the iCloud Drive, and make it work? Would my idea of doing it in reverse work?

  • by luke-wd,Solvedanswer

    luke-wd luke-wd Sep 17, 2015 5:19 AM in response to luke-wd
    Level 1 (1 points)
    Sep 17, 2015 5:19 AM in response to luke-wd

    You're all wrong. Barney, MacDropAny is not a cloud storage service of it's own, it literally just creates symbolic links.

     

    I just downloaded it, and it did exactly what I had suggested. It moved my 'Documents' folder into my iCD folder, and then created a symlink from that folder to my home drive.

     

    For those interested in the solution: First move the folder you want into your 'iCloud Drive' folder, and then type the following command into terminal command changing the bits in bold to whatever is relevant for you:

     

         ln -s /Users/YourUserName/Library/Mobile\ Documents/com\~apple\~CloudDocs/Documents ~/Documents

  • by wdcarter,

    wdcarter wdcarter Jul 7, 2016 9:18 AM in response to luke-wd
    Level 1 (12 points)
    iPad
    Jul 7, 2016 9:18 AM in response to luke-wd

    Bringing a post back from the dead.  I love the symbolic link option for the local Documents folder because this allows me to keep less local storage available, and access the same folder on many devices, without having to create a new folder (which can be a hassle as many applications automatically save things to the local Documents folder, as pointed out earlier in this thread).  My question is, once the symbolic link to the local Documents folder is established, how do you do the reverse on other machines (such as a new Mac)?  That is, if a symbolic link to the local Documents folder is already on one machine (i.e., the cloud-based Documents folder already exists), how do I replace the local Documents folder on a new Mac with the cloud-based one with the symbolic link.  The goal here would be to have the same identical Documents folder (based in the Cloud) on all my Macs.

  • by hh-22,

    hh-22 hh-22 Jul 11, 2016 1:12 PM in response to luke-wd
    Level 1 (4 points)
    Jul 11, 2016 1:12 PM in response to luke-wd

    Hi Luke, I am so grateful to have found this post. I've just spent an entire day trying to figure out how to do this exact thing and it seems like no one understands or has ever had a need to do this. As an autoCAD tech, I'm somewhat tech savvy however I have NO experience in using terminal commands or symlink. Would you be able to outline a step-by-step process on how  I can create a mirror folder of my documents in icloud? When you say move your folder into iCloud drive, do you mean copy and paste it into iCloud drive or actually move it from local drive into icloud?

     

    Many thanks!

  • by wdcarter,

    wdcarter wdcarter Jul 11, 2016 2:17 PM in response to wdcarter
    Level 1 (12 points)
    iPad
    Jul 11, 2016 2:17 PM in response to wdcarter

    Never mind, I found instructions for this on the MacDropAny site.  If you want to have a folder (e.g., ~/Documents) properly sync across multiple Macs, you need take both Macs offline (disconnect from the Internet) first, use MacDropAny to create your symbolic links using the same naming convention on both machines for the folder you're syncing, and then put both machines online again.  One word of caution for moving a potentially large folder like Documents to iCloud; be sure you don't have a huge file size or you'll need considerably upload speeds from your ISP.  This is particularly important because you can't pause iCloud syncing (i.e., if you're logged into your Mac and iCloud, and it's connected to the Internet, iCloud is syncing...period).  I would suggest, then, moving small files automatically and then moving large files, say, at night when you don't otherwise need your Internet connection.  I did this by creating a duplicate of the Documents folder elsewhere on the HDD and then added the files to the sym-linked Documents folder one-by-one for the large files.

  • by wdcarter,

    wdcarter wdcarter Jul 11, 2016 2:19 PM in response to hh-22
    Level 1 (12 points)
    iPad
    Jul 11, 2016 2:19 PM in response to hh-22

    Use MacDropAny linked to above.  It creates the symbolic link automatically after you make some choices in the app.  Make sure your Internet connection can handle the upload speed if you've got large files you're ultimately syncing with iCloud or your Internet connection will be tied up till the files are done syncing.  Might want to read my other comment from today about how to avoid/help this.

  • by John Lockwood,

    John Lockwood John Lockwood Jul 13, 2016 6:14 AM in response to luke-wd
    Level 6 (9,200 points)
    Servers Enterprise
    Jul 13, 2016 6:14 AM in response to luke-wd

    Rather than trying various hacks such as symbolic links which being unofficial are likely to be unreliable at best I suggest you wait till this autumn when macOS Sierra officially ships. One of the new features already announced for Sierra is that of automatic syncing of both the Desktop and Documents folders to your iCloud account and thereby syncing to all your other Macs.

     

    See http://www.idownloadblog.com/2016/06/23/macos-sierra-preview-univeral-clipboard- desktop-documents-sync/

     

    You can if you wish register for and download the public beta of macOS Sierra here - https://beta.apple.com/sp/betaprogram/

Page 1 Next