Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Cannot import browsing history from places.sqlite for new profile

  • 10 svar
  • 1 har dette problemet
  • 1 view
  • Siste svar av ndouble

more options

After my Firefox 44.0.2 for Mac crashed I had to delete my userprofile. As I couldn't open Firefox again, I could not backup everything by its build in backup functionality. When cleaning the userprofile, Firefox was so kind an created a folder on my desktop called "Old profile data". Knowing that, I read that you can get your bookmarks, downloads and browsing history back by replacing places.sqlite in the newly created profile. I did that, and my bookmarks went back. Unfortunately the history still doesn't show up. I tried it a couple of times with different profiles, but I simply cannot restore my browsing history.

TL;DR: When replacing places.sqlite in a new Firefox profile I don't get my browsing history back.

Edit: Okay it seems that my Firefox version now is 45. Yesterday, when the crash happened I was on the version stated above.

Edit 2: I was checking the compatibility.ini which says "LastVersion: Safe Mode", maybe this is related?

After my Firefox 44.0.2 for Mac crashed I had to delete my userprofile. As I couldn't open Firefox again, I could not backup everything by its build in backup functionality. When cleaning the userprofile, Firefox was so kind an created a folder on my desktop called "Old profile data". Knowing that, I read that you can get your bookmarks, downloads and browsing history back by replacing places.sqlite in the newly created profile. I did that, and my bookmarks went back. Unfortunately the history still doesn't show up. I tried it a couple of times with different profiles, but I simply cannot restore my browsing history. TL;DR: When replacing places.sqlite in a new Firefox profile I don't get my browsing history back. Edit: Okay it seems that my Firefox version now is 45. Yesterday, when the crash happened I was on the version stated above. Edit 2: I was checking the compatibility.ini which says "LastVersion: Safe Mode", maybe this is related?

Endret av ndouble

All Replies (10)

more options

For background: the Old Firefox Data folder is created by the Refresh feature. Whatever you have at the time you performed the Refresh is what you'll find there: the entire original profile folder is moved into Old Firefox Data. So this folder might be rather old, it would depend on when the Refresh ran. Could you check the last modified dates on files in the folder?

Using an old places.sqlite file should have rolled your history and bookmarks back to the date of that file. If you lost the history, it could be that the file was corrupt, but in that case, it's odd that you got the old bookmarks back. Did you move anything into the bookmarkbackups folder that could explain how Firefox got the bookmarks back if places.sqlite was not usable?

more options

Hi @jscher2000,

I really appreciate your answer, as this issue is important to me. I performed the refresh yesterday, when I was having issues with Firefox constantly crashing. So the folder is basically one day old. I doublechecked this by opening the places.sqlite file in a SQL-lite viewer and saw websites I have visited yesterday in the "moz-places" table. I'm pretty sure that the file is not corrupted, as I can view all rows (websites I've visited) in that table going back to the beginning of installing Firefox. All that doesn't work is getting the history back into Firefox, when replacing the places.sqlite to the newly created profile.

Endret av ndouble

more options

When you check in the current profile folder, does it appear that Firefox might have discarded the file? The word corrupt is added to the extension in that case.

Also, after quitting Firefox and allowing it to finish its shutdown file maintenance, you should remove all the other places-related temp files (I think they have short words like shl and wal in the names) before copying in the replacement file and starting Firefox again.

more options

Okay I tried it once again as following:

- created a new user profile - started FF once and closed it after visiting a random page - checked the profile folder and saw 3 files: places.sqlite, places.sqlite-shl, places.sqlite-wal - I deleted the files with -shl and -wal extension - I copied and replaced places.sqlite from my backup yesterday - started FF - all Bookmarks there, no history available

I cannot see any corrupt extension on the places.sqlite lite file after replacing it on the new profile

Endret av ndouble

more options

When you view the file in your SQLite viewer, is the moz_historyvisits table still populated with a huge number of records?

I don't fully understand what it does, but I often see this extension recommended as a way to straighten up the Places database: https://addons.mozilla.org/firefox/addon/places-maintenance/

more options

Okay that is interesting, by looking at 'moz_historyvisits' table I cannot see a single record. It is EMPTY. In contrast: By looking at 'moz_places', I can see all URL's I've visited in the URL column. Even the once I've last visited yesterday before I refreshed.

When running the plugin you posted it says "Database is sane".

Edit: What's the difference between these tables, and does it mean I do not have any history? If so, how can this be because I can clearly see all the websites visited in the other table.

Endret av ndouble

more options

I don't understand the difference between both tables, and why it apparently wiped everything out of 'moz_history' when doing the refresh backup.

Edit: According to a research, moz_historyvisits corresponds with moz_places. But for some reason, my moz_history is wiped.

Endret av ndouble

more options

The history visits are the dates and times corresponding to the places. Without the dates and times, nothing will show up in History.

There may have been a database calamity at some point but I'm not sure what could cause that. If Firefox's internal function of clearing history had run, I think the places table would have been reduced to bookmarked places, which presumably would be a small number compared with what you found.

Do you have any way to undelete the old profile folder? Actually, I'm not sure it would have any more data than the pre-Refresh copy on your desktop. Any older backups?

more options

Well I do have the "old profile folder" which has been created and placed on the desktop by Firefox during the refresh. Unfortunately this is the only backup I have. Wouldn't it be possible to populate the missing 'moz_history' rows with "dummy dates", I don't mind it if the date isn't correctly set. Maybe that would make it readable for Firefox again. Also can you think of any other possible solution, or do I have to get used to it that it is lost?