Firefox does a great job of of saving your user names and passwords so you don't need to remember them next time you visit a Web site. While this feature is great, Firefox does not include a good backup method to save passwords and accounts in the event you need to restore or copy to a safe location.
You can backup your entire Firefox profile directory, but if you just want to keep a backup copy, or have a need to sync them with another Computer, the Firefox extension Password Exporter is all you need.
Password Exporter allows you to export and import your saved user names and passwords between Computers or keep as a backup copy. Your passwords will be exported to an XML or CSV file and can be encrypted.
To install Password Exporter, click on Install Now follow the instructions, and restart Firefox after the installation has completed. When Firefox has restarted, you can access Password Exporter from Tools \ Options and select the Security Tab.
Look for the Import/Export Passwords button in the Passwords section:
To export, click on Import/Export Passwords button. In the Import/Export Passwords window, select Encrypt Usernames/Passwords check box (recommended as a safe guard) then click on Export Passwords.
To save the file, give it a name and select to either save it as a CSV or XML file.
Once saved, you can back it up or import it to another Computer running Firefox with Password Exporter installed.
NOTE: The "encryption" feature is mainly to prevent casual users from stumbling upon your passwords. It will not stop someone who actually wants to see them, as they could just import your file anyway. Use good judgment when exporting your passwords.