Close

iCloud Drive: The danger with Optimised Storage file placeholders

Posted on by Mike Evans

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.

Go to System Preferences, choose iCloud and then click on iCloud Drive options. See the tick box at the bottom of the frame — Optimize Mac Storage. I recommend you always leave this unticked unless you are fully aware of the potential dangers

Go to System Preferences, choose iCloud and then click on iCloud Drive options. See the tick box at the bottom of the frame — Optimize Mac Storage. I recommend you always leave this unticked unless you are fully aware of the potential dangers

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. 

Moving files

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.

If you use both iCloud (as almost all Mac users do) as well as Dropbox, this is what to check. Open Dropbox in a web browser and perform a search for ".iCloud". This will show all the files that might turn out to be empty iCloud placeholders. I was lucky, there was nothing important and I have been able to purge any placeholder files without damage

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. 

Alias files have a small black arrow on the bottom left. They mimic the contents of a file elsewhere on the computer (in this case the Dropbox folder itself and two sub-folders)

Nothing important

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. 

Dropbox warning

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.

∞ Permalink