Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bbackup

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+.

Install

You'll need the .whl file (a built Python package) for this tool.

pip install bbackup-*.whl

Or, if you'd rather keep it in its own isolated environment instead of your main Python install:

pipx install bbackup-*.whl

Either way, this adds a bbackup command you can run from anywhere.

Quick start

1. Back up everything, automatically

bbackup backup auto

Detects 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).

2. Or target one browser/profile specifically

Just want to see what auto would find first, or back up a browser/profile that isn't showing up automatically?

bbackup detect

lists 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>"

3. Restore a backup

bbackup restore browser -b firefox -d "<profiles folder>" -i "<backup>.zip" -m new-profile

By 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.

What gets backed up

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.

Known limitations

  • 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-extensions to 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).

More help

Every command has its own detailed --help:

bbackup --help
bbackup backup --help
bbackup restore --help

Prefer 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages