2

Does anyone know what happens or what I should expect if I restore all contents of ~/Library/Keychains from a Time Machine backup? I'm trying to assess the risks of doing this.

The reason I am asking is my iCloud keychain, which contains about 8 years of pretty important "Secure Notes", disappeared a few days ago. I believe the reason for it disappearing is that its local copy became corrupt (there is now a files at ~/Library/Keychains/[redacted_guid]/keychain-2.db- keychain-2.db-corrupt and it was created around the time I noticed problems). I have tried restoring just the ~/Library/Keychains/[redacted_guid]/ folder, but that didn't fix the problem.

A reasonable next step is to restore the entire folder, which I hope has a working db and valid links to it. But I am afraid this will make things worse. Currently, my system is working fine. Using my user password, I can unlock my computer from a sleep and I can unlock the secure parts of System Preferences. I can see things going bad fast if I screw up my primary login keychain.

4
  • Are passwords still working on other iCloud keychain devices, IE phone or iPad? If they are then I would first try turning iCloud keychain off then on, on the Mac, rebooting and leaving it for a few hours to see if it will download the keychain. Maybe it'll pull in a fresh cloud copy for you. I've always found iCloud keychain to be a bit weird though and not always behaving how I would expect, so who knows if this would work. – Harv Dec 13 '17 at 1:03
  • 1
    Also maybe change the phrasing of your question, cause it sounds like you want your iCloud keychain back, which is a different question than what happens if you restore keychain files. The former addresses the actual goal in an open way and allows for answers you may not have considered, the latter locks you in to a specific way of trying to address it which may not actually work and limits the responses you might get. – Harv Dec 13 '17 at 1:06
  • Thanks for the reply, @Harv. I have no other Apple devices, though I do have access to my wife's Macbook Air. Do iPhones get access to your secure notes? And you are right that I basically have two obvious options (restore the files or recover icloud). I've found on StackExchange sites that asking an incomplete question weirdly attracts lots of complete answers, while asking a detailed, longer question gets nothing. I also figured that the TM option would apply to more people, but that was a gamble. – Andrew Dec 13 '17 at 1:57
  • 1
    There's no way that I know of to view secure notes in iOS. Your observation about SE is interesting; maybe less information makes it easier for people to guess freely? Somehow less intimidating if their answers are wrong? Either way I hope you get your keychain back; keep us updated. – Harv Dec 13 '17 at 2:59
1

Answering my own question -- because I simply ran out of time: my need for my secure notes outweighed the risks.

I restored an earlier copy of my entire ~/Library/Keychains folder from a pre-corruption Time Machine backup. This did not restore the "iCloud" option in my Keychain Access "Keychains" panel, but the secure notes all reappeared under "Local Items". After restoring the items, I was able to lock and unlock things in System Preferences, and I was able to log-out and log-in to my computer (after making copies of all the secure notes, and so far I can't say I see any obvious problems.

So in my case, the answer to my question is: it didn't do anything bad, though it will (of course) reset any passwords you may have changed since the backup.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .