Worst Case

M

Martin Edwards

Phew! Thanks for all that. It may take me some time to digest.
 
P

Paul

richard said:
As an experiment on this issue, I copied all of the Mozilla folders where
Firefox is stored onto another drive.
I then opened that copy and delteed an item in that copy's bookmarks.
After doing that, I then opened the original copy.
Finding that the bookmark had been deleted there as well.
Which means that Firefox is storing the bookmarks in a location outside of
those folders that the exe is in.
Where, I have not pinned down yet.
The six most recent backup copies of bookmarks, are stored in files
ending in .json. That format is not suitable for copy and paste.

C:\Documents and Settings\User Name\Application Data\Mozilla\Firefox\Profiles\1234abcd.default\bookmarkbackups

bookmarks-2012-06-09.json

..json appears to use "key : value" pairs as a format, but without
line terminators. You can try Wordpad on it, but all the text is
in one line. Not very convenient. Maybe you could fix that with a
little editing (or a .json pretty-printer program).

When you use the Export function, the current day's bookmark content
is converted to HTML. And stored for you, somewhere. I used to store
mine, where I keep the rest of the day's downloads.

The current day's bookmarks, are stored in a database. The previous
six days, exist as backup copies, and the backup file could be considered
"more pure" than the database version of the information. Firefox
databases store multiple things. You can get a copy of tools like
"sqlite3" and dump the database for a look. Firefox actually has
a number of databases, and by examining each one, you would eventually
locate where the most current bookmarks are stored.

At the end of the day, the database with the bookmarks is queried and
a .json file is created. That is stored in the backups. The oldest backup
is then discarded. I have files spanning 2012-06-09 to 2012-06-14 inclusive,
whereas the current date is 2012-06-15.

But if you use the Export function, that should query the database
and get the most recent version.

So if you want to have some fun and play Sherlock Holmes, you'll need
a hex editor (or even Wordpad would be a start) for the .json files,
and for the database, you can look for a copy of "sqlite3.exe" or whatever
version Firefox is up to now. (The version of command line tool, has
to match the version Firefox uses internally, to be able to read the
database. Back when I used it, sqlite3 was the one to use.) For example,
these are a few selected lines out of a database dump I have in my sqlite3
dumping folder. Presumably this is a set of commands, that could recreate
the database.

PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE moz_bookmarks (id INTEGER PRIMARY KEY,type INTEGER, fk INTEGER DEFAULT NULL,
parent INTEGER, position INTEGER, title LONGVARCHAR,
keyword_id INTEGER, folder_type TEXT, dateAdded INTEGER,
lastModified INTEGER);
INSERT INTO "moz_bookmarks" VALUES(86,1,121,2,11,'CDRLabs.com - Kprobe',
NULL,NULL,1159262262000000,1147648877000000);
INSERT INTO "moz_bookmarks" VALUES(1495,1,121,1471,11,'CDRLabs.com - Kprobe',
NULL,NULL,1159262262000000,1147648877000000);
INSERT INTO "moz_items_annos" VALUES(30,86,2,NULL,'CDRLabs provides news and reviews
on optical storage products. Information includes CD
and DVD burners, blank media, software and more.',
0,4,3,1232064534093750,0);
INSERT INTO "moz_places" VALUES(121,'http://www.cdrlabs.com/kprobe/index.php',
'index.php','moc.sbalrdc.www.',0,0,0,NULL,0);

There is even a plugin for Firefox (SQLiteManager), which allows Firefox
to display the contents of a database. You can use that if you want. I like
the sqlite3 executable, although I didn't keep any record of how to use it.
When the tool runs, you send the tool commands from the command line, but
I don't think they're acted on, until the command stream is closed or
something. There was some trick to it.

http://sqlite.org/sqlite.html

Obviously, when you want to use a command line tool like that, you shut
down Firefox first, make a copy of the database you wish to play with,
and copy it over to the folder with the copy of SQLite present. You do
it that way, because you can issue commands with SQLite executable,
that can damage a database. The so-called "vacuum" command, is an
example of a suspect operation, that could corrupt a Firefox database.
Always work on copies of files, until you get the hang of it.

(current) "Export"
database ----------> HTML file
(Backup)
----------> json files, previous six days

copy of sqlite3.exe
database ----------> text file

HTH,
Paul
 
A

Andy Burns

Martin said:
In ye olden days you could just copy the bookmarks.html file from within
the firefox profile folder, but now they're stored in a sqlite database

A useful lifesaver is to copy the entire profile to your stick

C:\Users\WHOEVER\AppData\Roaming\Mozilla\Firefox\Profiles\RANDOM.default

adjust WHOEVER and RANDOM to suit.

If you do want a single file with just the bookmarks, you have to force
it to export from the sqlite database ...

From within firefox, press shift-ctrl-B, from the menu bar choose
export bookmarks to html, and enter/select a suitable destination file
on your stick.

If you want to automate it, look at either firefox sync (called weave in
older versions) or xmarks.com
 
A

Andy Burns

Andy said:
If you do want a single file with just the bookmarks
From within firefox, press shift-ctrl-B, from the menu bar choose
import and backup, then
 
S

Stan Brown

