Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

How do I restore tabs session from last upgrade instead of current session?

more options

After my virus checker interrupted Firefox as it was opening (to remove a "telemetry" add-on or something), I reopened Firefox to find it would now only restore three of the ten windows from the previous session.

Obviously I would like to get back those other windows if possible. After some fiddling around, I opened my "sessionstore-backups" folder and discovered both the "recovery.jsonlz4" and "previous.jsonlz4" files contained the recent incomplete session rather than the older one I wanted.

I figure my last hope at recovering some of my lost tabs is the file "upgrade.jsonlz4-20180830143136". Am I right in thinking it can be used as a restore point? I have tried renaming it to "recovery.jsonlz4" while deleting the more recent "recovery.jsonlz4". Yet for some strange reason, when I restart Firefox it keeps going back to the deleted recent session file.

I have been copying the more recent "recovery.jsonlz4" to my Data drive before deleting it from "sessionstore-backups" - could that be causing the problem? It's in the Recycle Bin too. I'm just reluctant to delete it entirely.

In short: Why does Firefox keep restoring a session I've deleted? How can I make it restore the older upgrade file?

After my virus checker interrupted Firefox as it was opening (to remove a "telemetry" add-on or something), I reopened Firefox to find it would now only restore three of the ten windows from the previous session. Obviously I would like to get back those other windows if possible. After some fiddling around, I opened my "sessionstore-backups" folder and discovered both the "recovery.jsonlz4" and "previous.jsonlz4" files contained the recent incomplete session rather than the older one I wanted. I figure my last hope at recovering some of my lost tabs is the file "upgrade.jsonlz4-20180830143136". Am I right in thinking it can be used as a restore point? I have tried renaming it to "recovery.jsonlz4" while deleting the more recent "recovery.jsonlz4". Yet for some strange reason, when I restart Firefox it keeps going back to the deleted recent session file. I have been copying the more recent "recovery.jsonlz4" to my Data drive before deleting it from "sessionstore-backups" - could that be causing the problem? It's in the Recycle Bin too. I'm just reluctant to delete it entirely. In short: Why does Firefox keep restoring a session I've deleted? How can I make it restore the older upgrade file?

Все ответы (2)

more options

Hold on, have you already backed up all these files? Firefox will keep dumping old ones and replacing them with new ones, so definitely save them all somewhere safe (i.e., not in sessionstore-backups).

What follows is more than you need, but as I'm signing off now, I'll just lay it all out.

Session History Files

When Firefox shuts down normally, it creates a file named sessionstore.jsonlz4 at the main level of your profile folder. When Firefox starts up, it reads this file but moves its contents to the sessionstore-backups folder (either as your live session, if you restore automatically or as your previous session).

The kinds of files you may find in sessionstore-backups are:

  • recovery.jsonlz4: the windows and tabs in your currently live Firefox session (or, if Firefox crashed at the last shutdown and is still closed, your last session)
  • recovery.baklz4: a backup copy of recovery.jsonlz4
  • previous.jsonlz4: the windows and tabs in your last Firefox session
  • upgrade.jsonlz4-build_id: the windows and tabs in the Firefox session that was live at the time of your last update
  • various .js files from Firefox 55 or earlier

To preview the contents of a file, you can drag and drop it onto this page, then click Scrounge URLs: https://www.jeffersonscher.com/res/scrounger.html

That tool is on my site, so please let me know if it doesn't work for you.

Swapping an Older File for the Current One

To try swapping in an older session history file so Firefox will load it, the standard "manual swap" method is as follows (assuming Firefox is still running):

(1) From inside Firefox, open your current Firefox settings (AKA Firefox profile) folder using either

  • "3-bar" menu button > "?" Help > Troubleshooting Information
  • (menu bar) Help > Troubleshooting Information
  • type or paste about:support in the address bar and press Enter

In the first table on the page, click the "Open Folder" button. This should launch a Windows Explorer window listing the various files and folders in your profile.

(2) Leaving that window open, switch back to Firefox and Exit, either:

  • "3-bar" menu button > "power" button Exit
  • (menu bar) File > Exit

Pause while Firefox finishes its cleanup -- these changes should occur:

  • recovery.jsonlz4 is moved from the sessionstore-backups folder to the main level of the profile folder and renamed to sessionstore.jsonlz4
  • recovery.baklz4 is deleted from sessionstore-backups

(3) Once Firefox has stopped updating things, while viewing the main level of the profile folder, rename sessionstore.jsonlz4 to sessionstoreOLD.jsonlz4

If you see an older sessionstore.js or sessionstore.bak file, move it somewhere else or delete it.

(4) Copy in the other file you want to restore, and rename it with the name appropriate for its format:

  • Compressed LZ4 file => sessionstore.jsonlz4
  • Uncompressed .js file => sessionstore.js

(5) Start Firefox and it should read the swapped in sessionstore file and restore whatever was in the substitute file; if you do not have Firefox set to restore your previous windows and tabs automatically, use History > Restore Previous Session

Any luck?

more options

One other thing: when Windows or other programs close Firefox, they may send individual close window commands until all windows are closed. Because Firefox only remembers up to 3 closed windows, this can cause data loss if you use a lot of windows. You can increase the number of closed windows you can restore with this setting:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk.

(2) In the search box above the list, type or paste sess and pause while the list is filtered true to false

(3) Double-click the browser.sessionstore.max_windows_undo preference to display a dialog where you can edit the value from 3 to a number of your preference (I use 10) and then click OK