{"id":14008184,"url":"https://github.com/crazy-max/firefox-history-merger","last_synced_at":"2025-07-24T03:32:04.118Z","repository":{"id":27043353,"uuid":"112248675","full_name":"crazy-max/firefox-history-merger","owner":"crazy-max","description":"Merge Firefox history and repair missing favicons with ease","archived":true,"fork":false,"pushed_at":"2022-07-16T21:03:46.000Z","size":1508,"stargazers_count":92,"open_issues_count":7,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-10T11:02:42.214Z","etag":null,"topics":["firefox","golang","history","merge","places-sqlite"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crazy-max.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"github":"crazy-max","custom":"https://www.paypal.me/crazyws"}},"created_at":"2017-11-27T21:06:30.000Z","updated_at":"2024-07-18T18:02:25.000Z","dependencies_parsed_at":"2022-08-26T02:01:56.332Z","dependency_job_id":null,"html_url":"https://github.com/crazy-max/firefox-history-merger","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Ffirefox-history-merger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Ffirefox-history-merger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Ffirefox-history-merger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Ffirefox-history-merger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazy-max","download_url":"https://codeload.github.com/crazy-max/firefox-history-merger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227410494,"owners_count":17774758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firefox","golang","history","merge","places-sqlite"],"created_at":"2024-08-10T11:01:22.952Z","updated_at":"2024-11-30T19:30:49.304Z","avatar_url":"https://github.com/crazy-max.png","language":"Go","funding_links":["https://github.com/sponsors/crazy-max","https://www.paypal.me/crazyws"],"categories":["Go"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/crazy-max/firefox-history-merger\" target=\"_blank\"\u003e\u003cimg width=\"100\"src=\"https://raw.githubusercontent.com/crazy-max/firefox-history-merger/master/.res/firefox-history-merger.png\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/crazy-max/firefox-history-merger/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/release/crazy-max/firefox-history-merger.svg?style=flat-square\" alt=\"GitHub release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/crazy-max/firefox-history-merger/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/downloads/crazy-max/firefox-history-merger/total.svg?style=flat-square\" alt=\"Total downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/crazy-max/firefox-history-merger/actions?workflow=build\"\u003e\u003cimg src=\"https://img.shields.io/github/workflow/status/crazy-max/firefox-history-merger/build?label=build\u0026logo=github\u0026style=flat-square\" alt=\"Build Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/crazy-max/firefox-history-merger\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/crazy-max/firefox-history-merger?style=flat-square\" alt=\"Go Report\"\u003e\u003c/a\u003e\n  \u003cbr /\u003e\u003ca href=\"https://github.com/sponsors/crazy-max\"\u003e\u003cimg src=\"https://img.shields.io/badge/sponsor-crazy--max-181717.svg?logo=github\u0026style=flat-square\" alt=\"Become a sponsor\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.paypal.me/crazyws\"\u003e\u003cimg src=\"https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal\u0026style=flat-square\" alt=\"Donate Paypal\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## :warning: Abandoned project\n\nThis project is not maintained anymore and is abandoned. Feel free to fork and\nmake your own changes if needed.\n\n## About\n\n**firefox-history-merger** is a CLI application written in [Go](https://golang.org/) to merge history\nof [Firefox](https://www.mozilla.org/en-US/firefox/) and repair missing favicons with ease.\n\n![](.res/screenshot.png)\n\u003e Screenshot of firefox-history-merger\n\n___\n\n* [Features](#features)\n* [Requirements](#requirements)\n* [Download](#download)\n* [Usage](#usage)\n  * [Info](#info)\n  * [Merge](#merge)\n  * [Repair favicons](#repair-favicons)\n* [About Firefox places](#about-firefox-places)\n  * [Places expiration limit](#places-expiration-limit)\n  * [Databases schema](#databases-schema)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Features\n\n* Merge history (`moz_places`) from `places.sqlite` file\n* `moz_historyvisits` are also merged\n* [Frecency](https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Frecency_algorithm) is recalculated during the merge\n* Repair favicons\n* Display info about `places.sqlite`\n* Optimize database into a minimal amount of disk space\n\n## Requirements\n\nSchema version that can be used is **v39 (Firefox 57)** to **v53 (Firefox 81)**. Check if your `places.sqlite` is\ncompatible with `info` command.\n\nIf your database is not compatible, you can copy your `places.sqlite` in a compatible Firefox\n[profile folder](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data), then launch/close\nFirefox and your `places.sqlite` should now be compatible. \n\n## Download\n\nYou can download the application matching your platform on the\n[**releases page**](https://github.com/crazy-max/firefox-history-merger/releases/latest).\n\n## Usage\n\nFirst close Firefox and copy `places.sqlite` and `favicons.sqlite` files from\n[your Firefox profile folder](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data) somewhere.\n\nIn the following examples, this folder structure will be used:\n\n```\nfavicons.sqlite\nfirefox-history-merger.exe\nplaces.sqlite\nplaces_to_merge.sqlite\n```\n\n### Info\n\nYou probably want to have more info about your `places.sqlite` database you have before merging history:\n\n```\n$ firefox-history-merger info places.sqlite\nSun, 23 Jun 2019 03:43:47 CEST INF Schema version:         v52 (Firefox \u003e= 65)\nSun, 23 Jun 2019 03:43:48 CEST INF Compatible:             true\nSun, 23 Jun 2019 03:43:48 CEST INF Places entries:         1934\nSun, 23 Jun 2019 03:43:48 CEST INF Historyvisits entries:  1678\nSun, 23 Jun 2019 03:43:48 CEST INF Last used on:           2019-06-21 02:31:46\n```\n\n### Merge\n\nNow execute this command to merge `places_to_merge.sqlite` with your working `places.sqlite`:\n\n```\n$ firefox-history-merger merge places.sqlite places_to_merge.sqlite\nSun, 23 Jun 2019 04:33:58 CEST INF 5199 places will be merged\nSun, 23 Jun 2019 04:33:58 CEST INF Merging 1000 places (1/6)...\nSun, 23 Jun 2019 04:33:59 CEST INF Merging 1000 places (2/6)...\nSun, 23 Jun 2019 04:34:01 CEST INF Merging 1000 places (3/6)...\nSun, 23 Jun 2019 04:34:03 CEST INF Merging 1000 places (4/6)...\nSun, 23 Jun 2019 04:34:05 CEST INF Merging 1000 places (5/6)...\nSun, 23 Jun 2019 04:34:07 CEST INF Merging 199 places (6/6)...\nSun, 23 Jun 2019 04:34:09 CEST INF Optimizing database...\nSun, 23 Jun 2019 04:34:09 CEST INF Finished created=4478 errors=0 total=5199 updated=721\n```\n\n### Repair favicons\n\nIf you want you can also repair missing favicons. It can take a long time depending on the number of entries in your\nhistory, since the favicon will be recovered for each entry if there is no attached favicon.\n\n```\n$ firefox-history-merger repair-favicons places.sqlite favicons.sqlite\nSun, 23 Jun 2019 04:29:02 CEST INF Checking 1948 places...\nSun, 23 Jun 2019 04:29:02 CEST INF Favicon repaired favicon_id=18575 left=1938 places_id=33864 url=https://github.com/\nSun, 23 Jun 2019 04:29:05 CEST ERR Cannot get favicon error=\"no favicon found\" favicon_id=0 left=1845 places_id=200497 url=http://www.videojs.com/\n...\nSun, 23 Jun 2019 04:32:54 CEST ERR Cannot get favicon error=\"no favicon found\" favicon_id=0 left=1 places_id=1955773 url=https://docs.docker.com/v17.09/engine/admin/logging/view_container_logs/\nSun, 23 Jun 2019 04:32:54 CEST INF Finished errors=618 linked=873 repaired=402 skipped=23 total=1948 valid=32\n```\n\n## About Firefox places\n\n### Places expiration limit\n\nAs stipulated in this [StackExchange thread](https://superuser.com/questions/895302/how-do-i-set-max-browsing-history-size/995459#995459),\nthe relevant function is `_loadPrefs()` in\n[nsPlacesExpiration.js](https://dxr.mozilla.org/mozilla-central/source/toolkit/components/places/nsPlacesExpiration.js#714).\nIt tries to determine the limit by first checking `PREF_MAX_URIS` (which is `\"max_pages\"`). If `PREF_MAX_URIS` isn't\nset or is a negative value, it then attempts to calculate the 'optimal database size' based on available memory\nand disk space.\n\nSo if you want to retain all history ('infinite' history), you could set `places.history.expiration.max_pages`\nto 2147483647 (the highest 32-bit signed integer) in `about:config`.\n\nOnce you create it and set it, check the value of `places.history.expiration.transient_current_max_pages`.\nIt should automatically adjust itself to match your `max_pages` setting. \n\n### Databases schema\n\nDatabase schema version is stored in `user_version` [pragma statement](https://sqlite.org/pragma.html). Linked\nFirefox version to database schema can be found in\n[Database.cpp](https://dxr.mozilla.org/mozilla-central/source/toolkit/components/places/Database.cpp#993).\n\n![Firefox v53 database schema](.res/schemas/v53.png)\n\u003e [Edit this diagram](https://www.draw.io/?title=firefox_v53.png\u0026url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrazy-max%2Ffirefox-history-merger%2Fmaster%2F.res%2Fschemas%2Fv53.png%3Ft%3D0) in your browser. \n\n## Contributing\n\nWant to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You\ncan also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) or by making\na [Paypal donation](https://www.paypal.me/crazyws) to ensure this journey continues indefinitely!\n\nThanks again for your support, it is much appreciated! :pray:\n\n## License\n\nMIT. See `LICENSE` for more details.\u003cbr /\u003e\nIcon credit to [Zlatko Najdenovski](http://pixelbazaar.com/) (firefox icon)\nand [BomSymbols](https://creativemarket.com/BomSymbols) (clock icon).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazy-max%2Ffirefox-history-merger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazy-max%2Ffirefox-history-merger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazy-max%2Ffirefox-history-merger/lists"}