iCloud Drive lost 3% of my documents

So I had “Optimize Mac Storage” checked and evidently iCloud Drive had the only copy of about 3% of my local files. I just finished rearranging my local drive and tried some bulk renaming and that’s when I discovered that a lot of my files are actually just Aliases (.filename.ext.icloud)

I have another copy of some of these 2,400 files, but probably not all.

But what a clusterfrick! It shouldn’t be this easy to get stuck in this situation. That’s bad UX/UI. The more Apple pushes customers to their cloud services, the more I am opting out.

“Optimize Mac Storage” is an option without the need of taking care of your disk space and without the need of thinking about where your data lives. If it is turned on, every document/file in certain folders potentially only lives in iCloud. If a file sitting there is being accessed, it will be downloaded automatically to the Mac. It is a very nice solution for non-tech-savvy people: their data is accessible on all their devices without the need of doing anything. And if your device fails, the new one will automatically get your data from the cloud again. No more stories about lost data because of the lack of backups (as long as everything works as advertised). To my mind, this is the perfect setup for users that are not tech-savvy and who do not really handle their data actively on their own.

If you are not that kind of a person, you have to either disable the feature or you have to be aware of how it works. Glens Fleishman did a very nice article about why you shouldn’t rely on iCloud Drive as your only backup. It explains the ramifications of iCloud Drive very nicely. Your iCloud data is data that might be cached locally or not at any given moment (enable iCloud status in the the finder in order to really see where the actual file really is).

I am somebody that enjoys iCloud Drive but I am aware that data on iCloud drive is sitting in the cloud. My desktop and my documents folder act like a temporary folder to me. Everything that is sitting there will eventually go to a different place that is under my control with its backup routines and so on. For me, it is my NAS. But it can also be something like a separate partition or a simple external drive.

If you have “deleted” or “lost” data, you should be able to recover it:

1 Like

An example of how “Optimize Mac Storage” in iCloud settings affects backup services such as Backblaze:

Will Backblaze back up iCloud Drive on Mac?

Apple’s iCloud Drive can be backed up to Backblaze on Mac as long as the files are saved locally on the computer itself and not stored solely in the cloud. To be sure your iCloud Drive files are stored on your computer and can be backed up by Backblaze, make sure the “Optimize Mac Storage” feature, which moves files off the computer to free up space, is disabled.

This shows exactly three files.
So now my hard drive is littered with files that are just aliases to icloud files which no longer exist. Somehow. Who can know? Things just happen. SHRUG

In retrospect, I probably turned on the ‘optimize mac’ feature right around the time I upgraded to Big Sur, since it required insanely huge amounts of storage space. This, combined with turning the iCloud Drive version of Desktop and Documents feature on and off has royally screwed me.

I realize that Apple is trying to hide things from the ‘typical user’ but at NO POINT did I ever see an alert or warning about this. The files in Finder appear perfectly normal. They don’t even show to be of the type of ‘Alias’ unless you are in Search mode! They look just like any other file until you try to rename or preview or open them.

And if you try to open them, you don’t get an error at all! Nothing happens, that’s it.

So yeah, no Apple One or iCloud storage accounts for me, no thank you. Never Again.

1 Like

OK, managed to restore most of the files from a separate drive, hopefully didn’t revert to an older copy but that’s still better than no copy…

This illustrates why I think it’s a bad idea to try to combine the concepts of a directory that’s synced between devices and a network mounted volume. I think it should be one or the other, but not both.

3 Likes

Explanation please? I’m sure there’s a nugget of wisdom here but I’m too dense to parse it (BTW I don’t use iCloud for this purpose at all, which I’m sure contributes to my denseness).

It’s worth noting that Apple stores local iCloud Drive files and folders in a proprietary way. Although you can browse iCloud Drive in the Finder the same way you would other cloud services (e.g. Dropbox), as far as I can tell, the folder structure is effectively lost when data is backed up to a service such as Backblaze.

In other words, while locally stored iCloud Drive data does get backed up to Backblaze, there isn’t a way to browse through the iCloud Drive folder structure using Backblaze’s restore feature. This is one of the reasons that I primarily use Dropbox for cloud storage.

In a network mounted volume, files are never resident on your local device. In a synced directory (classic Dropbox or iCloud Drive behaviour) they’re always on your local device. These (in my opinion) should be mutually exlusive states: a user should never be surprised by the fact that a file that kind of, sort of looks like it’s on a local system (and therefore (for example) is backed up by a local process) actually isn’t (and therefore (for example) hasn’t been). Surprises are wonderful in many places, but almost never when dealing with a filesystem.

iCloud Drive seems to have an option now that mixes these modes of operation, but I think it’s a mistake to do this unless you figure out a way to offer this with none of the surprises that may crop up.

Be prepared to be unpleasanlty surprised :slight_smile:

4 Likes

