Product: 
ccc6

There are several cloud storage solutions available that allow you to synchronize content that's stored locally on your Mac with storage hosted on the Internet. Naturally we want to be able to back up all of your data whether it's stored in the cloud or not. The manner in which cloud syncing solutions store data locally, however, can complicate how you go about backing up and restoring that data. There are two complicating factors that we will address in this article:

  • The actual location of your locally-stored data may be in a hidden location, making it difficult to find the files on your backup.
  • Some, or possibly even all of your cloud-synced files may not be permanently stored on your Mac; content that is only stored in the cloud cannot be backed up.

Local storage of cloud content is kept in a hidden location

You're typically used to accessing your cloud-synced content in the Finder's sidebar. In some cases (e.g. Microsoft OneDrive), the cloud storage solution may place an alias in your home folder that conveniently points to the location of the local copy of your data. Typically, though, that content is not stored in an obvious location, rather it's stored in the hidden "Library" folder in your home folder. Knowing where that data "lives" is key to understanding how to access that content on your backups.

Finding your cloud-synced content on the backup

If you make an ordinary backup of your startup disk, all of your locally-stored cloud content is on the backup. That content is in a hidden location, though, so follow these steps to locate that content on your backup disk:

  1. Choose Computer from the Finder's Go menu
  2. Select your backup disk, then navigate to Users > (yourname)
  3. Press Command+Shift+Period to toggle the Finder's display of hidden items
  4. iCloud: Navigate to Library > Mobile Documents
  5. Other cloud storage: Navigate to Library > CloudStorage

"iCloud Drive" is not a volume nor folder, it's actually a collection of many disparate folders

When you open "iCloud Drive" in the Finder sidebar, you see a simple list of files and folders. Some of those folders may have special icons representing the application that stores data in that folder, e.g. for Preview, Pages, TextEdit, etc. Looking at the content of iCloud Drive in the Finder, you might assume that there is a folder somewhere ("in the sidebar") that has all of those items collected together.

iCloud Drive does not work like that. What you see in the Finder is a Finder trick. iCloud Drive is actually a collection of folders hidden away in the Library folder in your home directory. Files and folders that you manually add to iCloud Drive are stored here:

Macintosh HD --> Users > (yourname) > Library > Mobile Documents > com~apple~CloudDocs

Application storage folders are kept elsewhere. If you have a Pages folder in iCloud Drive, for example, that content would be stored here:

Macintosh HD --> Users > (yourname) > Library > Mobile Documents > com~apple~Pages > Documents

Making matters even more complicated, if you choose to sync your Desktop & Documents folders (i.e. System Preferences > Apple ID > iCloud Drive > Options), the Finder will make it appear as if your Desktop and Documents folders actually reside within iCloud Drive. In fact, those folders still exist in their normal locations:

Macintosh HD --> Users > (yourname) > Desktop
Macintosh HD --> Users > (yourname) > Documents

But you won't see those folders in those locations when you navigate there in the Finder — Finder hides them.

Making backups of just iCloud Drive content

Please keep in mind that a complete backup of your startup disk will always include all locally-stored iCloud content — you are not required to set up a separate backup for iCloud content. If you specifically want to create a separate backup task for just your iCloud content, however, you may be tempted to do the following:

  1. Choose Choose a folder from CCC's Source selector
  2. Select iCloud Drive in the sidebar as the source to the task

Based on the Finder trickery noted above, you might conclude that this task is now configured to back up all content that is stored "in iCloud Drive". Again, that is not the case, because "iCloud Drive" is not a single folder with references to all of that content that you can see in the Finder. If you were to open CCC's Task Filter, you'll notice that this "com~apple~CloudDocs" folder only contains items that you have manually placed into iCloud Drive — it does not contain application-specific iCloud folders, nor the content of the Desktop and Documents folders (if you chose to sync those folders with iCloud).

If you would like to configure a task to back up all iCloud content that is stored locally, you could do the following in CCC:

  1. Choose Choose a folder from CCC's Source selector.
  2. Navigate to Macintosh HD --> Users > (yourname) > Library. If the Library folder does not appear in your home directory, press Command+Shift+Period to toggle the display of hidden items.
  3. Select the Mobile Documents folder as the source to your backup task.

Note that you're going to see the "naked" content of your iCloud Drive on the backup. All of your content that's stored locally on your Mac will be backed up, but it will not appear to be organized in the same manner in which Finder organizes it on your startup disk.

Online-only files can't be backed up

