Apple’s iCloud Drive works away in the background and, generally, gives little problem. It is designed with the average user in mind and tends to make the right decisions for the good of eco-system dependants, particularly those who are not particularly technically aware. This week, however, I received a note from Dropbox to tell me that all was not well in my Dropbox drive — and the culprit was iCloud.
It is a concern for all Mac users who also employ Dropbox as a data store. The crux of the problem is Apple’s default Optimised Storage facility. It’s rather clever, but potentially disastrous if you don’t watch carefully.
The issue concerns files with the .icloud extension. Apple’s Optimised Storage system is designed to free up local disk space by removing, until needed, the contents of certain files. It is particularly relevant to photo and video files which tend to take up a lot of space. Left to its own devices, iCloud will remove the data from your computer and replace the file with an .iCloud placeholder. In normal circumstances, it works seamlessly. If you click on the placeholder, iCloud downloads the file contents within seconds and you do not notice that the actual data had gone temporarily AWOL. It’s pretty seamless, but therein lies the danger.
Of course not everyone likes the idea of having just one copy of a file stored in the cloud. And there can be problems if you happen across a placeholder file while not connected to the internet. A more troubling complication arises, however, if you move a file or folder from iCloud to Dropbox. If you do this, the original files will be deleted from iCloud but there is a great danger that all you are moving is a bunch of empty placeholder files. If you are not careful, you can end up with just the placeholder file and no picture or other data in any location — computer, cloud or backup disk.
I was warned by Dropbox that there were a number of files with the .iCloud extension — that is, empty placeholder files — in my Dropbox folder. Urgent investigation was necessary and I soon determined that almost all the offending files were of little consequence and were confined to just one old folder in Dropbox. But it could have been worse. I could have lost valuable data and I was very lucky.
I was already aware of problems with the iCloud’s Optimised Storage feature and was sure I had turned it off (I will explain later how to do this). Sure enough, my desktop iMac showed Optimised Storage disabled, thus preventing iCloud from deleting local content and replacing it with the potentially dangerous local placeholder files. With this in mind I couldn’t understand how the leak had occurred.
It soon turned out that my MacBook travel computer was where the problem lay. At some stage I must have left Optimised Storage switched on, possibly with the intention of saving local disk space. Or maybe I just forgot to disable it when I bought the computer. Fortunately, I don’t do much disk housekeeping on the MacBook. But it was clear that I had moved at least one folder from the iCloud-synchronised Desktop to the Dropbox folder thus copying across empty placeholder files. The original data had been lost, although Apple might be able to recover the deleted files.
Fortunately, as it turned out, there was nothing important in this folder, mostly backups of old data that was available elsewhere, but it could have been disastrous. I’ve now turned off Optimised Storage on the MacBook and this should ensure that no further .iCloud placeholder files will be created. So if I move a bunch of files from iCloud to Dropbox I will copy the contents rather than a reference file.
As far as I can see, all my data is intact. But I did have a few uncomfortable moments along the way. Despite the fact that I have a Dropbox alias folder¹ on my desktop, plus three or four aliases to individual Dropbox folders, everything seems to be running smoothly. iCloud is synchronising the alias holder (which is empty) rather than the referenced contents within that folder on Dropbox.
Dropbox warns against using symlinks in Dropbox which point to the iCloud-synchronised Documents folder or the Desktop (if enabled for iCloud sync). Aliases of Dropbox and Dropbox folders stored on the iCloud-synchronised Desktop do not appear to be a problem from my experience. But I would recommend you should be careful when using folder aliases.
How to find out if you have orphan iCloud files in Dropbox? Open your Dropbox drive at Dropbox.com and perform a search on “.icloud”. You are looking for files using the .icloud extension rather than other references to iCloud. If you do have such files, you can then investigate the source and eradicate it.
Unless you are desperately short of local storage, I would always recommend turning off automatic Optimised Storage. To do this:
- Open System Preferences and select iCloud.
- In the opening dialogue box click on the Options button to the right of iCloud Drive.
- In the following dialogue box you will find the toggle box for Optimise Storage at the bottom of the frame.
This is the note I received from Dropbox which caused a few sleepless moments:
We’re reaching out because we’ve detected one or more .iCloud placeholder files in your Dropbox. These placeholder files could lead to data loss if no action is taken, as the recent release of macOS Sierra has changed the way Dropbox is able to sync files in some circumstances.
To make sure all your files are safe, please follow these steps:
Search for .iCloud files on Dropbox. Using the search bar on dropbox.com, type in .iCloud to see which files in your Dropbox are affected. When you’ve identified those files, you’ll need to recover the actual versions from iCloud (follow Apple’s instructions here).
Update to the latest version of the Dropbox desktop client (version 11.4.22). To ensure Dropbox continues to sync properly, download the latest version of the desktop client.
Manage warning notifications. You may see warning notifications from iCloud when you move files from an iCloud-synced folder into Dropbox. You can opt out of these notifications by following these steps.
Why is this happening?
The .iCloud file type is a “placeholder file” created by iCloud when it tries to free up disk space on Mac devices, as part of Apple’s new Optimize Storage feature. Placeholder files take up very little disk space because they don’t have any of the information that makes up the actual file. You can think of a placeholder file as a map to the actual file—the placeholder file lives on your device, while the actual file it represents lives on the iCloud server.
Unfortunately, moving .iCloud files into Dropbox can cause some serious issues. iCloud treats the file move as a deletion from iCloud, and it deletes the actual file on the iCloud server. In some cases, iCloud will move only the placeholder file into Dropbox, so Dropbox will sync that placeholder instead of your actual file. In this scenario, neither Dropbox nor iCloud still has the actual file.
This scenario can also occur if you’ve moved your Dropbox to a location synced by iCloud (like Documents or Desktop), or if you have a symlink to Dropbox in one of those locations.
For more information on Dropbox and iCloud on macOS Sierra, visit our help center
¹ Alias folder or file: You can create a copy of any file or folder and move it to another location where it acts as an alias for the original. For instance, create an alias (File, Make Alias) of the Dropbox folder and it becomes an empty reference folder to the original (similar but not identical to iCloud’s placeholders). Transfer the alias to another location, for instance the Desktop, and you can see the entire contents of the Dropbox folder even though it isn’t physically located on the Desktop. Note that this is not recommended by Dropbox but I have not noticed any problems other than as outlined above.