There isn’t a way to browse Backblaze’s “Restore” tool using the hierarchy tree that macOS generates on the fly when we look at the “iCloud Drive” folder. However if “Optimize Mac Storage” is off, then the data are uploaded by Backblaze and can be found in the mobile documents container.

1 Like

Dropbox does it too now. I fully agree with you: I will never enable any of this anywhere for anything even remotely important. This just looks like asking for trouble.

2 Likes

However if “Optimize Mac Storage” is off, then the data are uploaded by Backblaze and can be found in the mobile documents container.

To clarify, Optimize Storage is turned off on my iMac and, as far as I can tell, all of the data stored in iCloud Drive is being backed up to Backblaze. The issue is that I can’t browse the iCloud Drive data (stored in ~/Library/Mobile Documents/) in Backblaze the way that I can in the Finder.

I contacted Backblaze support a while back. They acknowledged this is an issue, but weren’t able to offer a solution. Backblaze is doing its job (i.e. it’s backing up ~/Library/Mobile Documents/), but I don’t think it’s practical for them to display the iCloud Drive folder structure that I’m used to seeing in Finder.

That is not my experience with Backblaze and iCloud Drive. Or perhaps I’ve misinterpreted what you’re saying.

It’s true that there is no “iCloud” listing when I browse my backup via Backblaze’s online View/Restore page. But in ~/Libray/Mobile Documents/com~Apple~CloudDocs, all of my hand-created folders are there, with their proper folder structure and the files within. All perfectly browsable in the Backblaze interface.

There are a lot of other directories at the “Mobile Documents” level, some of which are obscure and some of which are obvious (com~apple~Numbers). Most of the obscure ones seem to relate to apps on my iOS devices.

As far as I’m concerned, this view exactly displays the iCloud Drive folder structure that I’m used to seeing in Finder. Backblaze is simply showing its true location, while Finder is “faking” it by putting it in the sidebar. It’s not optimal, since you need to know to navigate to to the Mobile Documents directory, but it hasn’t destroyed any metadata or otherwise made it confusing to navigate.

Since I don’t plan to use this Backblaze repository except in an emergency, this is completely acceptable. In fact, I prefer Backblaze — because it’s a backup system — to accurately back up my hard drive and show me the true structure instead of what Apple’s tricks present to me in Finder.

1 Like

Thanks for your detailed feedback, @margaretamartin!

I just looked at my com~apple~Clouds folder in Backblaze restore and it contains three folders: Downloads, Hook, and Photos. There’s no obvious way to get to my my iCloud Drive:Documents folder, which is where I store the most important information. And if I search Backblaze for a folder contained within Documents, it’s nowhere to be seen (though I can find individual files if I know the names of the files I’m looking for).

Since I don’t plan to use this Backblaze repository except in an emergency, this is completely acceptable. In fact, I prefer Backblaze — because it’s a backup system — to accurately back up my hard drive and show me the true structure instead of what Apple’s tricks present to me in Finder.

Backblaze is an emergency repository for me as well. Though, the one time I needed it to recover a folder stored on iCloud Drive it didn’t end up being very helpful. Fortunately, I had another backup that contained the folder I was looking for.

Wow, that’s clearly different from what I see, and very annoying. Worse than annoying, it’s concerning. I wonder what the difference is between our setups that created this difference? From what you describe above, you have a folder at the top level of your iCloud drive that is called Documents? I wonder if that is part of the reason. (As in, “Documents” is a reserved name? More on this below.) Or maybe you just meant the contents of the iCloud drive location and not a folder specifically called “Documents”?

My top-level folders are either named by the app (like Numbers, for example) or are not names used by the system. Also, I have never turned on Optimize this Mac, and I have never used Desktop and Documents in iCloud.

One of my tech-support clients does use Desktop and Documents in iCloud, and she graciously let me do a little exploring in her Backblaze file recovery. The Desktop and the Documents folder do not appear under ~/Libray/Mobile Documents/com~Apple~CloudDocs. That gave me a bit of a panicked moment!

Instead, if I recall correctly, they appear higher up in the hierarchy and were listed as “Desktop” and “Documents”. The file structure under these two directories exactly mirrored what was visible on her Mac, making it easy to select files and folders for recovery. (I thought I had taken a screenshot of what her Backblaze hierarchy looked like, but it appears that I only grabbed an image of the nearly empty com~Apple~CloudDocs directory. It’s empty because she rarely uses iCloud Drive.)

I suppose it’s more likely that iCloud is putting your data in “strange” locations and Backblaze is simply backing it up wherever it’s found. iCloud has always been a “black box” with little documentation and no clear explanation of how it really works. I’ve been using it for many years, and it’s clear to me that it has changed a lot during that time. I believe I did a clean installation when I got my 2019 Mac, so it’s entirely possible that this cleaned out any cruft of prior iCloud usage. That is, all my iCloud data was synced to a fresh installation with the 2019 (and thus Catalina) methods of iCloud file handling. I cannot recall if I “inherited” the prior Backblaze backup on the new Mac or not.