Places.sqlite: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(Added related pages and links)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{profile-file|filename=places.sqlite}}
{{profile-file|filename=places.sqlite}}
The file "places.sqlite" stores the annotations, bookmarks, favourite icons, input history, keywords, browsing history (a record of visited pages) in Firefox 3.
The file "places.sqlite" stores the annotations, bookmarks, favorite icons, input history, keywords, and browsing history (a record of visited pages).
 
Places.sqlite is used in Firefox 3 and above, instead of the older [[bookmarks.html]] and [[history.dat]] files (the older files are left in the profile folder for backward compatibility).  Starting in SeaMonkey 2.0,  places.sqlite  stores browsing history (but not bookmarks). [https://bugzilla.mozilla.org/show_bug.cgi?id=382187]  In SeaMonkey 2.1 and above, places.sqlite is also used for storing bookmarks (instead of the older bookmarks.html file).  [https://bugzilla.mozilla.org/show_bug.cgi?id=498596]


==Editing==
==Editing==
You can edit this file using [[http://www.sqlite.org/ sqlite]], however, you must close Firefox first in order to get a lock on the file. NOTE: Firefox opens the places.sqlite with a lock that prevents the user from updating the file when firefox is open.  More information on sqlite locking can be found at [[http://www.sqlite.org/lockingv3.html SQLLite Locking]]
You can edit this file using the [https://addons.mozilla.org/firefox/addon/5817 SQLite manager add-on] or a specialized editor such as the [http://sourceforge.net/projects/sqlitebrowser/ SQLite Database browser], [http://sqliteadmin.orbmu2k.de/ SQLite Administrator] (Windows only) or [http://www.dehats.com/drupal/?q=node/58 Lita] (AIR based).  
 
NOTE: Firefox opens the places.sqlite with a lock that prevents the user from updating the file when Firefox is open.  More information on sqlite locking can be found at [http://www.sqlite.org/lockingv3.html SQLLite Locking]


You can selectively edit or delete records using sql syntax.  For example, to delete records of places you have visited, you can issue the following statement:
You can selectively edit or delete records using [http://www.sqlite.org/lang.html sql syntax].  For example, to delete records of places you have visited, you can issue the following statement:
  sqlite3 places.sqlite "delete from moz_places where url like '%REPLACE_ME%';"
  sqlite3 places.sqlite "delete from moz_places where url like '%REPLACE_ME%';"


Line 17: Line 21:


==Deleting==
==Deleting==
If you suspect that the file is corrupted, deleting "places.sqlite" will delete your browsing history, and a new, empty file will be created automatically.
If you suspect that the file is corrupted, deleting "places.sqlite" will delete your browsing history, and a new, empty file will be created automatically. In Firefox 3 and  SeaMonkey 2.1 and above,  places.sqlite will be rebuilt using the latest dated JSON file from the [[bookmarkbackups folder]]; if no JSON backup exists,  bookmarks will be imported from [[bookmarks.html]], if found.
 
== Related Pages ==
[[Locked_or_damaged_places.sqlite| Locked or Damaged places.sqlite]]
 
== Links ==
[https://developer.mozilla.org/en/The_Places_database Places Database]


== Technical Information ==
== Technical Information ==
Line 37: Line 35:
* moz_keywords - Keywords
* moz_keywords - Keywords
* moz_places - Places/Sites visited - referenced by moz_historyvisits
* moz_places - Places/Sites visited - referenced by moz_historyvisits
An [http://people.mozilla.org/~dietrich/places-erd.png ERD Diagram] is available.
==See also==
* [[Locked or damaged places.sqlite]]
==External links==
* [https://developer.mozilla.org/en/The_Places_database Places Database]


[[Category:Profile contents (Firefox)]]
[[Category:Profile contents (Firefox)]]
[[Category:Profile contents (Mozilla Suite)]]
[[Category:Bookmarks]]
[[Category:History]]
[[Category:SeaMonkey]]

Latest revision as of 16:13, 27 September 2011

The file "places.sqlite" stores the annotations, bookmarks, favorite icons, input history, keywords, and browsing history (a record of visited pages).

Places.sqlite is used in Firefox 3 and above, instead of the older bookmarks.html and history.dat files (the older files are left in the profile folder for backward compatibility). Starting in SeaMonkey 2.0, places.sqlite stores browsing history (but not bookmarks). [1] In SeaMonkey 2.1 and above, places.sqlite is also used for storing bookmarks (instead of the older bookmarks.html file). [2]

Editing

You can edit this file using the SQLite manager add-on or a specialized editor such as the SQLite Database browser, SQLite Administrator (Windows only) or Lita (AIR based).

NOTE: Firefox opens the places.sqlite with a lock that prevents the user from updating the file when Firefox is open. More information on sqlite locking can be found at SQLLite Locking

You can selectively edit or delete records using sql syntax. For example, to delete records of places you have visited, you can issue the following statement:

sqlite3 places.sqlite "delete from moz_places where url like '%REPLACE_ME%';"

where REPLACE_ME is the text in the URL you wish to delete.

To selectively deleted your input history you can use the following statement:

sqlite3 places.sqlite "delete from moz_inputhistory where input like '%REPLACE_ME%';"

Moving

This file can be moved to a different profile.

Deleting

If you suspect that the file is corrupted, deleting "places.sqlite" will delete your browsing history, and a new, empty file will be created automatically. In Firefox 3 and SeaMonkey 2.1 and above, places.sqlite will be rebuilt using the latest dated JSON file from the bookmarkbackups folder; if no JSON backup exists, bookmarks will be imported from bookmarks.html, if found.

Technical Information

The places.sqlite includes a number of tables as follows:

  • moz_anno_attributes - Annotation Attributes
  • moz_annos - Annotations
  • moz_bookmarks - Bookmarks
  • moz_bookmarks_roots - Bookmark roots i.e. places, menu, toolbar, tags, unfiled
  • moz_favicons - Favourite icons - including URL of icon
  • moz_historyvisits - A history of the number of times a site has been visited
  • moz_inputhistory - A history of URLS typed by the user
  • moz_items_annos - Item annotations
  • moz_keywords - Keywords
  • moz_places - Places/Sites visited - referenced by moz_historyvisits

An ERD Diagram is available.

See also

External links