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

搜索 | 用户支持

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

详细了解

Why does saving bookmarks to json and then restoring the backup wipe all bookmarks?

  • 4 个回答
  • 7 人有此问题
  • 23 次查看
  • 最后回复者为 zumbs

more options

Earlier today X-marks started acting up, so I backed up my bookmarks (to json as it is the default for Firefox). Then I started cleaning up to get X-marks into a good state, but only ended up with a messed up list of bookmarks. No problem, I disabled X-marks and restored my backed up bookmarks. That gave the dreaded "unable to process the backup file" error, and I tried all the steps to fix it. Deleting the places.sqlite, uninstalling and reinstalling firefox did not help (I deleted my profile before reinstalling).

In the end, I used https://github.com/andreax79/json2html-bookmarks to convert the backed up json file to html, which yielded a html file that Firefox could import. So, I tried to save the bookmarks to a json file again and then restore from that ... which caused the same "unable to process the backup file" error, wiping my bookmarks again.

I still have the html file, so I can just import that, but why on Earth is Firefox using json for backing up bookmarks if it is broken?

If it is a bug, where do I report it?

Earlier today X-marks started acting up, so I backed up my bookmarks (to json as it is the default for Firefox). Then I started cleaning up to get X-marks into a good state, but only ended up with a messed up list of bookmarks. No problem, I disabled X-marks and restored my backed up bookmarks. That gave the dreaded "unable to process the backup file" error, and I tried all the steps to fix it. Deleting the places.sqlite, uninstalling and reinstalling firefox did not help (I deleted my profile before reinstalling). In the end, I used https://github.com/andreax79/json2html-bookmarks to convert the backed up json file to html, which yielded a html file that Firefox could import. So, I tried to save the bookmarks to a json file again and then restore from that ... which caused the same "unable to process the backup file" error, wiping my bookmarks again. I still have the html file, so I can just import that, but why on Earth is Firefox using json for backing up bookmarks if it is broken? If it is a bug, where do I report it?

所有回复 (4)

more options

You might already have done more research on this problem that most support volunteers.

Since the Python script worked, I assume the JSON output by the backup function was valid. (Small victory!)

The Restore feature may be sensitive to the file extension, so I definitely would stick with .json and not get creative.

My guess for what might have gone wrong as Firefox consumed the JSON is either (A) problem with the JSON parser or (B) in writing the values to the places.sqlite database some unanticipated problem arose based on the data itself (which is odd, because this data came from Firefox, but maybe its funkiness is related to why bookmarks were misbehaving before).

To search existing bugs or file new ones: https://bugzilla.mozilla.org/

more options

When importing from a JSON file, the current data is replaced. If import an HTML file, this is added to the current data.

more options

It sound that the JSON backup you created is corrupted because at the time you created this backup places.sqlite was already corrupted.

Do you have compressed .jsonlz4 files in the bookmarkbackups folder that you can try to restore?

The name of an automatically created JSON bookmarks backup in the bookmarkbackups folder includes a total item count (folders and separators included) and an hash value to prevent saving the same backup more than once.

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

@cor-el: You may be misunderstanding me.

I reinstalled Firefox, so the profile and all bookmarks were wiped. (I deleted the profile manually after uninstalling, just to be sure.)

Then I used the script mentioned above to export the json file to html and imported the html file.

If I export my current bookmarks to json and then try to import the newly exported bookmarks, I end up with no bookmarks. With a clean installation, the places.sqliete file should be in a good state?

I backed up my profile before deleting it, and while there are many jsonls4 files in it, none of them are called anything with bookmarks. Most of them are in the datareporting folder.