Profile backup doesn't work
Hi, I have a disaster situation. I backed up my profile and then I wiped my computer running Ubuntu 20.04. I replaced it with Ubuntu 24.04. Now my profile seems to not be compatible with the Firefox installation on Ubuntu 24.04.
I followed this official instructions: https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles
I put my old profile in the ~/snap/firefox/common/.mozilla/firefox/ folder and I set the correct values in profiles.ini. But sadly when I start Firefox all my passwords, extensions and history are not there. I lost everything.
I'm super desperate. Please tell me I can fix this somehow. Why is the official documentation lying?
Svi odgovori (13)
Hi, why do you say it's not compatible? Did Firefox display a message indicating that the profile was used in newer version of Firefox and require you to create a new profile?
Actually, it sounds more like Firefox didn't load the profile at all, perhaps because it wasn't the default profile in installs.ini. Could you check whether your stuff is available in a different profile, as follows:
Profile Manager Page
Inside Firefox, type or paste about:profiles in the address bar and press Enter/Return to load it.
This page should list at least one profile and could list many. (Each profile has two folders and one or more buttons. Do not use any Remove buttons!)
The profile that Firefox is currently using will have this:
This is the profile in use and it cannot be deleted.
Do you have any other profile(s) listed on this page? If so, you can check whether it is the one you were using recently by clicking its Launch profile in new browser button.
If it isn't what you want, simply close that new window.
If it IS what you want, back on the about:profiles page, click the Set as default profile button for that profile so Firefox uses it automatically at the next startup.
Any progress so far?
It says "This is the profile in use and it cannot be deleted."
To answer your question how do I know it's not compatible.. I just assume that's the case because all my extensions from before are disabled, all my passwords are gone and all my history is gone. I also had few user certificates and they are gone.
So there is only one profile listed on about:profiles? Could you compare the Root Directory path listed on the page with the one where you deposited your old files to see whether they are the same. If they are not the same, how different is the path from what you expected?
(Sorry, as a Windows person, I don't know the ins and outs of the different Linux packages and where they store their data.)
I'm not sure I understand your question. I copied my backed up profile into the directory where firefox keeps profiles so the directories are of course same.
Please see the screenshot.. when I start Firefox I get this message that files are used by another application. Is maybe this the cause of my problem? What does it mean? No other application is using these files.
You can use the button in "Help -> More Troubleshooting Information" (about:support) to go to the current Firefox profile folder or use the about:profiles page (Root directory).
- Help -> More Troubleshooting Information -> Profile Folder/Directory:
Windows: Open Folder; Linux: Open Directory; Mac: Show in Finder - https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data
You can copy certain files with Firefox closed from one profile folder to the current profile folder to recover personal data. Note that best is to avoid restoring a full profile folder and only restore important files that are safe to restore/transfer.
- bookmarks and history: places.sqlite
- favicons: favicons.sqlite
- bookmark backups: compressed .jsonlz4 JSON backups in the bookmarkbackups folder
- cookies.sqlite for the Cookies
- formhistory.sqlite for saved autocomplete Form Data
- logins.json (encrypted logins) and key4.db (encryption key/primary password) for logins saved in the Password Manager
- cert9.db for certificates stored in the Certificate Manager
- persdict.dat for words added to the spell checker dictionary
- permissions.sqlite for Permissions and possibly content-prefs.sqlite for other website specific data (Site Preferences)
- sessionstore.jsonlz4 for open tabs and pinned tabs (see also the sessionstore-backups folder)
Ok, I'm trying again from scratch. I removed everything, executed "firefox -P", created a new profile, closed down profile manager and then copied only my logins.json and key4.db from my backed up profile into this new one.
I start Firefox, go to Passwords and there is nothing.
And this doesn't make sense to me. Because if I open logins.json in a text editor I can actually see my stored logins (encrypted of course). But for some reason Firefox does not read anything from this file.
I simply can't understand this. What did I do wrong? I precisely followed instructions on this link: https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles
If you replaced the new profile logins.json/key4.db with the old ones, then Firefox really should read those. Are you using the Open Directory button for the Root Directory on about:profiles to launch that directory? Just in case it is somewhere weird that the article doesn't account for.
You can temporarily set signon.debug => true in about:config.
You can open the about:logins page and check the Browser Console for login related messages. You can clear the messages in the console beforehand and only enable Errors and Warnings, hidden items may have an item count appended. Do not forget to reset signon.debug to false after you are done testing.
Yes, I'm 100% sure about directory path.
I have set signon.debug to true and I don't see anything printed in the console. See screenshot.
This is about the Browser Console (Ctrl+Shift+J) and not the Web Console.
With this console I'm getting "Couldn't decrypt string" errors. See example in the screenshot.
That could indicate a problem with the encryption stored in key4.db. Are you sure that logins.json and key4.db are matching files?
cor-el said
That could indicate a problem with the encryption stored in key4.db. Are you sure that logins.json and key4.db are matching files?
Pretty sure. I took them from the same profile folder. Is there a way to reverse engineer how the logins are encrypted?