I would like to access iCloud drive from Terminal in order to create an emergency backup. Unfortunately, my installation of Mac OS Yosemite is not operational, so I am using recovery mode to create my backup. In this mode, the Finder is not available and iCloud Drive is not running.
I am aware that normally, the iCloud drive directories are located at
~/Library/Mobile\ Documents/com~apple~CloudDocs. Unfortunately this directory does not appear when using Terminal in recovery mode (there appears to be no Mobile Documents in Library). This makes sense, because I am not logged in as any of the users (and I believe the recovery utility runs on its own partition).
My questions are thus:
- Is there any way I can connect to and access iCloud drive directories from Terminal in Mac OS recovery mode (i.e. after booting up while holding down
cmd + r) when iCloud Drive sync is not running (as Finder isn't running)?
- How can I copy all files in a given folder (including all subfolders) into an iCloud drive directory using a Terminal command?
Should it not be possible to log into iCloud drive using Terminal, Dropbox would be an alternative. I am not sure, however, whether I can install the Dropbox command line tool in recovery mode.