為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

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

了解更多

places.sqlite file always corrupted

  • 7 回覆
  • 3 有這個問題
  • 58 次檢視
  • 最近回覆由 tzoukos

more options

Hello all,

I am using FF in linux (Kubuntu 14.04) and everything was OK until the new update to version 34. After updating and restarting I saw no bookmarks and no history. The places.sqlite file was corrupted and I saw the places.sqlite.corrupt in the profile, which contained all of my data. I tried numerous solution online suggesting to export the places.sqlite DB with an sqlite shell and then creating a new places.sqlite database and placing it in the profile, after of course deleting the old one. However none of these worked.

When I run an integrity check in the old corrupted file I get the following:

sqlite> PRAGMA integrity_check;
*** in database main ***
Page 1773: btreeInitPage() returns error code 11
On tree page 1442 cell 389: Child page depth differs
On tree page 1442 cell 390: Child page depth differs
row 123 missing from index moz_places_frecencyindex
row 355 missing from index moz_places_frecencyindex
...
...
Error: database disk image is malformed

This seems OK for a corrupted file. When I run the check on the newly created places.sqlite I get no errors, so the DB is not corrupted.

My question is why when I add the new places.sqlite file FF renames it to places.sqlite.corrupted even though it isn't? Are there any more files to delete (I deleted all places.sqlite.*** files) or settings to restore in order to accept the new places.sqlite ?

Hello all, I am using FF in linux (Kubuntu 14.04) and everything was OK until the new update to version 34. After updating and restarting I saw no bookmarks and no history. The places.sqlite file was corrupted and I saw the places.sqlite.corrupt in the profile, which contained all of my data. I tried numerous solution online suggesting to export the places.sqlite DB with an sqlite shell and then creating a new places.sqlite database and placing it in the profile, after of course deleting the old one. However none of these worked. When I run an integrity check in the old corrupted file I get the following: <pre><nowiki>sqlite> PRAGMA integrity_check; *** in database main *** Page 1773: btreeInitPage() returns error code 11 On tree page 1442 cell 389: Child page depth differs On tree page 1442 cell 390: Child page depth differs row 123 missing from index moz_places_frecencyindex row 355 missing from index moz_places_frecencyindex ... ... Error: database disk image is malformed</nowiki></pre> This seems OK for a corrupted file. When I run the check on the newly created places.sqlite I get no errors, so the DB is not corrupted. My question is why when I add the new places.sqlite file FF renames it to places.sqlite.corrupted even though it isn't? Are there any more files to delete (I deleted all places.sqlite.*** files) or settings to restore in order to accept the new places.sqlite ?

由 cor-el 於 修改

被選擇的解決方法

Finally I solved my issue. If you are reading this, you have probably already found [[this article |https://superuser.com/questions/111998/how-do-i-repair-a-corrupted-firefox-places-sqlite-database]]. What I wasn't doing (even though it is clearly stated) is that I was not adding the schema version at the top of the sql dump. As soon as I added that and created a new places.sqlite file in the profile folder, it just worked. What a relief.

從原來的回覆中察看解決方案 👍 0

所有回覆 (7)

more options

Hello,

Have you tried attempting to fix the file using the Places Maintenance extension? Please read the following articles first as they provide helpful hints and instructions that may be relevant to you:

more options

I have tried the Places Maintenance extension and everything appears to be ok. I am not sure, however, if it's performing those actions on the places.sqlite or the places.sqlite.corrupt file. I have also read the articles - none of them seem to explain why an non-corrupted file is renamed to .corrupt by FF.

more options

It is performing the checks on the current database file and that is places.sqlite.

Did you delete the places.sqlite and restored the bookmarks from a JSON backup (bookmarkbackups folder)?

more options

My last JSON bookmark file is from one year ago. It does indeed work but I have many many more bookmarks in the corrupted file and it still does not solve the lost history problem.

more options

Aren't there any more recent backups (either .json or compressed .jsonlz4) in the bookmarkbackups folder?

These backups should survive a reset and get copied to a new profile.

more options

Unfortunately no. There are olny files from December 2013.

more options

選擇的解決方法

Finally I solved my issue. If you are reading this, you have probably already found [[this article |https://superuser.com/questions/111998/how-do-i-repair-a-corrupted-firefox-places-sqlite-database]]. What I wasn't doing (even though it is clearly stated) is that I was not adding the schema version at the top of the sql dump. As soon as I added that and created a new places.sqlite file in the profile folder, it just worked. What a relief.