With macOS sierra (10.12.4), Time Machine backups to a Synology NAS are failing in the "preparing backup" phase. The UI messages aren't helpful, but console shows this error from backupd:
Failed to mount '/Volumes/TimeMachine/fubar.sparsebundle'
because the image could not be attached, error:
Error Domain=com.apple.backupd.ErrorDomain Code=21 "(null)"
UserInfo={MessageParameters=(
"/Volumes/TimeMachine/fubar.sparsebundle",
19
)}
This repeats every 60 seconds for several minutes, and then Time Machine gives up.
I'm familiar with the sort of problem fixed by https://apple.stackexchange.com/a/39842/30668 but this seems to be different. I can mount the network volume and attach the sparsebundle. Running fsck shows no errors. The sparsebundle plist shows VerificationState
0, and doesn't have a RecoveryBackupDeclinedDate
.
Best Answer
This turned out to be a keychain problem. Possibly I changed the NAS login password and never updated keychain.
This situation was confusing because the messages from Time Machine didn't say anything about authentication, and Finder could connect to the NAS volume ok. But apparently backupd uses a different Keychain entry, which was bad or wrong.