How to Back Up Firefox Snap Settings on Linux


Backing up Firefox sounds simple until Linux quietly adds one tiny plot twist: Snap. If you installed Firefox as a traditional package, you may expect your browser profile to live in ~/.mozilla/firefox/. But if Firefox came from Snap, especially on modern Ubuntu systems, your settings, bookmarks, extensions, passwords, cookies, browsing history, and personal browser configuration are usually stored somewhere else: ~/snap/firefox/common/.mozilla/firefox/.

That little path difference is the reason many people think their Firefox settings have vanished after a reinstall. The data is not necessarily gone. It may simply be living in Snap’s neighborhood, wearing a different hat, and refusing to answer when you call the old address.

This guide explains how to back up Firefox Snap settings on Linux safely, how to restore them, what files matter most, and how to avoid the most common backup mistakes. Whether you are preparing for a fresh Ubuntu installation, moving to another Linux machine, switching from Snap to a different Firefox package, or just being the responsible adult your future self will thank, this tutorial gives you a practical, copy-friendly workflow.

What Firefox Snap Settings Actually Include

Firefox stores most personal browser data inside a profile folder. That profile is the heart of your browser life. It contains bookmarks, saved passwords, extensions, open-session data, cookies, history, site permissions, toolbar changes, search settings, certificates, and many preferences you have adjusted over time.

In a standard non-Snap Firefox installation, the profile is commonly found here:

For Firefox installed as a Snap, the profile is commonly found here:

That common directory matters. Snap applications often have revision-based directories, but common is intended for data shared across revisions of the same Snap. In plain English: it is the place you should check first when backing up Firefox Snap settings.

Before You Back Up: Close Firefox Completely

Before copying your Firefox profile, close Firefox. Not “I closed the window but it might still be lurking in the background like a raccoon in the pantry.” Close it completely.

Firefox keeps databases such as bookmarks, history, cookies, and session data open while running. Copying those files during active use can create an incomplete or inconsistent backup. Use the menu to quit Firefox, then confirm from the terminal:

If the command returns a number, Firefox is still running. You can close it gently with:

Give it a few seconds, then check again. A quiet terminal is good news.

Find Your Firefox Snap Profile Folder

Open a terminal and run:

You will usually see files such as profiles.ini and one or more folders with names like:

The exact names are randomly generated. Do not worry if your folder looks like a password a cat typed while walking across the keyboard. That is normal.

To identify the active profile, inspect profiles.ini:

Look for a section with Default=1. The Path= line near it usually points to the profile Firefox opens by default.

Method 1: Back Up the Entire Firefox Snap Profile with tar

The simplest reliable method is to archive the whole Firefox profile directory. This protects bookmarks, passwords, extensions, preferences, and profile metadata in one neat file.

This creates a compressed backup such as:

That archive contains the Firefox Snap profile directory. Copy it to an external drive, encrypted storage, a private backup server, or another safe location. Please do not keep your only backup on the same drive you are about to erase. That is not a backup; that is a dramatic farewell letter.

Verify the Backup

After creating the archive, check that it exists and has a reasonable size:

You can also list the archive contents without extracting it:

If you see paths beginning with firefox/, your archive is structured correctly.

Method 2: Back Up with rsync

If you prefer a folder copy instead of a compressed archive, use rsync. This is excellent for repeat backups because it copies only changed files after the first run.

The -a option preserves important file attributes. The --delete option makes the backup mirror the current profile, which is useful for synchronization but also powerful. If you accidentally point it at the wrong destination, it can delete files there. Read the command twice before pressing Enter. Linux rewards accuracy and occasionally punishes enthusiasm.

Method 3: Use Snap’s Built-In Snapshot Feature

Snap also includes a snapshot mechanism. You can manually save the data for the Firefox Snap with:

Then list saved snapshots:

To restore a snapshot, use its set number:

Replace SNAPSHOT_ID with the number shown by snap saved. Snap snapshots are useful, especially before removing or changing a Snap package. However, for personal disaster recovery, a manual copy or archive of your Firefox profile is often easier to move to another machine, inspect, encrypt, and store wherever you like.

What Files Are Most Important?

Backing up the entire profile is best, but it helps to know what the key files do. Inside your active profile folder, you may find files such as:

  • places.sqlite: bookmarks and browsing history.
  • logins.json: saved login records, encrypted.
  • key4.db: encryption key database needed for saved passwords.
  • prefs.js: many customized Firefox preferences.
  • extensions/: installed extension files.
  • cookies.sqlite: website cookies.
  • permissions.sqlite: site permissions.
  • sessionstore.jsonlz4: session restore data, when present.
  • bookmarkbackups/: automatic bookmark backup files.

For saved passwords, logins.json and key4.db belong together. Copying one without the other is like saving a treasure map but throwing away the compass.

How to Restore Firefox Snap Settings

Restoring is basically the backup process in reverse, but do not rush. First install Firefox Snap if it is not already installed:

Launch Firefox once, then close it. This creates the expected Snap directories. After Firefox is fully closed, make a safety copy of the new empty profile:

Now restore from your tar archive:

Replace YYYY-MM-DD with the date in your backup filename. Then start Firefox:

