Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

How to force jsonlz4 bookmarks to be created , and how to set how many ?

  • 7 个回答
  • 2 人有此问题
  • 3 次查看
  • 最后回复者为 cor-el

more options

Am I correct that browser.bookmarks.max_backups controls the number of backup files in %AppData%\Roaming\Mozilla\Firefox\Profiles\<profile>\bookmarkbackups ? If I set browser.bookmarks.max_backups to -1, does that result in an infinite number of jsonlz4 files over time ?

I have been unable to find how to force a uniquely named bookmarks backup file to go into %AppData%\Roaming\Mozilla\Firefox\Profiles\<profile>\bookmarkbackups . What is triggering the creation of those files ? I do not see the jsonlz4 file being created at startup nor at closedown of firefox. I am looking for a trigger how to create such a file.

Thanks, René

Am I correct that browser.bookmarks.max_backups controls the number of backup files in %AppData%\Roaming\Mozilla\Firefox\Profiles\<profile>\bookmarkbackups ? If I set browser.bookmarks.max_backups to -1, does that result in an infinite number of jsonlz4 files over time ? I have been unable to find how to force a uniquely named bookmarks backup file to go into %AppData%\Roaming\Mozilla\Firefox\Profiles\<profile>\bookmarkbackups . What is triggering the creation of those files ? I do not see the jsonlz4 file being created at startup nor at closedown of firefox. I am looking for a trigger how to create such a file. Thanks, René

所有回复 (7)

more options

Firefox automatically makes backups of the bookmarks. These are stored in the bookmarkbackups folder. You can set how many backups are kept by doing this;

Type about:config<enter> in the address bar. If a warning screen comes up, press the I Accept the Risk button. At the top of the screen is a search bar. Type browser.bookmarks.max_backups

The values for this setting are; -1 = unlimited number of backups 0 = Do not create any backups Any other number here will keep that many backups Example: 5 = 5 backups are kept.

The backups are stored in a jsonlz4 file named something like this; bookmarks-2016-06-29_1424_enD1GTHya0JmicnYWg4V4g ==.jsonlz4 In this example; 2016-06-29 = date created, 1424 = number of entries.


In general, a backup file is created whenever a change is made.


Open the Bookmarks Manager; Press the Alt or F10 key to bring up the toolbar, and select Bookmarks. Hot key is <Control> (Mac=<Command>) <Shift> B.

Once the window is open, at the top of the page, press the button labeled Import and Backup. Select Export Bookmarks To HTML, and follow the prompts and save it to a HTML file. Copy the file to another computer. Repeat the instructions above, BUT select Import Bookmarks From HTML.

https://support.mozilla.org/en-US/kb/restore-bookmarks-from-backup-or-move-them

https://support.mozilla.org/en-US/kb/recover-lost-or-missing-bookmarks

more options

Hi René, the files are created at certain intervals (e.g., daily), but if the bookmarks are unchanged, a file may not be created.

There also needs to be some idle time. If you open Firefox and use it continuously and then exit immediately, you may not get a backup file for several days until an override kicks in.

If you create a backup manually, I believe Firefox will use an uncompressed format (.json extension) instead of the compressed format. However, there might be a way to create a compressed file, I have never looked for it.

more options

The name of an automatically created JSON bookmarks backup in the bookmarkbackups folder includes a total item count (folders and separators included). There is an hash value to prevent saving the same backup more than once, so only when the calculated hash is different a new backup is created.

  • bookmarks-YYYY-MM-DD_<item count>_<hash>.jsonlz4.

A backup you create manually is always an uncompressed .json backup.

more options

Thanks to all that answered so far, I did set max_backups to -1, I modified a number of bookmarks, but no new file is created in %AppData%\Roaming\Mozilla\Firefox\Profiles\<profile>\bookmarkbackups .

Is there a settting in about:config to influence the frequency of backups ?

more options

rfennet said

Is there a settting in about:config to influence the frequency of backups ?

No, but a backup should be created each time a new bookmark is saved or when a bookmark is deleted; multiple times per day if necessary or at the end of a session when Firefox is closing down. At least that was my observation the last time I "played with it".

Verify that yourself, as far as when making changes to your saved bookmarks.

more options

Noop. No backup is made when I delete a bookmark. Running 58.0 64-bit wit Firefox sync enabled.

more options

There is only one bookmark each day when you close Firefox. If you keep Firefox running continuously (i.e. never close Firefox) then things are different and it can take longer.