iCloud Drive is stuck uploading items and no longer syncs

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.

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

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

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 /Users/admin/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 {} \; \)

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

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.

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