Fix for Time Machine backup problem “DIHLDiskImageAttach returned: 999”

For the last couple of days I’ve been plagued by a Time Machine problem for which seemingly nobody (that Google could find) had a solution:

23.01.14 09:53:44,125[13516]: Failed to attach to image: /Volumes/Data/Justus MBP13.sparsebundle, DIHLDiskImageAttach returned: 999

After quite a lot of bug searching I finally found a fix.

The problem started when I moved (rsync’ed) my existing encrypted backup sparsebundle from a QNAP network storage to a new Time Capsule. I removed the old network share from the list of backup targets in the Time Machine system preferences panel and added the Time Capsule as a new target. OS X recognized the existing backup, offered me to continue to use it and asked for its encryption password. After that the Capsule was in the backups list and everything seemed fine. Only didn’t actually making new backups work and every time I tried I was presented with error message. Looking into the Logs I was greeted by the 999 error thats in the quote above.

After trying a lot of other things (resizing the sparsebundle, changing the verification status in the plist, checking permissions, fsck’ing the whole thing over and over) I finally changed its password on the command line with:

hdiutil chpass Justus\ MBP13.sparsebundle

After changing the password I removed the backup target from the Time Machine preferences and added it again. And suddenly it worked.

I can only guess why the new password is better than the old one. Maybe the old one was too long (18 characters) whereas the new one is shorter.

3 thoughts on “Fix for Time Machine backup problem “DIHLDiskImageAttach returned: 999”

  1. More than 3 years after being published; this post was still useful to me.
    Yesterday, for an unknown reason, TimeMachine started to refuse saving on my encrypted network backup, with the same “DIHLDiskImageAttach returned: 999”.
    I made several hdiutil-based trial to fix the problem, unsuccessfully, until Google directed me to here. Changing the disk image password solved the issue. 🙂

  2. Hi Justus,

    I had the same problems on a recent Mac update from 10.10 to 10.12. Changing the .sparsebundle’s password didn’t help, but moving the password stored in keychain from ‘login’ to ‘system’ fixed the issue.

    Thought I’d add my note here, since this is only other place online I found that mentioned my specific problem. Thanks for your website! (I read a few of your other entries)

  3. I got the same problem again when restoring an encrypted backup image on my network TimeMachine drive. Thanks to Stephen’s note above, I checked Time-Machine-related items in the System keychain, and it turned out that the disk image password stored in these items was truncated, with the last character missing.

    Actually, two keychain items with the same creation date and time contain the disk image password in my case : one named “Time Machine”, the other one named according the spasebundle’s name (like “MyMac.sparesebundle”).

    Correcting the password in both keychain items solved the problem.

    Not sure what in the password caused the truncation (maybe the presence of special characters), but if you get the “DIHLDiskImageAttach returned: 999” error, check the Time Machine disk image password in the System keychain before attempting any other complex or risky manipulation.

Leave a Reply

Your email address will not be published. Required fields are marked *