How to import current sessionstore.js and sessionstore.bak file to a new external backup sessionstore file
I used to do this by importing the file through session manager extension but since it's not supported anymore in FF 66 I am at loss how to do it.
I've downloaded MySessions extension but it doesn't work - didn't save the session upon browser crash, neither the sessions I have imported were saved.
So. Until session manager by Michael Kraft (Morac) returns I have to save my current session somehow in case .bak and .js files are lost upon browser crash.
Alle svar (6)
Current Firefox releases compress sessionstore files and give it the .jsonlz4 or .baklz4 file extension. I'm not aware of a way to merge sessionstore files and add them to the current session. You would have to bookmark all the tabs of each session and once completed open all tabs to want to save as a new session. If you want to use uncompressed sessionstore.js files then you need to remove existing sessionstore.jsonlz4 and possibly rename the sessionstore-backups folder to get access to this session. If the sessionstore files are really old then they may not be compatible and you won't be able to use them directly and you would have to use other ways to extract links for these files. Place the uncompressed sessionstore file as sessionstore.js in the main profile folder.
Ændret af cor-el den
Oh. Now that I've opened profile folder it changed to those new .jsonlz4 and .baklz4 file extensions as you said - but sessionstore.js and .bak files were also present.
I guess my question still stands - how to save those new extension files in another external file in case FF crashes? Since I removed that faulty MySessions extension for now.
Ændret af Kubu08 den
Kubu08 said
Oh. Now that I've opened profile folder it changed to those new .jsonlz4 and .baklz4 file extensions as you said - but sessionstore.js and .bak files were also present. I guess my question still stands - how to save those new extension files in another external file in case FF crashes? Since I removed that faulty MySessions extension for now.
You can backup the files in the sessionstore-backups folder or the sessionstore.jsonlz4 file that Firefox creates when you close Firefox.
You will normally find these files in the sessionstore-backups folder:
- previous.jsonlz4 (cleanBackup: copy of sessionstore.jsonlz4 from previous session that was loaded successfully)
- recovery.jsonlz4 (latest version of sessionstore.jsonlz4 written during runtime)
- recovery.baklz4 (previous version of sessionstore.jsonlz4 written during runtime)
- upgrade.jsonlz4-<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.jsonlz4 to replace the current file (make sure to backup the current sessionstore.jsonlz4).
See also this tool that you can use to inspect a compressed sessionstore file.
So I can just copy one of those to some external folder outside firefox backups folder and if my session files are lost from original folder I would still be able to run those back-uped files without problems (like missing tabs for example)?
Ændret af Kubu08 den
There are a lot of questions in this thread!
(A) Crash Recovery - Native Files
By default, Firefox will try to recovery by using
/sessionstore-backups/recovery.jsonlz4 /sessionstore-backups/recovery.baklz4 /sessionstore-backups/previous.jsonlz4
It would be rare that all three are corrupted, but it is possible. Anyway, you could back those up from time to time, or back up the sessionstore.jsonlz4 file created after a normal shutdown, which is at the "main level" of the profile folder, not in the sessionstore-backups folder.
How exactly would you use the backup to feed that session back to Firefox? Addressed below under #3.
(B) Crash Recovery - Extension Workaround
These are the session management extensions I'm aware of, so you have some additional choices to investigate/try out:
Use database storage:
- https://addons.mozilla.org/firefox/addon/tab-session-manager/
- https://addons.mozilla.org/firefox/addon/session-boss/
Use bookmark storage:
- https://addons.mozilla.org/firefox/addon/session-sync/
- https://addons.mozilla.org/firefox/addon/my-sessions/
(C) What about the old sessionstore.js file?
One option is to convert it to a page of clickable links using my tool here which cor-el mentioned earlier:
https://www.jeffersonscher.com/ffu/scrounger.html
This tool also handles Session Manager saved sessions from the sessions folder in your profile. If you're interested.
You might also be able to use the "swap" method to fool Firefox into using the old file at startup. During this process, please always preserve a copy in case something goes wrong. cor-el already mentioned this twice, but I'm going to spell it out in more excruciating detail.
Session History File Swap
Here's the goal: at the next startup, Firefox will use an old file instead of the one that it created at exit.
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 File 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 -- a file named sessionstore.jsonlz4 should appear in the folder.
Once Firefox has stopped updating things:
(3) right-click > Rename the sessionstore-backups folder to sessionstore-backupsOLD -- you want to hide it from Firefox, but you may need these files for future reference.
(4) right-click > Rename the sessionstore.jsonlz4 file to sessionstoreOLD.jsonlz4 (or if you have no interest in saving your last session, you can delete it)
(5) Copy in the other file you want to restore, and rename it with the name appropriate for its format:
- Compressed file such as recovery.jsonlz4 => sessionstore.jsonlz4
- Uncompressed file such as recovery.js => sessionstore.js
(6) 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?