Your bookmarks, extensions, saved sessions, and settings should return. If Firefox opens a blank profile, check profiles.ini and confirm it points to the restored profile folder.

Restoring Only One Profile

If you have multiple Firefox profiles and want to restore only one, copy the specific profile folder into:

Then run the Profile Manager:

From there, create a new profile and choose the restored folder, or select the profile if Firefox detects it. The Profile Manager is especially helpful when moving profiles between machines or when Firefox does not automatically use the folder you copied.

Common Mistakes to Avoid

Backing Up the Wrong Folder

The most common mistake is backing up ~/.mozilla/firefox/ when the active Firefox is actually the Snap version. On systems where Firefox Snap is the default, the real data may be under ~/snap/firefox/common/.mozilla/firefox/. Check both locations if you are unsure.

Ignoring Hidden Folders

The .mozilla directory is hidden because it starts with a dot. File managers may hide it unless you press Ctrl+H. Terminal commands do not care, but humans do. Humans are easily tricked by invisible folders.

Copying While Firefox Is Running

Always close Firefox before copying profile data. Open database files can produce incomplete backups. A backup that looks fine but fails later is the computer equivalent of a parachute packed by a raccoon.

Saving Backups Without Encryption

Your Firefox profile may contain saved sessions, cookies, browsing history, and encrypted password data. Even though saved passwords are encrypted, the profile still deserves privacy. Store backups on encrypted drives or inside encrypted archives when possible.

Optional: Create an Encrypted Backup

If you use gpg, you can encrypt the compressed backup:

This creates a file ending in .gpg. Keep the passphrase somewhere safe. Without it, the backup becomes a very secure paperweight.

Optional: Automate Firefox Snap Backups

You can create a small backup script:

Add this:

Make it executable:

Run it whenever needed:

You can also schedule it with cron or a systemd user timer, but manual backups before upgrades, reinstalls, or major changes are already a huge improvement over hoping the browser fairy is on duty.

How Often Should You Back Up Firefox Snap Settings?

For most users, backing up once a week is enough. If you rely heavily on saved tabs, bookmarks, extensions, developer profiles, or browser-based work tools, back up more often. You should also create a fresh backup before:

  • Reinstalling Linux.
  • Removing Firefox Snap.
  • Switching from Snap Firefox to APT, Flatpak, or Mozilla’s tarball build.
  • Resetting Firefox.
  • Testing risky extensions or custom preferences.
  • Moving to a new computer.

Experience Notes: What Backing Up Firefox Snap Settings Teaches You

Backing up Firefox Snap settings on Linux is one of those tasks that feels boring until it becomes heroic. The first time you need your browser profile after a reinstall, you suddenly realize that bookmarks are not just bookmarks. They are work notes, saved research, half-finished shopping comparisons, login shortcuts, extension settings, and that one obscure forum thread that solved a problem no official manual even admitted existed.

The biggest lesson is that package format matters. Many Linux users know Firefox, but not every Firefox stores data in the same location. A Firefox installed from a distribution package, a Snap, a Flatpak, and a manually downloaded Mozilla build can each use different profile paths. That does not make Linux bad. It makes Linux flexible, which is wonderful right up until you are looking for your bookmarks at midnight with the emotional stability of a wet paper bag.

In practice, the safest habit is to verify the active profile location from inside Firefox before creating a long-term backup routine. Open about:support, look for the profile directory, and compare it with the terminal path. Once you know where the real profile lives, your backup plan becomes simple. Confusion disappears. The computer stops looking haunted.

Another useful experience is to test restoration before trusting a backup. A backup you have never restored is more of a theory than a safety plan. You do not need to risk your main profile. You can copy the archive to another Linux user account, a virtual machine, or a spare test system. Extract it, launch Firefox Snap, and confirm that bookmarks and settings appear. This one test can save hours later.

It is also worth keeping more than one backup generation. If your profile becomes corrupted today and your automatic backup runs tonight, a single rolling backup may simply preserve the corruption. Keep at least three versions: recent, older, and “known good.” Storage is cheap. Rebuilding years of browser settings from memory is not.

Finally, treat your browser profile as sensitive data. Cookies can keep you signed in. History can reveal private research. Extensions can expose workflows. Saved login files are encrypted, but they still belong in protected storage. If you copy your Firefox Snap profile to a USB drive, encrypt the drive. If you upload it to cloud storage, use an encrypted archive first. Convenience is nice, but privacy is nicer.

Once you build the habit, backing up Firefox Snap settings becomes quick and almost invisible. Close Firefox, run a script, copy the archive somewhere safe, and move on with your life. Future you may never send a thank-you card, but future you will absolutely appreciate not having to recreate a browser from scratch while muttering at a monitor.

Conclusion

To back up Firefox Snap settings on Linux, focus on the correct profile location: ~/snap/firefox/common/.mozilla/firefox/. Close Firefox first, archive or sync the profile folder, verify the backup, and store it somewhere safe. For extra protection, use encryption and keep multiple backup versions.

The most important takeaway is simple: do not assume Snap Firefox uses the same profile path as traditional Firefox packages. Once you know where the data lives, backing it up is straightforward. A few terminal commands today can save your bookmarks, passwords, extensions, preferences, and sanity tomorrow. And frankly, sanity is the one browser extension no store has managed to package yet.

SEO Tags