Some of cloud storage service providers offer features that allow (or even encourage/force) you to store your files only online, thus freeing up space on your hard drive. Some services that currently offer this functionality include:

  • Dropbox Professional's "Smart Sync" feature
  • Microsoft OneDrive's "Free up space" feature
  • iCloud Drive's "Optimize Mac Storage" feature
  • Google's "Drive File Stream" feature

Files that are only available online will typically have a "cloud" icon or badge in the Finder, e.g. iCloud: File only available in iCloud and Dropbox: File only available in Dropbox online

When you choose to have these services store your files only online, do so with the understanding that it's not possible to maintain a local backup of those files.

When a file stored by one of these storage services is flagged to reside only online, the local copy of your file is deleted from your Mac and replaced with a 0-byte placeholder file. If you attempt to open the placeholder file, the agent software for your storage service provider automatically downloads the data of the file to your Mac and the document opens. While this is a convenient feature that allows you to free up some space on your Mac, this feature removes files from your local storage, which means that CCC can't make a backup of these online-only files. Before using these online-only features, you should consider whether you are comfortable with not having a local backup of the files that are stored only in the cloud.

Placeholder files may be backed up, but may not function as placeholder files on the backup disk

As noted above, when you open a placeholder file in the Finder, the agent software downloads the original. Likewise, if you attempt to copy a placeholder file via the Finder from one volume to another, the agent software downloads the data to the source, then copies the original file (leaving the downloaded source file in place). CCC backups do not behave like Finder copies. And for good reason – if you have 1TB of online-only files on your 500GB SSD, you wouldn't want Dropbox or iCloud to download all of that data when CCC attempts to make a backup! Rather, CCC copies the placeholder files as they are, retaining all of the placeholder attributes of the source files. CCC makes a non-proprietary backup of your files; our goal is to make the destination files look exactly like the source files.

Some placeholder files won't function as placeholder files on the destination. OneDrive, for example, won't see a placeholder file that is outside of your OneDrive folder (i.e. on your startup disk) as a "true" placeholder file, and will not engage to download the file's data when you attempt to open it. CCC makes a best-effort attempt to not copy OneDrive placeholder files at all. Microsoft's OneDrive client software actively prevents applications from accessing those files — OneDrive placeholders are impossible to back up.

Dropbox's placeholder files function correctly when you back them up from an APFS volume to another APFS volume, and when you back them up from an HFS+ volume to another HFS+ volume. Because Dropbox uses a different proprietary technique for creating the placeholder file on each volume format, though, these placeholder files won't behave correctly when transferred from one filesystem format to another. Dropbox placeholder files will also consume considerably more space on an HFS+ formatted destination. We recommend formatting the destination as APFS (in general), but especially if you have Dropbox placeholder files in your source data set.

Google Drive File Stream uses yet another proprietary device for its placeholder files. These placeholder files (which include all Google Docs document formats) can't be opened by any application other than Google Drive, so CCC does not attempt to back them up.

OneDrive prefers cloud-only storage by default – but you can change that

If you prefer your OneDrive content to be "pinned" to your Mac:

  1. Select the OneDrive folder in the Finder
  2. Choose "as Icons" from the View menu
  3. Right-click on any white space (i.e. the background behind the folders and files)
  4. Choose to have the content always available on your Mac

Microsoft documents the functionality here, and demonstrates the procedure here.

Cloud storage services may delete online-only files from the cloud when you restore from a backup

In cases where online-only placeholder files can't be copied, those placeholder files cannot be present on a backup. If you restore a cloud storage folder from a backup, the cloud storage service may interpret the absence of a file or folder as "this item was deleted", and then apply that deletion to the content in the cloud, and also propagate that change to any other devices that have access to your cloud storage. This is typically not a disaster – most online storage providers offer a way to recover deleted files, but it could be pretty annoying.

If you're reading this because you encountered an error in your backup task indicating that CCC dropped a placeholder file, take a moment to consider whether you should continue to include your CloudStorage folder in your backups. On one hand, having a local backup of the cloud storage files that actually reside on your Mac is really nice to have. On the other hand, if you don't recall that placeholder files will be missing from your backup, then you may have some hassle in the future if/when you restore from that backup.

To exclude the CloudStorage folder from your backup:

  1. Open CCC and select the affected task
  2. Click the Task Filter button at the bottom of the window
  3. Navigate to Users > (yourname) > Library
  4. Uncheck the box next to the "CloudStorage" folder
  5. Click the Done button, then save or start your backup task

Related Documentation