Time Machine failing: "an error occurred while copying files"
As of 1/1/2017, my Time Machine backups are failing with the following message:
Time Machine couldn't complete the backup to "WDMyCloud". An error occurred while copying files. The problem may be temporary. If the problem persists, use Disk Utility to repair your backup disk.
The drive itself is a 3TB Western Digital My Cloud NAS. I can mount it in the Finder and it seems to be okay (in that I can browse it and open files), but it doesn't appear in Disk Utility at all, which doesn't seem right...
I ran the full diagnostics test in WD's utilities (it exposes a page at wdmycloud.local when the drive is powered on) and it reported no problems.
I've tried restarting both the drive and my MacBook Pro, which didn't help.
Is this a fixable problem, or is my drive dying? I'd be surprised if it's the latter, since it's less than three years old, sits untouched next to my router in a well-ventilated area, and again the diagnostics reported no issues.
Solution 1:
Looking for backup errors in the log, what I found was ; backupd[3278]: objc[3278]: __weak variable at 0x7f9227c07600 holds 0x7f9227c00003 instead of 0x7f9227c0e060. This is probably incorrect use of objc_storeWeak() and objc_loadWeak(). Break on objc_weak_error to debug
Searching for these terms, I found this solution, which solved my issue: https://discussions.apple.com/thread/7686484?start=0&tstart=0
theperlarsen Dec 27, 2016 9:40 PM in response to theperlarsen Level 1 Level 1 (4 points) Dec 27, 2016 9:40 PM in response to theperlarsen SOLVED: Turning off iCloud Drive fixed the issue for me.
The weak variable error in the console is misleading. The logging mechanism was changed for macOS Sierra. Use the paste command into a terminal to view time machine errors:
log show --predicate 'subsystem == "com.apple.TimeMachine"' --info --last 4h | grep Error
I saw lines containing starting with:
Error: (-34) SrcErr:NO Copying Copying /Users/myusername/Library/Mobile Documents/ ...
The mobile folder is used by iCloud drive, so I turned that off. That allowed the backup to complete. Hope this helps others that are experiencing this issue. Hopefully the final version of 10.12.3 fixes this.
Solution 2:
It could be a corrupt file on your Mac, rather than a problem with the external drive. If it is you can open console
via launchpad, and search for error messages related to "backup". If there's a line with something about "SrcErr" and "Copying" and a filename, that will point you to the corrupt file. Either delete it, or go into Time Machine settings and exclude this file from your backups.
I just had this problem, and found the suggestion in this forum: https://discussions.apple.com/thread/7734594
linking to this page which appears to be the original source of the info. http://pondini.org/TM/C3.html
Solution 3:
Thank you @ola for the log show
command!
In my case the command
$ log show --predicate 'subsystem == "com.apple.TimeMachine"' --info --last 4h|grep -i error
showed
2020-11-11 12:09:15.203799+0000 0x696063 Error 0x0 90170 0 backupd: (TimeMachine) [com.apple.TimeMachine:General] Failed to copy '/Volumes/com.apple.TimeMachine.localsnapshots/ [omitted] /Library/Application Support/Spotify/PersistentCache/Storage', error: -43, srcErr: NO
2020-11-11 12:09:23.094589+0000 0x695c3e Error 0x0 90170 0 backupd: (TimeMachine) [com.apple.TimeMachine:General] Copy stage failed with error: Error Domain=com.apple.backupd.ErrorDomain Code=11 "(null)"
My solution was to exclude /Users/<myself>/Library/Application Support/Spotify/PersistentCache/Storage
from Time Machine