How Time Machine Saved the Day

Time Machine

Last night, while working at my Mac, I experienced one of those heart stopping moments where you do something you didnit really mean to do, but once you do it, it canit be undone.

I threw away all the items in my Keychain folder. All 150 of my passwords, software registration codes, internet sign-in passwords, credit card numbers, everything.

I was trying to discard one out of date item. Instead I discarded everything. This is not a case of dragging something to the trash. If that were the case I could simply open the trash by clicking on the trash can, dragging the items onto the desktop, and reinstalling them.

Nope, when I discarded items from my Keychain they were gone, gone, gone.

What is Keychain?

Keychain is a built-in utility that can store all of your passwords for applications, servers, and Web sites; or even sensitive information unrelated to your computer, such as credit card numbers, or personal identification numbers (PINs) for bank accounts. It is password protected.

Some information is automatically added to the Keychain by your system and at other times you will get messages asking your permission to add something to your Keychain. This is in addition to anything you choose to add yourself.

To access your Keychain:

  1. Choose Applications > Utilities > Keychain
  2. Open Keychain Access and click Show Keychains.
  3. Select the Keychain that you want to see.
  4. Select an item in the list to see more information about it.
  5. Click "Show password" to see the password for the item, or click "Show note" to see the contents of a stored note.
  6. When asked, enter the keychain password to see the password or note contents.
  7. To add your own listing click on the + sign at the bottom left corner of the window and a new window will open, allowing you to create a new entry.
  8. It is your option on any entry in your Keychain file to require a password to view the registration code, password, etc.

Back To The Problem

First of all, allow me to say that I do practice what I preach and I have my files backed up so I could have done a complete system backup. That would have taken a long time to implement, and a bit overkill. I also have a paper copy of all the information in my Keychain (that is properly secured), but it would have taken a long time to enter all that data as well, not to mention the danger of making a mistake.

No, the only reasonable solution, since I have Leopard installed on my Mac, was to use Time Machine. That is what Time Machine is for -- to recover or restore something from an earlier period. So I squared my shoulders, took a deep breath, and called my daughter and asked her how to do it.

Any long time reader of this column knows I really hate asking my kids for help. But sometimes it is necessary to get expert help and this was one of those times. Here is why. Keychain is a utility. That means you canit just go to the Applications folder, find Keychain and follow the directions for retrieving something using Time Machine. You have to find where the root data is kept.

I learned that the data I need to find is stored in my Home folder. That is the folder that is shaped like a house and probably has your name by it. The trail was: Home > Library > Keychains > login.keychain.

Once I found the correct file I had to click on it once to highlight it. The next step was to open Time Machine by clicking on the Time Machine Icon. I have it in my Dock, but if you donit have it there you can find it in your Applications folder.


Time Machine Icon

Time Machine is very easy to use. (Oh, well yeah, it does have to be set up first. See below.) It knows what file I want to restore because I have it highlighted, so it focuses on just that file. I place the cursor in the time line on the right side of the screen and scroll to find the time I want to go back to, say 7:45 AM. When I make my selection I just click on that time and Time Machine goes back in time and brings forward the file as it existed at 7:45 AM. Then I click the Restore button in the bottom right corner and the old file is restored.

Depending on the circumstances you may be asked if you want to replace the current file with the restored file.


Time Machine in Action
(Click the image to see the full dized -- i.e. very large -- version)

At this point all of my Keychain information is restored to what it was before I did whatever I did to throw it all away. That includes the one item I wanted to throw away. It will stay right where it is until I can ask someone the proper way to discard it.

And thatis the story of how Time Machine saved the day, or at least a whole lot of annoying time to set my Keychain back up by hand.

Setting Up Time Machine

When Time Machine runs itis first backup it may take a while and you may want to have it run overnight so you can continue with your regular work. Subsequent backups will go quickly because only changes will be saved. You also should consider having your Time Machine backup to an external hard drive so that you donit use up all the space on your main computer hard drive. If you donit know how to install and use an external hard drive most any experienced Mac user should be able to help you do it.

Once those decisions are made choose Apple menu > System Preferences > Time Machine. Slide the switch to ON. Click "Change Disk." Choose the disk where backups will be stored, and click "Use for Backup." Run Time Machine for the initial set up and you are ready to go if trouble hits.

One thing to remember about Time Machine is that you canit use it unless you have Leopard installed. If you are interested in tips and hints to help make your Mac life easier, including tips and hints for Leopard, check out the information about my newly revised Tips and Hints Manual.