As an experiment on this issue, I copied all of the Mozilla folders where
Firefox is stored onto another drive.
I then opened that copy and delteed an item in that copy's bookmarks.
After doing that, I then opened the original copy.
Finding that the bookmark had been deleted there as well.
Which means that Firefox is storing the bookmarks in a location outside of
those folders that the exe is in.
Where, I have not pinned down yet.
For heaven's sake. Where else would it be but in the profile?

It's hidden, though, under a really obscure name: bookmarks.html
 
S

Stan Brown

It's bullis's MO. He'll try to somehow prove his original statement of
"save a copy of the browser .exe" is somehow 1. a solution to the OP's
question, and 2. somehow related to what the OP wants to do.
Is that before or after he presses Ctrl-H?
 
S

Stan Brown

For heaven's sake. Where else would it be but in the profile?

It's hidden, though, under a really obscure name: bookmarks.html
My apologies. I made the mistake of posting without checking.
Bookmarks.html does not in fact contain your bookmarks; I just
ASSumed based on the name.

For a lot of years, I've maintained my own bookmark files, so that
I'm independent of the browser's bookmarking. It's slightly less
convenient than just clicking "Bookmark this page", but they?re all
organized in a way that makes sense to me.
 
P

Paul

Stan said:
My apologies. I made the mistake of posting without checking.
Bookmarks.html does not in fact contain your bookmarks; I just
ASSumed based on the name.

For a lot of years, I've maintained my own bookmark files, so that
I'm independent of the browser's bookmarking. It's slightly less
convenient than just clicking "Bookmark this page", but they?re all
organized in a way that makes sense to me.
A long time ago, bookmarks.html did the whole job for the browser.
No databases. No exporting. But that scheme was obviously too simple,
and allowed people to manage their bookmarks too easily. And we
can't have that.

Paul
 
Z

Zaphod Beeblebrox

On Fri, 15 Jun 2012 06:16:35 -0400, "Stan Brown"
Is that before or after he presses Ctrl-H?
<Cough> <Sputter>

You owe me a new keyboard!
 
O

occam

Its well hidden - but here's how (In FF13 )

'Bookmarks' > 'Show all bookmarks' > 'Import and Backup' (top tab) >
(drop down menu) 'export bookmarks to .html'

Save where you want.
 
O

occam

Its well hidden - but here's how (In FF13 )

'Bookmarks' > 'Show all bookmarks' > 'Import and Backup' (top tab) >
(drop down menu) 'export bookmarks to .html'

Save where you want.
P.S. Next time it would be more fruitful to ask in
<mozilla.support.firefox> rather than here.
 
G

Gene Wirchenko

[snip]
A long time ago, bookmarks.html did the whole job for the browser.
No databases. No exporting. But that scheme was obviously too simple,
and allowed people to manage their bookmarks too easily. And we
can't have that.
Users can be awfully smug about what is supposedly not required
in software.

A flat file is often not enough for representing some data
structures. Software does tend to get more detailed over time. I am
not surprised that Firefox switched from a flat file to a database. I
do like that they kept the compatibility by providing an export/import
function.

Sincerely,

Gene Wirchenko
 
G

Gene E. Bloch

On Fri, 15 Jun 2012 06:16:35 -0400, "Stan Brown"


<Cough> <Sputter>

You owe me a new keyboard!
I keep telling you to drink your coffee offline!
 
N

Nil

A flat file is often not enough for representing some data
structures. Software does tend to get more detailed over time. I
am not surprised that Firefox switched from a flat file to a
database. I do like that they kept the compatibility by providing
an export/import function.
A database should potentially be faster to sort and display than an
HTML file, if the bookmarks collection is huge. I kind of doubt that
most people have enough bookmarks to make much of a difference, but I
think it's a better technology for this kind of thing. Plus, it should
be more flexible for searching and sorting than a flat file. I think
it's a way better system than IE's folders-full-of-shortcuts.
 
S

Stan Brown

A database should potentially be faster to sort and display than an
HTML file, if the bookmarks collection is huge. I kind of doubt that
most people have enough bookmarks to make much of a difference,
I have a total of 3060 in 12 files. They're grouped by topic and
subtopic, and I have a frame that lets me easily find the desired
subtopic. But that's customized for me; I can't think off hand of a
better system than Firefox's for the general user.
 
C

Char Jackson

I have a total of 3060 in 12 files. They're grouped by topic and
subtopic, and I have a frame that lets me easily find the desired
subtopic. But that's customized for me; I can't think off hand of a
better system than Firefox's for the general user.
I make no effort, or at least very little effort, at organizing my
bookmarks. There's a few that I use frequently and I have those on the
bookmarks bar, but the thousands of others that I've accumulated are
just in a big pile. I use Ctrl-B to search them if I need to.
 
M

Martin Edwards

I make no effort, or at least very little effort, at organizing my
bookmarks. There's a few that I use frequently and I have those on the
bookmarks bar, but the thousands of others that I've accumulated are
just in a big pile. I use Ctrl-B to search them if I need to.
Thanks to all who replied. I exported them as an HTML file.
 
G

Gene E. Bloch

I make no effort, or at least very little effort, at organizing my
bookmarks. There's a few that I use frequently and I have those on the
bookmarks bar, but the thousands of others that I've accumulated are
just in a big pile. I use Ctrl-B to search them if I need to.
I must be more organized than you.

Most of my shortcuts are in folders...and *those* are what's in a big
pile.

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top