How to restore Chrome's list of recently closed tabs

6

1

I have Chrome on my machine set to open all tabs it had open the last time I used it.

Chrome's startup settings

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.

iconoclast

Posted 2013-06-21T00:30:55.993

Reputation: 2 752

What exactly are the circumstances when this happens? Sometimes I have the case that I restart Chrome and my session won't come up, just a new empty window and the recently closed list is empty or only contains ancient items. In that case, Chrome usually has never actually shut down. There is some process still hanging around which contains the previous session. – Der Hochstapler – 2013-06-21T00:46:12.663

1Either way, the tabs from the last session should be stored in your Chrome profile path in a file named Last Tabs. – Der Hochstapler – 2013-06-21T00:48:19.127

~/Library/Application\ Support/Google/Chrome\ Canary/Default/Last\ Tabs – iconoclast – 2013-06-21T01:41:06.073

Answers

6

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 if you use Chrome Canary:

~/Library/Application\ Support/Google/Chrome\ Canary/Default/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.)

iconoclast

Posted 2013-06-21T00:30:55.993

Reputation: 2 752

1

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

  1. Current Session
  2. Current Tabs
  3. Last Session
  4. List item
  5. 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.

uscpsycho

Posted 2013-06-21T00:30:55.993

Reputation: 11

1

As a previous answer stated, you'll find the chrome tab here

~/Library/Application\ Support/Google/Chrome/Default/Current\ Tabs\

I found that just restoring the entire default folder was the easiest way to do things as restoring just the tabs didn't get what I wanted. By restoring the default folder entirely, on startup chrome will state it didn't shutdown correctly and ask for a restore giving you back everything.

user869325

Posted 2013-06-21T00:30:55.993

Reputation: 11

1

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.

asmeurer

Posted 2013-06-21T00:30:55.993

Reputation: 450

No longer works. – Jeff Burdges – 2014-11-28T17:13:34.980

Oh, it seems it does work (I replaced all four of Current/Last Session/Tabs, so I'm not sure which ones were necessary). It was just Time Machine's naming scheme when you choose "keep both" that confused me. The one that says "(original)" is actually the one that was restored from backup. – asmeurer – 2013-12-04T04:35:01.697

1

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/

Jeff Burdges

Posted 2013-06-21T00:30:55.993

Reputation: 191