Skip to content

Instantly share code, notes, and snippets.

@slm0n87
Last active May 25, 2019 15:28
Show Gist options
  • Save slm0n87/ad87e736249ffb293ecd2e6ea13b51b3 to your computer and use it in GitHub Desktop.
Save slm0n87/ad87e736249ffb293ecd2e6ea13b51b3 to your computer and use it in GitHub Desktop.
recover important data within firefox
#!/bin/bash
# This recovers the following data from an old or restored firefox profile:
# places.sqlite: Bookmarks, Downloads and Browsing History
# favicons.sqlite: Website favicon images
# key4.db,logins.json: Website passwords
# permissions.sqlite: Per-site permissions (set cookies,installing extensions, showing images, displaying popups, etc)
# search.json.mozlz4: User-installed search engines
# persdict.dat Any custom word added to Firefox's dictionary
# formhistory.sqlite: Searches in the Firefox search bar, forms on websites
# cert9.db: Security certificate settings, imported certificates
# handlers.json: File types preferences like save file or open with specific application
#
# source: https://support.mozilla.org/en-US/kb/recovering-important-data-from-an-old-profile
#
echo "Stop firefox"
echo cd "<oldprofile>"
echo cp {places.sqlite,favicons.sqlite,key4.db,logins.json,permissions.sqlite,search.json.mozlz4,persdict.dat,formhistory.sqlite,cert9.db,handlers.json} "<profilepath>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment