Viewing old keychain from time machine backup

Hello. I was wondering is there a way to reopen previous keychain from a backup? I need to retrieve back some passwords that was only in my previous backup.


I couldn't seem to find a decent/clearcut answer online so I thought I could ask here.

MacBook Pro 13″, macOS 13.2

Posted on Apr 1, 2023 08:34 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 4, 2023 11:15 AM

The ~/Library/Keychains location is within your home directory and is user specific to your account on the Mac.


The /LibraryKeychains the one with system.keychain is for all users on the Mac and is not where your passwords are normally stored. Other things like certificates are stored there.


The ~/Library folder is hidden in macOS Finder. If you click the Go dropdown menu in Finder and hold the Option key the hidden Library will appear on the dropdown menu. Click on it and then you will see the Keychains folder and within is your login.keychain.


Then you can open Time Machine while inside the Keychain folder to roll back time. Copy the login.keychain-db to another location like Documents or Desktop. Then open Keychain Access and add it so you can examine the contents. You'll see two login keychains when you add the second one.


Alternatively, if it's not a Time Machine backup you can navigate to /Users/<username>/Library/Keychains on the backup disk and copy the file and add it to Keychain Access to examine it.


You will have to know the password if it's different than your current Mac password to unlock the encrypted login keychain file. There is no way to reset the password, you have to know what it is to unlock it.

4 replies
Question marked as Top-ranking reply

Apr 4, 2023 11:15 AM in response to Windsns

The ~/Library/Keychains location is within your home directory and is user specific to your account on the Mac.


The /LibraryKeychains the one with system.keychain is for all users on the Mac and is not where your passwords are normally stored. Other things like certificates are stored there.


The ~/Library folder is hidden in macOS Finder. If you click the Go dropdown menu in Finder and hold the Option key the hidden Library will appear on the dropdown menu. Click on it and then you will see the Keychains folder and within is your login.keychain.


Then you can open Time Machine while inside the Keychain folder to roll back time. Copy the login.keychain-db to another location like Documents or Desktop. Then open Keychain Access and add it so you can examine the contents. You'll see two login keychains when you add the second one.


Alternatively, if it's not a Time Machine backup you can navigate to /Users/<username>/Library/Keychains on the backup disk and copy the file and add it to Keychain Access to examine it.


You will have to know the password if it's different than your current Mac password to unlock the encrypted login keychain file. There is no way to reset the password, you have to know what it is to unlock it.

Apr 4, 2023 12:04 PM in response to Windsns

Look here:



Or use the shareware app Find Any File to search for any files with a particular file name.  For a file named XXXX.doc you'd do the following search: 


1 - Name contains XXXX.doc

or

2 - Name is XXXX.doc


Any files that are found can be Option dragged from the search results window to the Desktop to get a copy of the file.


FAF can search areas that Spotlight can't like invisible folders, system folders and packages.  



Apr 2, 2023 10:52 AM in response to Windsns

Apple Keychains are kept in the following locations:


~/Library/Keychains/login.keychain-db

/Library/Keychains/System.keychain


Locate the login.keychain-db on the Time Machine backup. Copy it to the Desktop, rename it old-login.keychain-db and move it to ~/Library/Keychains. Then open Keychain Access App -> File -> Add Keychain and point to the old-login.keychain-db file. It will appear on the left sidebar. You'll need to remember the old password to unlock it. Then you can copy / paste items, etc. to you primary Login Keychain.



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Viewing old keychain from time machine backup

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