67

I got the macOS Sierra update when it went into public beta, and I've been trying to use the automatic Desktop / Documents upload feature with iCloud Drive.

I've enabled the feature, however since September 7 no files have been uploaded. By this point, the bottom of my Finder windows say:

15.78 GB available on iCloud, uploading 156,106 items (543.2 MB of 543.2 MB)

However the files are never actually uploaded. I keep my screenshots folder on my desktop and I take a lot of screenshots, so I can see that September 7 was the last date any file was actually uploaded.

What should I do? Is there a way I can disable and re-enable the feature without risking loss of data? Are there any solutions to this problem? What should I try? So far I've tried rebooting, and tried software update to macOS 10.12.2 public beta.

pkamb
  • 8,791
  • 1
    Other questions of this, ordered by number of votes: https://superuser.com/q/1045791/203848, https://apple.stackexchange.com/q/313716/63255, https://apple.stackexchange.com/q/293051/63255. Most successful resolutions seems to be killall bird, and if necessary first deleting ${HOME}/Library/Application Support/CloudDocs/. – Carl Apr 18 '23 at 11:38

9 Answers9

34

I saw this comment in one of the threads here and it worked for me:

"I found killall bird can reset the upload and then my stuck is resolved" – @zhangciwu

23

do not forget that osx is based on unix. what helped me is changing of 'bird' process priority ('bird' process is responsible for icloud replication).

  1. Double click on ☁️ iCloud icon in finder to see progress.

enter image description hereenter image description here

  1. Go to Terminal

  2. ps aux | grep bird.

You will see your bird process id, in my case it is 815.

serg               815  98.8  0.8  4542828 137776   ??  U    Thu09PM 2047:53.94 /System/Library/PrivateFrameworks/CloudDocsDaemon.framework/Versions/A/Support/bird
  1. Check current priority of bird process
ps -fl -C 815

(Replace 815 on your bird process id from step 3). If you never changed it before, it will be 0 (under NI column, but formatting of output is not nice).

  1. Change priority (negative numbers are high priority, based on research -20 is the highest, but do not put it, I suggest to put -10) to do it.
sudo renice -n -10 -p 815

(again replace 815 on your bird process id from step 3). It will ask for password if you are not root currently in terminal.

  1. If it worked, you should see progress in the iCloud progress dialog you opened on step 1. I cannot guarantee it will work always, as iCloud is blackbox. Unfortunately i.e. mac has a unix core, but all above it is blackbox proprietary software
  • oh wow this actually helped! thx a lot – Karel Bílek Sep 10 '20 at 17:12
  • Has something changed in using the zsh in macOS Monterey? I've tried this command but it increased the priority from 824 to 796, no more. In my case the progress bar is stuck at 100% completion and doesn't go away. I wonder if there would be a way to check exactly what files are being sync'd as there is no dashed cloud in Finder anywhere. – NotationMaster Dec 28 '21 at 12:01
  • 43
    I found killall bird can reset the upload and then my stuck is resolved – zhangciwu Dec 29 '21 at 14:11
  • 1
    This should be the accepted answer. The other answers will do the exact same thing but with deleting all files on icloud and then reuploading them which this method doesnt. (Plus the other methods do not increase process priority making it more likely for the sync to fail again) – ohcibi Feb 07 '22 at 17:59
  • 1
    Doesn't work for me at all. Also tried killall bird and it restarts the process but the sync still gets stuck – Anders Emil Jun 24 '22 at 08:22
  • killall bird worked also in my case. I think that if the file is still stuck, perhaps is a problem with the file itself. – lpuerto Jul 08 '22 at 07:10
  • nice explanation but the only thing that worked for me was to kill that bird (pun intended) – Luciano Jul 28 '22 at 15:22
  • Excellent answer, I didn't even think about the fact that it could be the priority of the process! In my case killing the bird process is not enough maybe because somehow that bird process is never high priority enough but following these steps at least helped me get the upload/download started! – Perennialista Dec 27 '23 at 04:19
5

Happened to me as well, here is what I did:

  1. Back up all items in the Documents and Desktop folders
  2. Open up System Preferences
  3. Click on iCloud
  4. Click on Options next to iCloud Drive
  5. If Desktop and Document Folders is disabled, enable it
  6. If it enabled, un-enable it.
  7. Uncheck the Optimize Mac Storage and click Done
  8. Redo the opposite of this to re-enable iCloud
  9. Move all Documents and Desktop items back to their respective area.

It is helpful to note if you are experiencing sync issues in any of the other categories in iCloud Drive, try disabling them and then re-enabling them.

  • 3
    Since not all items are backed up won't this cause a loss in data? It displays a warning about how documents will be removed... – Luke Taylor Dec 15 '16 at 05:56
  • @LukeTaylor I don't think it should wipe anything from your local storage, and when you turn it back on, it will start the sync again, replacing all duplicated files. – Rushil Srivastava Dec 15 '16 at 22:45
  • 3
    Unchecking the box brings up a warning that "if you continue, items will be removed from the Desktop and Documents folder on this mac and will remain available in iCloud Drive". It's kind of ambiguous about how it will treat unsynced items. – Luke Taylor Dec 15 '16 at 22:49
  • @LukeTaylor, In finder, do you see the iCloudDrive on the top left? Click on it and let me know if your files are inside the documents and desktop folder – Rushil Srivastava Dec 16 '16 at 01:05
  • 1
    They are, but I haven't yet disabled the iCloud sync for these. Most of them have the ☁️ icon indicating that they haven't yet been uploaded. – Luke Taylor Dec 16 '16 at 01:19
  • @LukeTaylor Interesting, can you by any chance backup your data to an off-source location such as a hard-drive or another cloud option such as Google Drive or Dropbox? – Rushil Srivastava Dec 16 '16 at 02:56
  • Turning off and on didn't help. All of iCloud drive is stuck, as it turns out. I've tried relaunching finder, etc. I'll edit my question. – Luke Taylor Dec 16 '16 at 04:53
  • @LukeTaylor When you say "relaunching", I assume you force-quit and let it relaunch? Can you try moving all desktop and document items to a temporary new location that is not affiliated with Desktop or Documents. If the syncing message does not appear, move all items back into their regular place and let them sync. If it does appear, toggle it on and off like my solution above suggested. Let me know how it works out. – Rushil Srivastava Dec 16 '16 at 08:15
  • This is not a solution. What it does is that it stops the upload process and restarts it once you re enable icloud. Its exactly the same solution as the top answer but here you have to re upload all your icloud content. – ohcibi Feb 07 '22 at 19:44
  • I would not recommend the steps in this answer. Just executing step 7 alone would cause all data to be downloaded to the Mac. Then you would have to re-upload everything. – Mihai Feb 19 '22 at 11:23
3

This worked for me:

In Finder, use keyboard shortcut Shift + Command + G and type in “~/Library/Application Support/”, there’s a folder called CloudDocs. Chances are this is the culprit. Delete it (or move it elsewhere) and iCloud will reset itself and stop looping and re-caching the same files over and over again.

Source: https://sleonproductions.com/how-to-fix-icloud-drive-stuck-at-uploading-in-mac/

Mark
  • 41
  • This solution should get more attention. This is the only thing that unstuck iCloud for me. Directories and files which had seemingly permanent cloud icons next to them finally synced. Note that it did take some time as it seemed to re-evaluate what needed to be uploaded/downloaded, but resetting the process is exactly the idea. Also, my CloudDocs directory had several hundred gigs of cached files in it! Digging into those files indicated that they were related to the directories that were stuck. So I also regained considerable disk space by deleting it. – daxmacrog Nov 18 '23 at 19:35
1

You can try the following command from the console. It will recursively traverse your directory while updating the last modified date of each file. It will do this for all files but "*.icloud". The command will also print the name of each updated file.

go to the iCloud directory,

cd $HOME/Library/Mobile\ Documents/com~apple~CloudDocs

Please: double check that you are in the directory above. Use pwd

and trigger the date update for those files

find . ! -path "*.icloud" \( -exec echo {} \; -a -exec touch {} \; \)
ushuz
  • 143
0

Have you changed the date and time on your computer or phone? This is a possible explanation of why iCloud is not syncing.

0

Be careful, this method will Delete the files. Managed to solve it by:

  1. Go to System Preferences
  2. Select iCloud
  3. Untick iCloud
  4. At the prompt select Remove from Mac
  5. At the next prompt select Stop Updating and turn off

Should be fixed, worked for me, really annoying

Second scenario that worked, on iPhone:

  1. Open Settings
  2. iCloud Drive
  3. Manage Storage
  4. Click on the folder that's at fault and remove it from iCloud
grg
  • 201,078
Jorgen
  • 17
0

If you turn off iCloud as suggested, you have the option to save all our files to the local disk - but that only works if your local disk is big enough!

When you turn back on again it re-syncs EVERYTHING, so could take several days and creates problems if your disk is not big enough to accommodate all your iCloud data TWICE — the backup and the re-synched version.

If, like me, you keep all documents, photos etc. on your iCloud, that is a massive effort! I did it once, but had to do it in steps as I did not have room for everything; you then have to check with a comparison program that you have not lost anything - big risk of data loss.

In the end I did not trust this, so ordered a Backblaze restore of everything from the last time I knew it was working and retired from there. I was relieved that I had a Backblaze backup. Remember that for non-apple programs the iCloud is known as /Users/username/Library/Mobile\ Documents/com~apple~CloudDocs

-1

Further to user9869932 above about resetting the date.

Note it should be cd "/Users/-your user name-/Library/Mobile Documents/com~apple~CloudDocs"

then doing the command find . ! -path "*.icloud" ( -exec echo {} \; -a -exec touch {} \; )

Will give you a massive list - in my case - of files it resets the date on that are waiting to upload. The files then begin to upload. Check this by double-clicking on the little Pie icon in the Finder window. This brings up the progress bar. Your files will go up in batches, determined by whatever throttling Apple has set for the process. Mine went from over 4000 items to 1,175 in a few minutes but now seems stuck again.

Now I notice that the list of update files includes files in Trash and other places where the files no longer exist. So I'm suspecting that the iCloud sync process is not handling this well. Deleted and moved files are hanging about in the 'com~apple~CloudDocs' folder even when removed from their original locations. So now instead of having just a few files not uploaded, I seem to have 1,175 items waiting to upload - which probably never will.