Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多
封存

Why Firefox sessions still need manual backup?

SuMo Bot replied
egigoka

Today I closed Firefox as usual. It wrote recovery.jsonlz4 and recovery.baklz4. (Sorry if I’m missing some details, I’m just a bit upset.)

On the next launch, it didn’t show a window (most likely due to gWSL). I knew that after the next exit it would rewrite the session files, so I backed up .mozilla. (At that moment I didn’t realize recovery.jsonlz4 was already overwritten.)

I killed Firefox and WSL, restarted, restored .mozilla, reopened Firefox — and it rewrote recovery.baklz4 with an empty recovery.jsonlz4. The session page showed nothing. I panicked, because my previous .mozilla backup is very old.

I found out there may be a way to recover if I don’t launch Firefox before copying recovery.baklz4 to recovery.jsonlz4. So I closed Firefox, restored .mozilla again, checked that the .baklz4 file was larger, copied it over the .jsonlz4, and opened Firefox. It successfully restored everything.

Why do I need to manually back up session files? Could they be versioned, or at least not replaced by an empty session?

If the only tab is about:sessionrestore, that usually means something went horribly wrong, and it shouldn’t overwrite the previous session.

Relying on third-party extensions doesn’t solve the problem. Replacing a valid session with a blank one leads to data loss.

As you probably understand, this isn’t the first time I’ve lost data because of this behavior. This time I managed to save it, but previously I didn’t know these steps and lost my tabs.

Today I closed Firefox as usual. It wrote recovery.jsonlz4 and recovery.baklz4. (Sorry if I’m missing some details, I’m just a bit upset.) On the next launch, it didn’t show a window (most likely due to gWSL). I knew that after the next exit it would rewrite the session files, so I backed up .mozilla. (At that moment I didn’t realize recovery.jsonlz4 was already overwritten.) I killed Firefox and WSL, restarted, restored .mozilla, reopened Firefox — and it rewrote recovery.baklz4 with an empty recovery.jsonlz4. The session page showed nothing. I panicked, because my previous .mozilla backup is very old. I found out there may be a way to recover if I don’t launch Firefox before copying recovery.baklz4 to recovery.jsonlz4. So I closed Firefox, restored .mozilla again, checked that the .baklz4 file was larger, copied it over the .jsonlz4, and opened Firefox. It successfully restored everything. Why do I need to manually back up session files? Could they be versioned, or at least not replaced by an empty session? If the only tab is about:sessionrestore, that usually means something went horribly wrong, and it shouldn’t overwrite the previous session. Relying on third-party extensions doesn’t solve the problem. Replacing a valid session with a blank one leads to data loss. As you probably understand, this isn’t the first time I’ve lost data because of this behavior. This time I managed to save it, but previously I didn’t know these steps and lost my tabs.

所有回覆 (1)

Yes, this is the very issue that I experienced 4yrs ago and it brought me to this forum. https://support.mozilla.org/en-US/questions/1312258?page=1 Every time I ask about the session restore issue I get crickets. Which is why I also make backups of my sessionstore-backups folders and I have my data on several devices and versions in case something goes wrong. see old screenshots Here is where I get no reply. --> https://chat.mozilla.org/#/room/#firefox:mozilla.org

由 jonzn4SUSE 於 修改