Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How to use recovery.bak to restore previous sessions after sessionstore.js suddenly vanished

  • 12 replies
  • 3 have this problem
  • 211 views
  • Last reply by cor-el

more options

I opened firefox (latest version, 64bit) and had no tabs, no history, and no ability to restore my previous sessions. My session backups folder was empty so I used recuva to try and recover the files and got 3 different versions recovery.bak, each created within minutes of each other at a time yesterday when I had all of my tabs. They are all nearly the same size as my previous sessionstore.js. Can I use these files to restore my previous session because, and you have probably heard this a million times, I have some really freakin important tabs I need back.

P.S. I was just checking and my freaking bookmarks are gone as well. WHAT THE HELL IS GOING ON?! I did not do anything different when closing firefox than the other half a million times or installed any new addons/changed settings, what just happened?! Any help would be greatly appreciated. In the meantime I am going to run a deep scan of my harddrive which may take a couple of hours to see if I can find anything else.
I opened firefox (latest version, 64bit) and had no tabs, no history, and no ability to restore my previous sessions. My session backups folder was empty so I used recuva to try and recover the files and got 3 different versions recovery.bak, each created within minutes of each other at a time yesterday when I had all of my tabs. They are all nearly the same size as my previous sessionstore.js. Can I use these files to restore my previous session because, and you have probably heard this a million times, I have some really freakin important tabs I need back. P.S. I was just checking and my freaking bookmarks are gone as well. WHAT THE HELL IS GOING ON?! I did not do anything different when closing firefox than the other half a million times or installed any new addons/changed settings, what just happened?! Any help would be greatly appreciated. In the meantime I am going to run a deep scan of my harddrive which may take a couple of hours to see if I can find anything else.

All Replies (12)

more options

You will normally find these files in the sessionstore-backups folder:

previous.js (cleanBackup: copy of sessionstore.js from previous session that was loaded successfully)
recovery.js (latest version of the sessionstore written during runtime)
recovery.bak (previous version of the sessionstore written during runtime)
upgrade.js-<build_id> (backup created during an upgrade of Firefox)

You can copy a file from the sessionstore-backups folder to the main profile and rename the file to sessionstore.js to replace the current file (make a backup copy of the current sessionstore.js).

See also:

more options

cor-el said

You will normally find these files in the sessionstore-backups folder: previous.js (cleanBackup: copy of sessionstore.js from previous session that was loaded successfully) recovery.js (latest version of the sessionstore written during runtime) recovery.bak (previous version of the sessionstore written during runtime) upgrade.js-<build_id> (backup created during an upgrade of Firefox) You can copy a file from the sessionstore-backups folder to the main profile and rename the file to sessionstore.js to replace the current file (make a backup copy of the current sessionstore.js). See also:

The folder was completely empty when I first checked. I opened firefox and all of my tabs were gone so without closing it I first navigated immediately to the folder and there was nothing there, completely empty. I had gotten into the habit of backing up that particular folder but had not done so in 6 months so I am horribly out of date. I managed to use a software to recover deleted and overridden files, Recuva, and got some files called recovery.bak. Can I use these to get my tabs back somehow?

more options

Are you sure that you still use the same profile folder and that Firefox hasn't created a new profile for some reason?

Do you have an "Old Firefox Data" folder on the desktop or possibly more profiles in the default location?

  • C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>\

Keep in mind that is software like Recuva recovers a file that there is no guarantee that the file isn't corrupted because clusters may have been reused in the meantime. These files are plain text files that consist of one long line without any line breaks, so you can possibly check that by loading a file in a Firefox tab.

more options

I indeed do have more than one profile and checked both of them. The older one (6 months+) had remained untouched while newest one has been weirdly blanked out. Not even bookmarks remain. I can get most of my bookmarks back (I hope) from the older profile but the vanishing sessionstore and all of its backups means I have lost a tonne of non-indexed tabs from a private server.

P.S. I opened the recovered files in both firefox and Notepad++  and as I feared it is almost all [NUL] or {NUL}.

P.P.S. Can you fathom why this happened so I can avoid it in the future?

more options

A sessionstore file always begins with the same text as you can see if you open such a file, so you could try a low level hard disk scan for a cluster that starts with this data.

  • {"windows":[{"tabs":[{"entries":[{"url"

This will likely be a very slow process in case of a large hard drive.

more options

Unfortunately I have been unable to find anything, only more corrupted and older iterations of recovery.bak. Whelp, I think I am screwed.

more options

Say, I found a tonne of JSONLZ4 files in an old bookmarkbackups folder, 122-123KB each. Can I use these to restore my vanished bookmarks?

more options

Yes, that should be possible provided that the files aren't corrupted.

The name of a JSON bookmarks backup file includes a total item count (folders and separators included) and an hash value to prevent saving the same backup more than once.

  • bookmarks-YYYY-MM-DD_<item count>_<hash>.jsonlz4.

more options

Because I am a complete doof, how do I use those things to get my bookmarks back as the only method I found online simply involves renaming the file bookmarks-2015-06-25_979_+snwg1b7Lr+AuoleJsVXSA==.jsonlz4 to bookmarks-2015-06-25_979_+snwg1b7Lr+AuoleJsVXSA==.json? However simply changing the extension does nothing. I do not know what to do with these thingers, sorry for being so dense.

more options

No, you can't rename a file that way. You need to restore a bookmarks JSON backup (normal .json or compressed .jsonlz4) in the Bookmarks Manager (Library).

Note that this is about restoring bookmarks and not about session data, so do not confuse the bookmark backup files in the bookmarkbackups folder with sessionstore backup files in the sessionstore-backups folder.

more options

IT WORKED!!! My bookmarks are back!!! If I could mail you a fistbump I would. I may have lost my tabs but at least I have most of my bookmarks back!

more options

You can backup your personal data regularly to avoid such losses.