Recover "Recently Closed Windows/Tabs" Information
Just now, after a massive and catastrophic SUPER-MELTDOWN-crash that arbitrarily decided to absolutely murder my day, ALL my tabs and windows and ALL history of "Recently Closed" tabs and windows is gone!
THIS IS COMPLETELY UNACCEPTABLE!
What is the reason for the existence of a SYNC feature if it isn't to MAKE SURE that a record of open tabs and windows is SECURELY maintained no matter how many times the application crashes, so that AT ALL TIMES, this information is kept INTACT, regardless of the state of the end users device? That is BY FAR the most important part of the sync feature! Are you telling me that there is no backup process of that information?
This is the kind of thing I never expected from you guys at Mozilla. I've been using Firefox for MANY years because I trust what you do. Today that trust has been SEVERELY and BRUTALLY wounded, most likely beyond repair...
I need you to fix this...
I need you to recover that information for me and I need you to make sure that what just happened could never, ever happen again unless God himself caused every digital storage unit on earth to disintegrate.
Izabrano rješenje
Open tabs and windows are stored as session data in sessionstore.jsonlz4 when Firefox is closed.
Backup the session files in the sessionstore-backups folder in the Firefox profile folder to make sure not to lose possible important session data. Do NOT close Firefox when Firefox is already running.
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 with Firefox closed.
- make sure to backup the current sessionstore.jsonlz4
You can look at this tool to inspect a compressed sessionstore file.
Pročitajte ovaj odgovor sa objašnjenjem 👍 3All Replies (3)
Looking at the link you gave me, donthavecow, it seems that browser history, including open tabs and windows, is stored in a SQLite database file called places.sqlite in the appdata\roaming path. It also seems like the ONLY way to recover open tabs and windows is to already have a backup of the database file lying around somewhere...
Mozilla: WHY HAVE YOU NOT ALREADY IMPLEMENTED A ROLLING BACKUP ALGORITHM OF THIS FILE!? THAT'S A NO-BRAINER!
How difficult would it be for you to implement a backup of this database every time Firefox safely closes? That way, no matter how often the browser crashes (which can happen for reasons outside the control of the developer), there would always be a backup from the last safely terminated session to use for recovery. You could even attempt a merge of the most recent changes before the crash with the backup as a base, as long as this wouldn't "corrupt" the resulting merged database.
A LOT of applications do this for sensitive user data so why have you not caught on to this? It's not a new concept. It's been done for decades! It's such a simple and safe solution to this very problem, and yet you haven't bothered to implement a shred of it.
It's not even an issue of disk space, since all you would need in most cases is a single backup. You could even make this an optional feature (obviously still default) and configurable so that users can decide how many backups they would like to keep, so that every user case is covered. Most users probably don't have very large history database files if they frequently clear their history, so several backups would probably not be an issue for most.
But for people who actually care about preserving their history, and ESPECIALLY open tabs and windows, having a built-in, regular backup feature is ESSENTIAL!
I don't think this is even a matter of how many users would want this, but simply a matter of IT SHOULD ALWAYS BE DONE NO MATTER WHAT!
Any application that sees frequent use and stores a lot of sensitive/valued user data (such as a web browser) NEEDS a built-in backup algorithm to make sure that a crash will not potentially obliterate it – or even part of it, like what happened to me. A user should NOT have to preemptively learn how their browsing history is stored and manually back it up themselves as a precaution. That should already be taken care of for them by you, Mozilla...
Odabrano rješenje
Open tabs and windows are stored as session data in sessionstore.jsonlz4 when Firefox is closed.
Backup the session files in the sessionstore-backups folder in the Firefox profile folder to make sure not to lose possible important session data. Do NOT close Firefox when Firefox is already running.
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 with Firefox closed.
- make sure to backup the current sessionstore.jsonlz4
You can look at this tool to inspect a compressed sessionstore file.
Man you're a lifesaver! I was almost on the verge of a breakdown... honestly!
This was really important to me and I'm really glad there was a backup system in place for this. It was a little obscure to me but it's there and that's what's most important! But there's still room for improvement here I feel. I will mark this as solved, but I don't think it's really permanently solved just yet.
Because the thing I find strange is that somehow Firefox must have overwritten the "recovery" file – which supposedly is the one for use after a crashed session – with a "blank" file.
What happened was that Firefox crashed after a Steam game tried to launch a URL in the browser (I mentioned this in the crash report "comment" field) and then I chose to restart Firefox from the crash report window. But during the startup sequence, it sort of dozed off into what seemed like a permanent freeze. I gave up waiting for Firefox to restart and terminated it in Task Manager. With Firefox closed, I tried to open the same URL again from the game and I believe this time Firefox crashed in the same way even before it could properly launch. Trying to restart Firefox from the crash report window never worked, and I had to terminate through Task Manager. I never managed to properly launch Firefox in ANY way without doing a forced system restart (I could not restart normally for some reason). After the system restart I could now launch Firefox again without it freezing but all session data was lost, save for the last "upgrade" backup you so gracefully helped me find.
So, to summarize, Firefox somehow must have overwritten both "recovery" files during these failed restart attempts over multiple sequential crashes. I would like to make the point that this should not have happened, considering I was never able to properly restart Firefox into a STABLE session until after several attempts and finally a system restart. I feel that the "recovery" portion of the backup should not have been affected until Firefox successfully managed to RECOVER into a stable session. It almost seems as if Firefox had no memory of having crashed and didn't wait to see if a stable session was accomplished before overwriting the "recovery" files with data from a successfully recovered session.
In other words, It seems to me that the startup algorithm updates the session backup files too early, before confirming that a stable session has been accomplished, ESPECIALLY if a stable session has not yet been accomplished following a crash, no matter how many failed startup attempts.
Mozilla, if my suspicion is even somewhat accurate, please, do what you can to alleviate this. You would definitely prevent major headaches for others besides just me! Thank you!