Backing up and restoring bookmarks - Firefox: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
Line 6: Line 6:


==Difference between restoring and importing bookmarks==
==Difference between restoring and importing bookmarks==
'''Restoring a bookmark backup file replaces your existing bookmarks with the content of the backup file. This will remove your existing bookmarks.'''  The backup file can be one of the backups that Firefox creates automatically (stored in the [[bookmarkbackups folder]] of the Firefox [[profile]]) or it can be a backup file you've created yourself.  All bookmark backups are in JSON format.  Only Firefox 3.0 and above includes a "Backup and Restore" feature.   
'''When you restore a bookmark backup file, it replaces your existing bookmarks with the contents of the backup file. This will remove your existing bookmarks.'''  Starting in Firefox 3,  Firefox includes a [[#Creating bookmark backups|bookmark Backup]] and [[#Restoring bookmarks from backup|bookmark Restore]] feature,  in addition to the [[import bookmarks]] and [[export bookmarks]] features found in all Mozilla browsers.  All bookmark backups created and used in Firefox 3.0 and above are in JSON format.  The backup file can be one of the backups that Firefox creates automatically (stored in the [[bookmarkbackups folder]] of the Firefox [[profile]]) or it can be a backup file you've created yourself.   


'''When you import a bookmarks HTML file, its contents are added to your existing bookmarks.'''  If you want to add bookmarks from another Firefox installation to your existing bookmarks,  you must first have a [[bookmarks.html|bookmarks HTML  file]],  which you can create by [[Export bookmarks |exporting your bookmarks]] to an HTML file.  You would then use the Firefox Library window's  "Import HTML" feature, as explained below  (''not'' the "Restore" feature).  The file you import ''must'' be in HTML format.  Similarly, if you want to add bookmarks from Firefox 2 or another browser into Firefox 3,  or if you want to move your Firefox 3 bookmarks to another browser,  you ''must'' use the [[#Import and Export|Import HTML/Export HTML]] feature.
'''When you import a bookmarks HTML file, its contents are added to your existing bookmarks.'''  If you want to add bookmarks from another Firefox installation to your existing bookmarks,  you must first have a [[bookmarks.html|bookmarks HTML  file]],  which you can create by [[Export bookmarks |exporting your bookmarks]] to an HTML file.  You would then use the Firefox Library window's  "Import HTML" feature, as explained below  (''not'' the "Restore" feature).  The file you import ''must'' be in HTML format.  Similarly, if you want to add bookmarks from Firefox 2 or another browser into Firefox 3,  or if you want to move your Firefox 3 bookmarks to another browser,  you ''must'' use the [[#Import and Export|Import HTML/Export HTML]] feature (see below).


==Creating bookmark backups==
==Creating bookmark backups==

Revision as of 17:05, 4 June 2010

This article does not apply to Firefox 2 or below.

This article explains how to create and restore bookmark backup files in JSON format, as well as how to import and export bookmarks in HTML format, in Firefox 3.0 and above.

Note: These instructions require using the Library window "Import and Backup" button, which may not include a text label on Mac OS.

Difference between restoring and importing bookmarks

When you restore a bookmark backup file, it replaces your existing bookmarks with the contents of the backup file. This will remove your existing bookmarks. Starting in Firefox 3, Firefox includes a bookmark Backup and bookmark Restore feature, in addition to the import bookmarks and export bookmarks features found in all Mozilla browsers. All bookmark backups created and used in Firefox 3.0 and above are in JSON format. The backup file can be one of the backups that Firefox creates automatically (stored in the bookmarkbackups folder of the Firefox profile) or it can be a backup file you've created yourself.

When you import a bookmarks HTML file, its contents are added to your existing bookmarks. If you want to add bookmarks from another Firefox installation to your existing bookmarks, you must first have a bookmarks HTML file, which you can create by exporting your bookmarks to an HTML file. You would then use the Firefox Library window's "Import HTML" feature, as explained below (not the "Restore" feature). The file you import must be in HTML format. Similarly, if you want to add bookmarks from Firefox 2 or another browser into Firefox 3, or if you want to move your Firefox 3 bookmarks to another browser, you must use the Import HTML/Export HTML feature (see below).

Creating bookmark backups

Firefox automatically creates daily rotating backups of your bookmarks. The five most recent bookmark backup files are stored in the bookmarkbackups folder, located in the Firefox profile folder. You can also create your own bookmark backups, by opening the Firefox Library window ("Bookmarks -> Organize Bookmarks"), clicking the "Import and Backup" button and selecting "Backup...". The Backup feature allows you to save a bookmark backup file (e.g., "Bookmarks 2009-05-22.json") to the location of your choice. Bookmark backup files are stored in JSON format and can be restored from the Library window of any Firefox installation, as shown below.

Restoring bookmarks from backup

You can replace your current bookmarks with a backup by opening the Firefox Library window ("Bookmarks -> Organize Bookmarks"), clicking the "Import and Backup" button (shown here on Windows) and using the "Restore" feature. You can select one of the five dated backups that Firefox automatically creates or you can use the "Choose File..." option to select another bookmark backup file, such as a backup you created yourself or one from the bookmarkbackups folder of another profile (see Profile folder - Firefox for profile location). If you choose your own bookmark backup file, it must be in JSON format (any bookmarks saved in HTML format, such as exported bookmarks, must be imported). [1] Note: If you see the error, Unable to process the backup file, read this article.

You can also restore your bookmarks by exiting Firefox and removing the places.sqlite file from the Firefox profile folder. Firefox will rebuild the Places database from the latest automatic JSON backup or, if no JSON file is found, from a bookmarks.html file, as detailed here; however, you will lose your browsing history.

Import and Export

Firefox and many other browsers allow you to import bookmarks from an HTML file and export bookmarks to an HTML file. In Firefox 3, this is done from the Library window using "Import HTML" and "Export HTML" in the "Import and Backup" menu.

Import HTML

Note: You may need to set your operating system to show files in hidden locations, if you want to import a bookmarks HTML file from another profile. On Windows, also make sure that file extensions are not hidden. See Show hidden files and folders for details.

To import a bookmarks HTML file, open the Firefox Library window (see above), click the "Import and Backup" button and select "Import HTML... -> from an HTML File". When the file picker appears, navigate to the folder that contains the bookmarks HTML file you wish to use and select that file. The "Import HTML" feature of the Library window will add the contents of any bookmarks file in HTML format to your current bookmarks. If you don't wish to keep your current bookmarks, start Firefox in Safe Mode, select the option, "Reset bookmarks to Firefox defaults", and choose "Make Changes and Restart", before importing the bookmarks HTML file.

Only files in HTML format can be imported. To replace your current bookmarks with a bookmark backup file stored in JSON format, you should use the "Import and Backup -> Restore" feature (see above).

Export HTML

You can also export your bookmarks to an HTML file by opening the Library window, clicking the "Import and Backup" button and selecting "Export HTML...". Name the file (bookmarks.html is the default) and select a location to save the HTML file.

Note: Due to a bug (fixed in Firefox 3.5) sometimes after using the Export HTML feature, no bookmarks HTML file is saved. You may be able to fix the problem by backing up your bookmarks to a JSON file and then restoring the backup file (see above). See Unable to export bookmarks to HTML file - Firefox for more information.