A command-line tool that backs up and restores the important parts of a browser profile — bookmarks, saved passwords, cookies, and settings — without dragging along cache, thumbnails, or other disposable junk.
Supports Firefox, LibreWolf, and Chrome. Requires Python 3.8+.
You'll need the .whl file (a built Python package) for this tool.
pip install bbackup-*.whlOr, if you'd rather keep it in its own isolated environment instead of your main Python install:
pipx install bbackup-*.whlEither way, this adds a bbackup command you can run from anywhere.
bbackup backup autoDetects every installed browser on this machine (Firefox, LibreWolf,
Chrome) and backs each one up — no need to know profile folder paths. Each
browser gets its own .zip, saved to ~/bbackup/ by default (pass
-o <folder> to choose a different location).
Just want to see what auto would find first, or back up a browser/profile
that isn't showing up automatically?
bbackup detectlists every browser it finds, its profiles, and a ready-to-run command for each. From there:
bbackup backup browser -b firefox -d "<profiles folder from detect>"backs up every profile under that folder, or — for one specific profile (or one that isn't registered/showing up at all) — by its own folder path:
bbackup backup profile -b firefox -p "<the profile's own folder>"bbackup restore browser -b firefox -d "<profiles folder>" -i "<backup>.zip" -m new-profileBy default (-m new-profile) this creates a brand new profile from the
backup and leaves everything else untouched — the safe choice. There's also
-m overwrite to replace files in an existing profile in place; it's
destructive (can't be undone), so it requires an extra --force flag and a
confirmation prompt.
If you backed up a single profile with backup profile, restore it the
same way — straight to a folder, no profile registration involved:
bbackup restore profile -i "<backup>.zip" -p "<where to put it>"Close the browser completely before backing up or restoring — some files can otherwise end up locked or in an inconsistent state. Every backup and restore prints a reminder of this and waits for confirmation before touching anything.
Firefox / LibreWolf: bookmarks, saved (encrypted) passwords, cookies,
settings (including user.js overrides, e.g. an arkenfox-style config),
UI customizations (chrome/ — userChrome.css/userContent.css),
installed extensions and their settings, form-autofill history.
Chrome: bookmarks, saved (encrypted) passwords, cookies, settings,
autofill data, and installed extensions' own code (large and binary, but
included by default since extensions matter — pass --no-extensions to
skip them).
Not backed up: cache, thumbnails, temporary browser-internal files, session
history (unless you ask for it with --include-session), and other things
the browser can safely regenerate on its own.
- Chrome passwords don't move between machines or operating systems. Chrome encrypts saved passwords with a key held by the OS itself (DPAPI on Windows, Keychain on macOS, libsecret on Linux). Restoring onto a different machine or OS gives Chrome a file it simply can't decrypt — that's a limitation of Chrome's own security model, not of this tool.
- Chrome cookies are partially affected the same way.
- Firefox/LibreWolf passwords and cookies restore cleanly everywhere, regardless of machine or OS.
- Chrome's installed extensions are backed up by default (their actual
code, not just settings) — pass
--no-extensionsto skip them if you'd rather reinstall from the Chrome Web Store after a restore instead. - This tool doesn't check whether the browser is currently running — always close it yourself first (see above).
Every command has its own detailed --help:
bbackup --help
bbackup backup --help
bbackup restore --helpPrefer reading without running anything? USAGE.md lists every command and flag in one page — generated straight from the CLI itself, so it can't drift out of sync with a flag rename or addition.