Sub topic 12
Troubleshooting sync problems
This chapter assumes you have iCloud Drive turned on, you know the Finder cloud and progress icons, and you can open Terminal and System Settings. It gives you a working model of how a sync stalls, then a repeatable order of checks, from least to most disruptive.
How a sync stalls
iCloud Drive moves files through a background process. On a Mac, the bird daemon (the "cloud docs" service) watches your iCloud Drive folder, uploads changes, and downloads changes made elsewhere. Almost every problem falls into one of five groups:
- The Mac cannot reach Apple's servers (network, VPN, proxy, firewall).
- The account is wrong or in a bad state (signed out, wrong Apple Account, expired sign-in).
- There is no room: either the iCloud quota is full, or the Mac's disk is too full to hold a download.
- A single file blocks the queue (name, size, or a package the service cannot handle).
- The local sync state is damaged, so the Mac and the cloud disagree about what exists.
Work through the groups in that order. The early checks are quick and rule out the cheap causes first.
Step 1: Check the connection
Sync needs a working internet connection. Open a web page to confirm you are online. Then check for the following:
- A VPN or content filter that blocks Apple's hosts. Turn it off briefly and see whether the progress icon moves.
- A network that limits traffic, such as some hotel or office networks.
- Low Data Mode or a metered connection. In System Settings, open Wi-Fi, select your network's Details, and check for Low Data Mode. iCloud may pause transfers while it is on.
You can also check Apple's System Status page (apple.com/support/systemstatus) to see whether iCloud Drive has a service outage. If it does, wait. Nothing on your Mac will fix it.
Step 2: Confirm the account
A common cause of "missing" files is that the Mac is signed in to a different Apple Account than the one that holds the files.
- Open System Settings and click your name at the top of the sidebar.
- Check the email address shown. It must match the account you use on your iPhone or iPad.
- Open iCloud, then Drive, and confirm that Sync this Mac is on.
- Look for a banner asking you to sign in again or verify your identity. Complete it.
Also check iCloud.com. If the files appear there, they are safe in the cloud and the problem is local. If they do not appear there either, the upload never finished, and you should look at the original device.
Step 3: Check storage on both sides
iCloud Drive is limited by two separate amounts of space.
| Limit | Symptom | Where to check | Fix |
|---|---|---|---|
| iCloud quota is full | Uploads stop. Files show a progress icon that never completes. You may get a "storage full" alert. | System Settings, your name, iCloud | Delete large items, or buy a bigger plan |
| Mac disk is almost full | Downloads fail or stay as cloud icons. The Mac may also remove local copies sooner. | System Settings, General, Storage | Free disk space, or use Remove Download on large files |
On the Mac, a download of a file larger than the free disk space cannot finish. If the disk is nearly full, free some space before you retry.
Step 4: Look for a problem with one file
If most files sync and one does not, the cause is probably that file. Check these things:
- Name. Avoid names that start with a period, and avoid very long names or odd characters. A file whose name begins with
.is hidden, and a name that conflicts with another file can cause a conflict copy. - Size. A single file has a size limit (Apple documents 50 GB). A very large file also takes a long time on a slow upload link, so it can look stalled when it is only slow.
- Open in another app. A file that an app is still writing to may be uploaded in pieces. Close the document and wait.
- Packages and developer folders. Folders with thousands of small files, such as
node_modules, build output, or a virtual environment, can slow the whole queue. Exclude them (see the next section).
To see the file's state from Terminal, list the folder. Files that exist only in the cloud appear as hidden placeholders named like .report.pdf.icloud:
ls -la "$HOME/Library/Mobile Documents/com~apple~CloudDocs/Documents"A placeholder with the .icloud suffix means the file is in the cloud and not yet downloaded. In Finder, right-click the file and choose Download Now to fetch it.
Step 5: Keep the problem folder out of sync
If a folder is the problem and does not belong in iCloud, add the .nosync suffix to its name. The sync service skips items with that suffix. A symbolic link under the original name lets your tools keep working:
mv node_modules node_modules.nosync
ln -s node_modules.nosync node_modulesDo this inside the iCloud Drive folder. After you rename the folder, the original name points to the local copy, and the sync service uploads only the link.
Step 6: Restart the sync service
If the checks above find nothing, restart the pieces that do the syncing. Go from the lightest option to the heaviest.
- Toggle the setting. In System Settings, open your name, then iCloud, then Drive. Turn Sync this Mac off and on again. If you are asked about removing local copies, read the message carefully. Choose to keep a copy on the Mac when offered.
- Restart the daemons. In Terminal, quit the sync processes. macOS starts them again on its own:
killall bird
killall cloudd- Restart the Mac. This clears stuck processes and network state.
- Sign out and back in. Do this only after you confirm that your files are on iCloud.com or backed up elsewhere.
Watching what the Mac is doing
Use brctl, the command-line tool for the cloud documents service, to see activity. Output varies by macOS version, and Apple does not document the tool as a public interface, so treat it as a diagnostic aid:
brctl status
brctl log --wait --shortenThe first command prints the state of the sync queue. The second streams a log. Press Control-C to stop it. Look for repeated errors that name the same file. That file is your blocker.
Missing or recovered files
If a file has vanished, check these places before you assume it is gone:
- Recently Deleted on iCloud.com. Sign in, open Drive, and choose Recently Deleted. Items stay for about 30 days.
- The Trash on your Mac. Deleting in iCloud Drive on the Mac moves the file to the Trash.
- Conflict copies. A name such as
Budget 2.xlsxmeans two devices changed the same file. Open both and keep the one you want. - Version history. Right-click the file and choose Browse All Versions, if the app supports it.
Common mistakes
- Waiting on a huge first sync. Uploading a large Desktop or Documents folder can take hours or days. Check the progress icon before you assume a failure.
- Moving files while they upload. Renaming or moving a file during upload makes the service restart the transfer for that file.
- Deleting
.icloudplaceholders. Removing a placeholder deletes the cloud file too. - Syncing a project folder. Git repositories and build folders cause many small changes. Keep them out of iCloud Drive or use
.nosync.
Exercise
A file named .plan.docx.icloud appears in your Documents folder in Terminal, and the matching file in Finder shows a cloud icon. What does this mean, and how do you get the real file?
Show answer
The file is stored in iCloud and has not been downloaded to this Mac. The .icloud item is only a placeholder. In Finder, right-click the file and choose Download Now (or open it, which also starts the download). Do not delete the placeholder, because that can delete the cloud file.
Exercise
Uploads have stopped on your Mac, but iCloud.com loads normally and your network is fine. List the next three things you check, in order.
Show answer
First, confirm the Apple Account in System Settings matches the one you expect and that Sync this Mac is on. Second, check the iCloud storage quota and the Mac's free disk space. Third, look for a single problem file or a large developer folder, and restart the sync service if nothing else explains the stall.