For Firefox users, here’s how to export bookmarks, password and other user data when the browser does not load in Ubuntu, Debian, and other Linux.
Usually, user may open bookmark managing dialog by going to Firefox menu (three lines hamburger menu) -> Bookmarks -> Manage Bookmarks. Or just press “Ctrl+Shift+O” on keyboard. There you may export bookmarks into HTML file.
If the browser is broken and refuses to load, then the “Profiles” may help to restore your data.
What is Firefox Profile:
Firefox generates a folder for each user to store important data, including homepage, extensions, saved passwords, bookmarks, and user preferences, etc. And, the folder is called Firefox Profile. From that folder, you may either export the the auto-saved bookmarks or the whole folder for use in new Firefox installation.
Where is Firefox Profile in Linux:
Depends on the Firefox package: native DEB (or RPM), Flatpak, and Snap. The folder locates in different user directories.
The Profile location for Native Firefox:
Firefox as DEB/RPM (defaults in Debian / Ubuntu 21.04 & earlier) stores “Profiles” at .mozilla/firefox in user home directory. It’s a hidden folder that you need to press Ctrl+H in file manager to show them.
And, the profiles are usually folders with random name and “.default“, “.default-release” extensions.
Firefox Profile for SNAP:
For Ubuntu 21.10, default Firefox is a Snap app though you may switch back to native Deb. And, it stores user data as profile in snap/firefox/common/.mozilla/firefox/ in user home directory.
Firefox Profile for Flatpak:
For those using Firefox as Flatpak app, you may find the profiles by going to .var/app/org.mozilla.firefox/.mozilla/firefox/. Also, you need to press Ctrl+H in file manager to display (or hide) it.
Export / Backup Bookmarks in Firefox Profiles:
I have Firefox as native Deb in Ubuntu. And, as you see in previous picture there are 3 profile folders. Usually, the profile contains many sub-folders (e.g., bookmarkbackups, crashes, extensions) and data files.
In my case, the first two contain these folders. To make sure which one is currently in use, try opening ‘Profile Manager’ (if it works) via command in terminal (Ctrl+Alt+T):
firefox --ProfileManager
It lists all profiles with the folder extension names. And, the default highlight profile is usually the one in use.
OK, once you’re sure which is the profile folder in use. Open that folder, and back up the ‘.jsonlz4‘ file under bookmark backups sub-folder.
Firefox automatically creates backups of your bookmarks and saves in that folder if you have been using the browser for long time. Also, you may backup the whole profile folder to restore in new Firefox installation.
How to Restore Bookmarks / Profile in Firefox
After making backups, you may import them in another machine or a new Firefox installation via one of the methods below.
Restore Firefox Bookmarks via .jsonlz4 file
In new Firefox web browser, go to menu “Bookmarks -> Manage bookmarks” or just press Ctrl+Shift+O on keyboard.
When the ‘Library’ dialog opens, go to “Import and Backup -> Restore -> Choose File…“. Finally, select to open the ‘.jsonlz4‘ file to restore bookmarks.
Restore Firefox via Profile:
If you have backup the whole profile folder, you may restore extensions, saved passwords, user preferences, and more to get back where it was.
Firstly, open terminal from start menu (or press Ctrl+Alt+T on Ubuntu). Then start the profile manager:
firefox --ProfileManager
For Snap app, the command may also be /snap/bin/firefox --ProfileManager
. When it opens, click on “Create Profile” button to create a new profile.
Then, in the pop-up wizard click ‘Next’ and finally click “Choose Folder” to import the previous backup profile folder.
It will generate the new profile with all date imported. Finally click on “Start Firefox” button and enjoy!
Recent Comments