How to restore Chrome's list of recently closed tabs
I have Chrome on my machine set to open all tabs it had open the last time I used it.
Sometimes (quite often, it seems, although less than half the time) it completely fails, so I have to manually reopen closed tabs. Okay, whatever,
But sometimes the list of recently closed tabs gets removed/erased/expunged/truncated/whatever, and I'm unable to recover them. I'm sure this information is saved somewhere on my machine (and since I have Time Machine running, I'd hope I can recover it if it has been overwritten).
Where is this information stored?
To be clear: I'm not asking how to open recently closed tabs, I'm asking how to restore the list when it has gone away.
Turn off Chrome while you do this, to avoid any possible conflict over who is editing or changing files.
Find Current Tabs
in Time Machine (or whatever backup software you're using) from a time before Chrome lost your tabs.
You'll find it here on a Mac:
~/Library/Application\ Support/Google/Chrome/Default/Current\ Tabs\
or possibly (starting around July 2021):
~/Library/Application\ Support/Google/Chrome/Default/Sessions/Current\ Tabs\
or if you use Chrome Canary:
~/Library/Application\ Support/Google/Chrome\ Canary/Default/Sessions/Current\ Tabs
Rename the existing Current Tabs
to something else, and restore the one from your backup.
Start Chrome.
You should now see the recently closed tabs under History → Recently Closed.
(If you do not have a backup, or just don't have one handy, you can also try using Last Tabs
. It seems like it ought to work, but I have not tested it.)
UPDATE: Since this is likely to happen again (and again and again and...), it's a good idea to take pre-emptive measures to be prepared. The best pre-emptive measure that I've found to make session recovery easier when Chrome drops the ball is to install the Session Buddy Chrome plugin. It does a far better job than the built-in session management, and also better than any other plugin I've tried. (It's also the highest rated, at the moment I'm writing this.)
I didn't have any luck replacing the files suggested by iconoclast. Chrome just went back to the new session for some reason.
I was able to extract the urls manually, though, using the strings
command
strings ~/Library/Application\ Support/Google/Chrome/Default/Current\ Tabs
(where ~/Library/Application\ Support/Google/Chrome/Default/Current\ Tabs
is the version restored from your backup). It seems that these files contain a lot of tabs that were closed as well, so you'll have to weed through them.
I found the suggestions here no longer worked, not sure why. I could restore the Tabs if I restored the entire Default
directory though, i.e.
~/Library/Application\ Support/Google/Chrome/Default/
This sort of works but the answer from iconoclast is incomplete. Today I successfully restored my tabs by restoring the following files from the path
~/Library/Application\ Support/Google/Chrome/Default/Current
- Current Session
- Current Tabs
- Last Session
- List item
- Session Storage (the entire folder)
I do not know if restoring all five is necessary but this is the combination that worked for me and there were no ill effects.
Jeff Burdges suggests restoring the entire Default
directory; I previously did this and it did restore my tabs but it also broke some of my extensions which had to be reinstalled. Only restoring the five items above did not affect any of my extensions.
Tested with Chrome Version 50.0.2661.75 (64-bit) which is the latest OSX version on 4/19/16.