Firefox bookmarks

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
 
(8 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
|extensions={{ext|sqlite}}, {{ext|sqlite-wal}}, {{ext|json}}
 
|extensions={{ext|sqlite}}, {{ext|sqlite-wal}}, {{ext|json}}
 
}}
 
}}
 +
:''For '''.jsonlz4''', see [[Mozilla LZ4]].''
  
'''Firefox bookmarks''' originally used the HTML-based [[Netscape bookmarks]] format, as did the Mozilla/Seamonkey Suite. However, as of Firefox 3.0, a new format was used based on [[DB (SQLite)|SQLite]] with write-ahead logging. The bookmarks are also regularly automatically backed up in the [[JSON]] format.
+
'''Firefox bookmarks''' originally used the HTML-based [[Netscape bookmarks]] format, as did the Mozilla/Seamonkey Suite. However, as of Firefox 3.0, a new format was used based on [[SQLite]] with write-ahead logging. The bookmarks are also regularly automatically backed up in the [[JSON]] format.
  
The relevant files are '''places.sqlite''' and '''places.sqlite-wal''' in the user profile directory (system-specific; in Windows Vista and 7 it is '''\Users\''username''\AppData\Roaming\Mozilla\Firefox\Profiles\''cryptic-profile-ID'''''). This directory structure may be hidden depending on your operating system configuration. A subdirectory of this called '''bookmarkbackups''' has the backups, with filenames like '''bookmarks-2012-10-28.json''' which contain the date of the backup.
+
The relevant files are '''places.sqlite''' and '''places.sqlite-wal''' in the user profile directory (system-specific; in Windows, at least from Vista through 10, it is '''\Users\''username''\AppData\Roaming\Mozilla\Firefox\Profiles\''cryptic-profile-ID'''''). This directory structure may be hidden depending on your operating system configuration. A subdirectory of this called '''bookmarkbackups''' has the backups, with filenames like '''bookmarks-2012-10-28.json''' which contain the date of the backup.
  
The data structure in the SQLite file is given in the embedded commands:
+
Other things including site visit history are also stored in the places.sqlite database.
 +
 
 +
The data structure in the SQLite file is given in the embedded [[SQL]] commands:
  
 
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, guid TEXT)
 
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, guid TEXT)
Line 37: Line 40:
  
 
CREATE TABLE moz_hosts (  id INTEGER PRIMARY KEY, host TEXT NOT NULL UNIQUE, frecency INTEGER, typed NOT NULL DEFAULT 0, prefix)
 
CREATE TABLE moz_hosts (  id INTEGER PRIMARY KEY, host TEXT NOT NULL UNIQUE, frecency INTEGER, typed NOT NULL DEFAULT 0, prefix)
 +
 +
== Links ==
 +
* [https://support.mozilla.org/en-US/kb/import-bookmarks-html Import bookmarks from an HTML file]
 +
* [http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox Backing up and restoring bookmarks]
 +
* [http://kb.mozillazine.org/Places.sqlite Mozillazine knowledge base: places.sqlite]
 +
* [https://bugzilla.mozilla.org/buglist.cgi?quicksearch=places.sqlite Mozilla bug list related to places.sqlite]
  
 
[[Category:Mozilla]]
 
[[Category:Mozilla]]
 +
[[Category:JSON based file formats]]
 +
[[Category:SQLite based file formats]]
 +
[[Category:File formats with a distinctive filename]]

Latest revision as of 16:07, 8 February 2020

File Format
Name Firefox bookmarks
Ontology
Extension(s) .sqlite, .sqlite-wal, .json
For .jsonlz4, see Mozilla LZ4.

Firefox bookmarks originally used the HTML-based Netscape bookmarks format, as did the Mozilla/Seamonkey Suite. However, as of Firefox 3.0, a new format was used based on SQLite with write-ahead logging. The bookmarks are also regularly automatically backed up in the JSON format.

The relevant files are places.sqlite and places.sqlite-wal in the user profile directory (system-specific; in Windows, at least from Vista through 10, it is \Users\username\AppData\Roaming\Mozilla\Firefox\Profiles\cryptic-profile-ID). This directory structure may be hidden depending on your operating system configuration. A subdirectory of this called bookmarkbackups has the backups, with filenames like bookmarks-2012-10-28.json which contain the date of the backup.

Other things including site visit history are also stored in the places.sqlite database.

The data structure in the SQLite file is given in the embedded SQL commands:

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, guid TEXT)

CREATE TABLE moz_bookmarks_roots (root_name VARCHAR(16) UNIQUE, folder_id INTEGER)

CREATE TABLE moz_keywords (id INTEGER PRIMARY KEY AUTOINCREMENT, keyword TEXT UNIQUE)

CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE moz_favicons (id INTEGER PRIMARY KEY, url LONGVARCHAR UNIQUE, data BLOB, mime_type VARCHAR(32), expiration LONG, guid TEXT)

CREATE TABLE moz_annos (id INTEGER PRIMARY KEY,place_id INTEGER NOT NULL,anno_attribute_id INTEGER,mime_type VARCHAR(32) DEFAULT NULL,content LONGVARCHAR, flags INTEGER DEFAULT 0,expiration INTEGER DEFAULT 0,type INTEGER DEFAULT 0,dateAdded INTEGER DEFAULT 0,lastModified INTEGER DEFAULT 0)

CREATE TABLE moz_anno_attributes (id INTEGER PRIMARY KEY,name VARCHAR(32) UNIQUE NOT NULL)

CREATE TABLE moz_items_annos (id INTEGER PRIMARY KEY,item_id INTEGER NOT NULL,anno_attribute_id INTEGER,mime_type VARCHAR(32) DEFAULT NULL,content LONGVARCHAR, flags INTEGER DEFAULT 0,expiration INTEGER DEFAULT 0,type INTEGER DEFAULT 0,dateAdded INTEGER DEFAULT 0,lastModified INTEGER DEFAULT 0)

CREATE TABLE moz_places (id INTEGER PRIMARY KEY, url LONGVARCHAR, title LONGVARCHAR, rev_host LONGVARCHAR, visit_count INTEGER DEFAULT 0, hidden INTEGER DEFAULT 0 NOT NULL, typed INTEGER DEFAULT 0 NOT NULL, favicon_id INTEGER, frecency INTEGER DEFAULT -1 NOT NULL, last_visit_date INTEGER, guid TEXT)

CREATE TABLE moz_historyvisits (id INTEGER PRIMARY KEY, from_visit INTEGER, place_id INTEGER, visit_date INTEGER, visit_type INTEGER, session INTEGER)

CREATE TABLE moz_inputhistory (place_id INTEGER NOT NULL, input LONGVARCHAR NOT NULL, use_count INTEGER, PRIMARY KEY (place_id, input))

CREATE TABLE sqlite_stat1(tbl,idx,stat)

CREATE TABLE moz_hosts ( id INTEGER PRIMARY KEY, host TEXT NOT NULL UNIQUE, frecency INTEGER, typed NOT NULL DEFAULT 0, prefix)

[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox