This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox wiped my saved logins - How to restore/merge from backup?

  • 3 replies
  • 1 has this problem
  • 36 views
  • Last reply by cor-el

more options

I have firefox sync set up, but I ask it not to sync logins. Recently, one of my profiles had an issue with sync and it asked me to reconnect. After reconnecting it cleared all my saved logins. I have a backup of `logins.json` but how can i restore it so i have the old and new logins?

Thanks, Jayen

I have firefox sync set up, but I ask it not to sync logins. Recently, one of my profiles had an issue with sync and it asked me to reconnect. After reconnecting it cleared all my saved logins. I have a backup of `logins.json` but how can i restore it so i have the old and new logins? Thanks, Jayen

All Replies (3)

more options

Restoring logins.json (and possibly the matching key4.db) will replace all currently saved passwords. It is not possible to merge passwords other then via Sync AFAIK. Best is probably not to use the same device name when you (re)connect to Sync to prevent losing your current personal data. When you use the same device name then Firefox may think you want to replace (initialize) your current personal data with data previously stored on the Sync server. If you use a different name then Firefox may want to merge instead of replacing your personal data. You would have to test this.

more options

Thanks for your help. Can I use the matching key4.db to merge? I assume if firefox can do it, so can I. I would prefer not to send the passwords to firefox sync if possible. Although if I know only I have the [private] key then maybe it's ok.

Now that I think about this more, I think it happened in the reverse order. login.json got corrupt first, then sync broke [since it didn't have the login information].

I have backed up the new login.json and restored the old login.json and it seems to be fine. There aren't too many in the new one, so I've re-entered them manually.

more options

The passwords are always stored in logins.json. The key4.db file and previously key3.db file stores the basic encryption key and the master password. The logins.json and key4.db files need to match to be able to decrypt the login data.