![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
Can't restore TABS from backup file
Before shutting down Firefox I deleted history/cache/passwords etc from the past day
I do this all the time but since I had restore previous tabs selected they always get restored when I start up again
However this time they weren't restored when I restarted
Without closing Firefox I navigated to the sessionstore-backups folder to see what was there but the files were only 2KB - much too small for the number of tabs.
So I installed ShadowExplorer & Shadowcopyview to see if I could recover older versions I was able to locate jsonlz4 files from a few days ago that were around 11000KB in size so I assumed they would have most of my tabs
However when trying to use the files nothing happens - I tried 2 different steps that I read here had worked for others
1 - Renaming previous.jsonlz4 to sessionstore.jsonlz4 , moving to the profile folder (deleting the old one first) and restarting FF
2 - Deleting sessionstore.jsonlz4 and copying the recovered previous.jsonlz4 / recovery.baklz4 /recovery.jsonlz4 / upgrade.jsonlz4-20201014125134 files to the sessionstore-backups folder and restarting FF
I also repeated the steps after creating a separate profile
None of these worked so I tried examining the jsonlz4 files using https://www.jeffersonscher.com/res/scrounger.html but I got an error message 'Session history file contents could not be read?'
Now I've previously used recovered Jsonlz4 files to restore tabs with no issues but this time they won't work
I read here https://support.mozilla.org/bm/questions/1189759 that updates may cause compatibility issues and the upgrade.jsonlz4-20201014125134 file indicates they was a recent update
The recovered file sizes indicate they contain data so I want to know how I can recover it - if not through FF then through some other software
Toutes les réponses (7)
darkwolf573 said
I'll probably start using bookmarks instead of tabs in future for loading previous sessions to be on on the safe side or is the Bookmarks file also vulnerable to corruption ?
Well... bookmarks and history are stored together in a database file named places.sqlite. Users report this file becoming corrupted occasionally; it seems to happen most often with a power cut. Fortunately, Firefox creates bookmark backup files on an approximately daily basis, for up to about two weeks. These should appear on the Restore menu in the Library window, as described in this article:
Restore bookmarks from backup or move them to another computer
You can increase the number of backups if you like. Here's how:
(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.
(2) In the search box in the page, type or paste max_back and pause while the list is filtered
(3) Double-click the browser.bookmarks.max_backups preference to display an editing field, and increase the value from 15 to whatever you like, then press Enter or click the blue check mark button to save the change.
More info on about:config: Configuration Editor for Firefox.
An update - this is semi related so I wasn't sure if I should start a new topic or not so I'm posting here
I recently noticed that all my history older than a month was deleted which went back 2 + years Does Firefox have a limit to how much history can be stored ? Same question for number of Bookmarks There was a recent power outage but Firefox wasn't running when it happened
I'm confused - You mentioned that Bookmarks are stored in places.sqlite but in the link you gave it says they are stored in bookmarks-"date".json ? Can either file be used for backups ?
(3) Double-click the browser.bookmarks.max_backups preference to display an editing field, and increase the value from 15 to whatever you like, then press Enter or click the blue check mark button to save the change.
Does the 15 refer to the number of backups or the the intervals with which they are made ?
darkwolf573 said
I recently noticed that all my history older than a month was deleted which went back 2 + years Does Firefox have a limit to how much history can be stored ?
Firefox computes a limit based on disk space. Unless your drive capacity suddenly went way down, I don't know why it would get trimmed so severely.
Same question for number of Bookmarks
I'm not aware of a limit.
I'm confused - You mentioned that Bookmarks are stored in places.sqlite but in the link you gave it says they are stored in bookmarks-"date".json ? Can either file be used for backups ?
places.sqlite is the live file that stores bookmarks and history together. The files in bookmarkbackups are snapshots that can be restored and have bookmarks only. If you want to back up history, places.sqlite would be needed. For bookmarks only, that may be overkill.
(3) Double-click the browser.bookmarks.max_backups preference to display an editing field, and increase the value from 15 to whatever you like, then press Enter or click the blue check mark button to save the change. Does the 15 refer to the number of backups or the the intervals with which they are made ?
It should refer to the number of backups, and the interval is approximately daily, although days may be skipped if there are no updates. Firefox also may rename the file in the case that there's no change, so if it was the same on the 1st and the 2nd, the date in the file name may be the 2nd while the date the file was created was the 1st. I haven't studied that in much detail,though.
OK a few weeks later I now notice that my history older than a month seems to get deleted
I checked the places.sqlite file and it's 105 Mb
The space on my hard drive fluctuates but it never goes below 5GB - my computer gives a warning it if gets too low anyway
It should refer to the number of backups, and the interval is approximately daily, although days may be skipped if there are no updates. Firefox also may rename the file in the case that there's no change, so if it was the same on the 1st and the 2nd, the date in the file name may be the 2nd while the date the file was created was the 1st. I haven't studied that in much detail,though.
I still am a bit confused - You said 15 backups but there are only ever 4-5 maximum -
previous.jsonlz4 , recovery.baklz4 , recovery.jsonlz4 and upgrade.jsonlz4-20201211215739 in the sessionstore-backups folder and the temporary session restore in the main profile folder
darkwolf573 said
I still am a bit confused - You said 15 backups but there are only ever 4-5 maximum - previous.jsonlz4 , recovery.baklz4 , recovery.jsonlz4 and upgrade.jsonlz4-20201211215739 in the sessionstore-backups folder and the temporary session restore in the main profile folder
15 was bookmark backups, not session history file backups.
OK a further update
Now my history doesn't get saved beyond the last 7 days As I mentioned previously my Bookmarks file is very large and has only increased since then, so is it possible that they are 'competing' for resources i.e the more Bookmarks that get added the less History gets saved ?
darkwolf573 said
Now my history doesn't get saved beyond the last 7 days As I mentioned previously my Bookmarks file is very large and has only increased since then, so is it possible that they are 'competing' for resources i.e the more Bookmarks that get added the less History gets saved ?
Firefox doesn't have a date-based cut-off on history. Firefox has a maximum number of places it will track in the database file which has your bookmarks and history. Firefox recomputes this limit at some interval (I don't remember) and which may be reduced over time if there is less disk space available. You can check the current value in about:config under places.history.expiration.transient_current_max_pages -- usually it is over 100,000. Is yours much lower?