Restoring bookmarks from places.sqlite

Discussion about official Mozilla Firefox builds
yoi55
Posts: 23
Joined: September 22nd, 2004, 11:21 pm
Location: PA
Contact:

Restoring bookmarks from places.sqlite

Post by yoi55 »

I had a hard drive crash on me. I was running FireFox version 3 on that drive and it had a bunch of bookmarks on it. On my new hard drive, I have installed FireFox 4. I backed up the old places.sqlite file from FF3. Is there a way to import this file into FF4?
User avatar
L.A.R. Grizzly
Posts: 5396
Joined: March 15th, 2005, 5:32 pm
Location: Upstate Ohio, USA
Contact:

Re: Restoring bookmarks from places.sqlite

Post by L.A.R. Grizzly »

yoi55 wrote:I had a hard drive crash on me. I was running FireFox version 3 on that drive and it had a bunch of bookmarks on it. On my new hard drive, I have installed FireFox 4. I backed up the old places.sqlite file from FF3. Is there a way to import this file into FF4?


With FF closed, just copy the places.sqlite file into your profile on your new HDD. This should work, although copying places.sqlite-shm and places.sqlite-wal as well would be best.
Win7 Pro SP1 64 Bit
Comodo Internet Security
Pale Moon 33.1.0, Epyrus Mail 2.1.2, Firefox 115.10.0esr, Thunderbird 115.10.1, and SeaMonkey 2.53.18.2
gordons gecko
Posts: 413
Joined: February 11th, 2010, 12:27 pm

Re: Restoring bookmarks from places.sqlite

Post by gordons gecko »

You can export the bookmarks from your FF3 places.sqlite file as a bookmarks.html file from the Firefox Library. You can then import that bookmarks.html file into your FF4 from the Firefox Library.
User avatar
L.A.R. Grizzly
Posts: 5396
Joined: March 15th, 2005, 5:32 pm
Location: Upstate Ohio, USA
Contact:

Re: Restoring bookmarks from places.sqlite

Post by L.A.R. Grizzly »

gordons gecko wrote:You can export the bookmarks from your FF3 places.sqlite file as a bookmarks.html file from the Firefox Library.


He can't, his HDD took a dump.
Win7 Pro SP1 64 Bit
Comodo Internet Security
Pale Moon 33.1.0, Epyrus Mail 2.1.2, Firefox 115.10.0esr, Thunderbird 115.10.1, and SeaMonkey 2.53.18.2
pal-moz
Posts: 5937
Joined: September 23rd, 2005, 5:40 pm
Location: Tokyo , Japan

Re: Restoring bookmarks from places.sqlite

Post by pal-moz »

L.A.R. Grizzly wrote:
yoi55 wrote:I had a hard drive crash on me. I was running FireFox version 3 on that drive and it had a bunch of bookmarks on it. On my new hard drive, I have installed FireFox 4. I backed up the old places.sqlite file from FF3. Is there a way to import this file into FF4?


With FF closed, just copy the places.sqlite file into your profile on your new HDD. This should work, although copying places.sqlite-shm and places.sqlite-wal as well would be best.

and delete "bookmarkbackups" folder.


other step.
backup/copy all old-profile files.
delete all files in new profile folder, then copy/move all old-profile files in new profile folder.
[Desktop] Windows 7 Professional (32bit/SP1) / Geforce GTX 660Ti 2GB (350.12) / 4GB RAM
gordons gecko
Posts: 413
Joined: February 11th, 2010, 12:27 pm

Re: Restoring bookmarks from places.sqlite

Post by gordons gecko »

L A R Grizzly wrote:He can't, his HDD took a dump.


That's irrelevant. He has a copy of places.sqlite (or so he says).

All he has to do is manually insert the old places.sqlite file into any Firefox3 or Firefox4 profile. He can even use his current FF4 profile if he first changes the name of places.sqlite to places.sqliteORIGINAL or something similar. He then can open up Firefox to the Library and then export his old bookmarks. Then he can restore his current FF4 places.sqlite file by renaming it while Firefox is closed and then reopen Firefox and import the old bookmarks file. That way he can preserve whatever history and bookmarks he may have accumulated since installing FF4, should he wish to do so.
yoi55
Posts: 23
Joined: September 22nd, 2004, 11:21 pm
Location: PA
Contact:

Re: Restoring bookmarks from places.sqlite

Post by yoi55 »

I did try to just copy the old places.sqlite file into my FF4 profile. When I then opened FF, there were no bookmarks and when I looked at the file, it was renamed places.sqlite.corrupt. I will try naming it with the ORIGINAL addition to see if that works. If nothing else, I will install FF3 and then export them. I will update with what worked :-)
mak77
Posts: 264
Joined: April 3rd, 2006, 4:51 pm
Location: Italy

Re: Restoring bookmarks from places.sqlite

Post by mak77 »

the right thing to do is to restore bookmarks from a json file, if your system took a backup of the profile folder, you have bookmarkbackups folder with json backups in it, just restore the newest from the Library.
yoi55
Posts: 23
Joined: September 22nd, 2004, 11:21 pm
Location: PA
Contact:

Re: Restoring bookmarks from places.sqlite

Post by yoi55 »

Ok, a few things:

I uninstalled FF4 and then installed FF3. I copied the places.sqlite file to the newly created profile folder and replaced the original. When I open FireFox, I can see all of the bookmarks in the Bookmarks menu...but when I open Organize Bookmarks they are all gone! Then, if I close and reopen FF, the Bookmarks menu is then empty as well.

I tried installing XMarks extension to backup the bookmarks online, but it says that the bookmarks file is corrupted. So, I am assuming when I copy the file and then start FF, the file becomes corrupted.

I do not have access to the old hard drive anymore, I sent it back to the manufacturer for my RMA. So, getting the JSON file is not possible. The only file I have is the places.sqlite file. If I open that file in notepad, I do see the various bookmarks I had in there...I just don't have any way to pull them out.

Any other ideas?
User avatar
L.A.R. Grizzly
Posts: 5396
Joined: March 15th, 2005, 5:32 pm
Location: Upstate Ohio, USA
Contact:

Re: Restoring bookmarks from places.sqlite

Post by L.A.R. Grizzly »

yoi55 wrote:Ok, a few things:

I uninstalled FF4 and then installed FF3. I copied the places.sqlite file to the newly created profile folder and replaced the original. When I open FireFox, I can see all of the bookmarks in the Bookmarks menu...but when I open Organize Bookmarks they are all gone! Then, if I close and reopen FF, the Bookmarks menu is then empty as well.

Any other ideas?


This may work. Do what you did with FF 3 again (make sure there are no other "places" files in the profile). Also, delete anything in the bookmarkbackups directory. When you have it open, while it still displays your bookmarks in the bookmarks menu, try bookmarking a page. Then close FF and reopen. This should write to the replaced places.sqlite file and it may preserve it. Just a shot in the dark...

You might also try converting it to an .html file and then importing it:

http://www.brothersoft.com/abc-amber-sq ... 22645.html

http://www.dbelephant.com/SQLiteConverter
Win7 Pro SP1 64 Bit
Comodo Internet Security
Pale Moon 33.1.0, Epyrus Mail 2.1.2, Firefox 115.10.0esr, Thunderbird 115.10.1, and SeaMonkey 2.53.18.2
yoi55
Posts: 23
Joined: September 22nd, 2004, 11:21 pm
Location: PA
Contact:

Re: Restoring bookmarks from places.sqlite

Post by yoi55 »

Ok, I tried what you suggested, but nothing worked. Same result each time. But, I was able to convert the sqlite database to html, so at least I can read the old bookmarks. I will have to resort to manually entering the ones I want to keep around. It's the hard way to go about it, but it's better than I was before. Thank you for all of your help! It would be great for someone sometime to make a little program to retrieve the contents of the database and put it in a format to import into FireFox :-)
User avatar
L.A.R. Grizzly
Posts: 5396
Joined: March 15th, 2005, 5:32 pm
Location: Upstate Ohio, USA
Contact:

Re: Restoring bookmarks from places.sqlite

Post by L.A.R. Grizzly »

yoi55 wrote:Ok, I tried what you suggested, but nothing worked. Same result each time. But, I was able to convert the sqlite database to html, so at least I can read the old bookmarks. I will have to resort to manually entering the ones I want to keep around. It's the hard way to go about it, but it's better than I was before. Thank you for all of your help! It would be great for someone sometime to make a little program to retrieve the contents of the database and put it in a format to import into FireFox :-)


Firefox will import .html bookmarks. Although, the file you created may not be a compatible .html format, it's worth a try.

Bookmarks->Show All Bookmarks->Import and Backup->Import HTML
Win7 Pro SP1 64 Bit
Comodo Internet Security
Pale Moon 33.1.0, Epyrus Mail 2.1.2, Firefox 115.10.0esr, Thunderbird 115.10.1, and SeaMonkey 2.53.18.2
yoi55
Posts: 23
Joined: September 22nd, 2004, 11:21 pm
Location: PA
Contact:

Re: Restoring bookmarks from places.sqlite

Post by yoi55 »

You are correct, the HTML file that was created was not able to be imported. I am now at least able to view them, so I can manually type them in. Thanks everyone for your help :-)
User avatar
L.A.R. Grizzly
Posts: 5396
Joined: March 15th, 2005, 5:32 pm
Location: Upstate Ohio, USA
Contact:

Re: Restoring bookmarks from places.sqlite

Post by L.A.R. Grizzly »

yoi55 wrote:You are correct, the HTML file that was created was not able to be imported. I am now at least able to view them, so I can manually type them in. Thanks everyone for your help :-)


You won't have to type them in, just open the .html file in FF and click on the link (or copy and paste). If FF won't open the file, you can open it in Notepad.
Win7 Pro SP1 64 Bit
Comodo Internet Security
Pale Moon 33.1.0, Epyrus Mail 2.1.2, Firefox 115.10.0esr, Thunderbird 115.10.1, and SeaMonkey 2.53.18.2
Tatlreach
New Member
Posts: 1
Joined: April 19th, 2012, 7:21 pm

Re: Restoring bookmarks from places.sqlite

Post by Tatlreach »

I HAD THE SAME PROBLEM AND HAVE THE EASIEST SOLUTION!!!!

Copy the old places.sqlite into your new profiles folder, replacing the new places.sqlite with the old.
Your profile folder is in your %User%\AppData\Roaming\Mozilla\Firefox\Profiles\*wtfBS*.default.
(fyi AppData is hidden so enable viewing)
THEN KEY PART -> Open Firefox -> view your history -> Import and Backup button at the top -> Restore -> pick one
Locked