Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Backup Error - Copying Keychain Data

This has been driving me crazy for about a month now:


All of a sudden, my iPhone won't back up to my computer. It syncs, it transfers photos, it updates like a charm, but every time I try to run a backup, it fails with the following error log:


6/9/12 1:18:31 PMAppleMobileBackup[238]WARNING: Backing up 5c6d4cff6043bb6b5074ab66b0d8a7921ad3916e
6/9/12 1:18:31 PM[0x0-0x1d01d].com.apple.iTunes[186]2012-06-09 13:18:31.110 AppleMobileBackup[238:903] WARNING: Backing up 5c6d4cff6043bb6b5074ab66b0d8a7921ad3916e
6/9/12 1:18:34 PMAppleMobileBackup[238]ERROR: Backup message response: 1 Error copying keychain data (MBErrorDomain/1)
6/9/12 1:18:34 PMAppleMobileBackup[238]WARNING: No MobileSync error code defined for error code: 1
6/9/12 1:18:34 PMAppleMobileBackup[238]ERROR: Backup error: -1
6/9/12 1:18:34 PM[0x0-0x1d01d].com.apple.iTunes[186]2012-06-09 13:18:34.279 AppleMobileBackup[238:903] ERROR: Backup message response: 1 Error copying keychain data (MBErrorDomain/1)
6/9/12 1:18:34 PM[0x0-0x1d01d].com.apple.iTunes[186]2012-06-09 13:18:34.279 AppleMobileBackup[238:903] WARNING: No MobileSync error code defined for error code: 1
6/9/12 1:18:34 PM[0x0-0x1d01d].com.apple.iTunes[186]2012-06-09 13:18:34.279 AppleMobileBackup[238:903] ERROR: Backup error: -1



I'm on a MacBook using OS X 10.6.8. Phone is a 4S running iOS 5.1.1.

I'm not using iCloud yet, still have my MobileMe account, but I haven't had any issues until about a month ago when the backups stopped.


Reluctant to do a full restore of the phone since I haven't been able to back up the past month's worth of data.


Answers on a postcard, please... I can't figure this one out!

iPhone 4S, iOS 5.1.1

Posted on Jun 9, 2012 1:42 PM

Reply
33 replies

Jun 9, 2012 3:09 PM in response to wjosten

Still happening -- deteled the files, connected my phone, when to backup, and:


6/9/12 3:03:38 PMAppleMobileBackup[204]WARNING: Backing up 5c6d4cff6043bb6b5074ab66b0d8a7921ad3916e
6/9/12 3:03:38 PM[0x0-0x1d01d].com.apple.iTunes[191]2012-06-09 15:03:38.315 AppleMobileBackup[204:903] WARNING: Backing up 5c6d4cff6043bb6b5074ab66b0d8a7921ad3916e
6/9/12 3:03:39 PMAppleMobileBackup[204]ERROR: Backup message response: 1 Error copying keychain data (MBErrorDomain/1)
6/9/12 3:03:39 PMAppleMobileBackup[204]WARNING: No MobileSync error code defined for error code: 1
6/9/12 3:03:39 PMAppleMobileBackup[204]ERROR: Backup error: -1
6/9/12 3:03:39 PM[0x0-0x1d01d].com.apple.iTunes[191]2012-06-09 15:03:39.985 AppleMobileBackup[204:903] ERROR: Backup message response: 1 Error copying keychain data (MBErrorDomain/1)
6/9/12 3:03:39 PM[0x0-0x1d01d].com.apple.iTunes[191]2012-06-09 15:03:39.985 AppleMobileBackup[204:903] WARNING: No MobileSync error code defined for error code: 1
6/9/12 3:03:39 PM[0x0-0x1d01d].com.apple.iTunes[191]2012-06-09 15:03:39.985 AppleMobileBackup[204:903] ERROR: Backup error: -1

Feb 4, 2013 3:34 PM in response to shewhodaydreams

I since encountered this error, and found out that even *restoring* from my backups didn't work, since they all had this keychain error as far back as a month ago!


If you're in the same situation, and have a semi-recent backup that displays this error on restore, here's how to fix it: http://simx.me/technonova/tips/fixing_a_error_copying_keychain_data_pr.html


Note that you'll need to use a hex editor, but if you're desperate enough, the steps should be pretty straightforward. Hopefully this helps others in this annoying situation!

Feb 23, 2013 4:24 AM in response to simX

It's true that I don't know the backup isn't affected and I haven't tried restoring from it. But:


1. an apparently good backup was created the day prior to this failure (backup with no errors), and I have retained a backup copy of that presumed "good" backup.


2. the problem seems to be corruption in one file: /var/Keychain/keychain-2.db on the phone. if I remove that file from the phone, a backup completes just fine. Of course all passwords are lost. I could easily live with that, but unfortunately removing it creates other problems like push not working due to lack of certs. So I put it back again and now backup in iTunes fails again.


3. I did try your method above on the backup, I think successfuly. But I tried to use it not to restore, but just to run a successful backup of the phone in its current state. Needness to say, that did not help.


Conclusion thus far:

1. if there were a kind of keychain repair utility that could be run on the iPhone, the problem could be fixed without need for complicated mucking about with backup files.


2. if there were a way to re-create perfectly legit and unique push certs -- ie, the ones already in the corrupt keychain file somewhere -- without restoring, that keychain-2.db file could just be deleted first. (Then generate new certs on a fresh keychain file).


My money is on #2, but I haven't found a way to do that yet. (Close but no cigar.) This discussion may have to be taken elsewhere, too.

Mar 2, 2013 12:19 PM in response to Loren Ryter

Loren Ryter - you saved my phone (and data!)


For some reason my phone started randomly having this problem too! It would sync new music, etc but on the last step when it would back up the phone, it would always fail! I looked in my Console and found the same errors as the original poster which led me here.


I also tried restoring my phone to the last good backup, but that did not fix it. I also tried deleting the backup and making a new one like everyone else on the internet suggested. No dice. I even took a computer that never had iTunes on it, tried to create a backup on that....same error!


What fixed it was using PhoneView on the Mac and deleting this file: /var/Keychain/keychain-2.db


It then backed up successfully!


Thanks so much!!

Mar 2, 2013 9:36 PM in response to sdschramm

Glad to hear it. But then you didn't run into issues with invalid push certificatins, like pop up dialogs all over the place in apps that use push? If not, you're lucky, because I found no way to resolve that other than a restore in the end.


At least in my case the latest backup was in fact good. I did have to manually select a fresh firmware file (using option-restore in iTunes), and then restore to last backup afterwards, because a normal restore has to backup first.

Backup Error - Copying Keychain Data

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.