this post was submitted on 28 Jul 2025
36 points (97.4% liked)

Firefox

22943 readers
219 users here now

/c/firefox

A place to discuss the news and latest developments on the open-source browser Firefox.


Rules

1. Adhere to the instance rules

2. Be kind to one another

3. Communicate in a civil manner


Reporting

If you would like to bring an issue to the moderators attention, please use the "Create Report" feature on the offending comment or post and it will be reviewed as time allows.


founded 6 years ago
MODERATORS
 

I'm working on a suite of scripts that will enable me to hop Linux distros and get back to business as usual w/ minimal fuss. When I hop distros, I tend to back up my important stuff and blow everything else away so I can start with a clean slate. I have some scripts for updating my backups before the wipe and updating the system after the base install:

sudo apt update && sudo apt upgrade -y

Followed by other commands to install my favorite apps and configure my favorite desktop settings.

One thing that I haven't nailed down yet is restoring my Firefox add-ons through the command line. Searching the web, I'm not even sure this is feasible. I found this post from 2011 in the AskUbuntu forum, but I figure the answer might have changed since then.

I just want to remove as much friction as possible from the distro hopping process. I know I can store /home on a separate partition, but I prefer nice, clean installs followed by scripting in my config changes.

Any tips or advice would be greatly appreciated.

all 22 comments
sorted by: hot top controversial new old
[–] folekaule@lemmy.world 27 points 1 year ago* (last edited 1 year ago) (1 children)

I think Firefox Sync already restores your profile including add-ons, if you log into Firefox. Of course you may not want that for privacy reasons. In that case, I believe there is a way to self host a sync server, but I will have to go look for the repo for it.

Edit: https://github.com/mozilla-services/syncstorage-rs

[–] yo_scottie_oh@lemmy.ml 12 points 1 year ago (2 children)

I like to minimize cloud services if I can help it.

[–] folekaule@lemmy.world 13 points 1 year ago

Nothing wrong with that, and self hosting can get complex. My recommendation then is to back up the files in your Firefox profile the old fashioned way.

[–] eksb@programming.dev 16 points 1 year ago (2 children)

Why not just keep /home on a separate partition? Or just backup ~/.mozilla/?

[–] yo_scottie_oh@lemmy.ml 15 points 1 year ago

Why not just keep /home on a separate partition?

My issue is that over time, a lot of cruft builds up in there from apps I no longer use. I like things nice and clean.

Or just backup ~/.mozilla/?

The thought has crossed my mind. Maybe I should try this next time. Thanks for the idea.

[–] GenderNeutralBro@lemmy.sdf.org 2 points 1 year ago (1 children)

Perhaps this goes without saying, but if you want to do that, be sure you are installing Firefox through similar means across distros. This will not work with the Flatpak, for example.

Manual installation of Firefox is quite simple, and it self-updates, so that's always an option.

[–] yo_scottie_oh@lemmy.ml 2 points 1 year ago* (last edited 1 year ago)

be sure you are installing Firefox through similar means across distros. This will not work with the Flatpak, for example.

Very good point, I've picked up on this as well. Installed through the native package manager, the profile folder lives under ~/.mozilla/ whereas for flatpaks it's under ~/.var/app/org.mozilla.firefox/.mozilla/.

[–] HouseWolf@pawb.social 14 points 1 year ago

You can backup your .mozilla file from your home to a new install and it'll keep the everything how it was.

I've done it a few times now.

[–] kalkulat@lemmy.world 5 points 1 year ago* (last edited 1 year ago) (1 children)

I install and use FF from my home folder. As a result, I can simply copy my 'old' firefox folder and .mozilla folder (containing the FF config files) into the new distro's home. That way all of the features, settings, and extensions remain the same, regardless of the distro I've moved to.

Inside the .mozilla/Firefox/ folder you'll find separate folders for your profiles. The 'about:profiles' window lets you switch between them.If you want to experiment with one, make an archive of its folder. If you try something that doesn't work out, you can throw the messed-up profile away and extract a fresh copy from your archive, all's well. There are also many files INSIDE that profile folder you can toy with. Many, many options in this setup.

[–] Arcane2077@sh.itjust.works 1 points 1 year ago

This is the way

[–] trey_a_12@lemmy.world 4 points 1 year ago (1 children)

Any particular reason you don’t just sign in? Genuine question, and you could even create a dummy account that solely holds those extensions and anything else you would want to sync.

If you don't want to use Firefox sync, you can try just copying the whole profile folder from your backups.

[–] Zahtu@feddit.org -5 points 1 year ago (1 children)

i would say google is your friend: https://stackoverflow.com/a/37739112 without having tried it

[–] sndmn@lemmy.ca 7 points 1 year ago

You should stop saying that.