X
Tap here to go to the mobile version of the site.

Support Forum

No automatic bookmark backups are created

Posted

Hi, What I understand from Mozilla's Help page it is that firefox does automatic bookmark backups and saves the last 15 in /profile/bookmarkbackups folder. In my case there is none json file in that folder that I haven't created manually. So it isn't a write permission problem. It is the only profile in ~/.mozilla/firefox folder so they can't be in another profile either. My guess is that it is disable somehow. I change my bookmarks regularly but not in every session; I would prefer not to enable the automatic backup every time firefox is closed. Any hint in the right direcction would be appreciated. Firefox ver 52.1.1

Hi, What I understand from Mozilla's Help page it is that firefox does automatic bookmark backups and saves the last 15 in /profile/bookmarkbackups folder. In my case there is none json file in that folder that I haven't created manually. So it isn't a write permission problem. It is the only profile in ~/.mozilla/firefox folder so they can't be in another profile either. My guess is that it is disable somehow. I change my bookmarks regularly but not in every session; I would prefer not to enable the automatic backup every time firefox is closed. Any hint in the right direcction would be appreciated. Firefox ver 52.1.1

Additional System Details

Installed Plug-ins

  • The IcedTea-Web Plugin executes Java applets.
  • Shockwave Flash 24.0 r0

Application

  • User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

More Information

cor-el
  • Top 10 Contributor
  • Moderator
17578 solutions 159001 answers

Note that Firefox normally only creates a new backup when there is a difference in the hash value that is part of the file name.

The JSON backup is created when Firefox is started.

The name of a JSON bookmarks backup file includes a total item count (folders and separators included) and an hash value to prevent saving the same backup more than once.

  • bookmarks-YYYY-MM-DD_<item count>_<hash>.jsonlz4.

Does Firefox at least create an HTML backup when you close Firefox if you set browser.bookmarks.autoExportHTML to true on the about:config page?

You can check for problems with the places.sqlite database (bookmarks and history) in the Firefox profile folder.

See also:

Use one of these to close Firefox if you are currently doing that by clicking the close X on the Firefox title bar.

  • "3-bar" menu button -> Exit (Power button)
  • Linux: File -> Quit
  • Windows: File -> Exit
  • Mac: Firefox -> Quit Firefox
Note that Firefox normally only creates a new backup when there is a difference in the hash value that is part of the file name. The JSON backup is created when Firefox is started. The name of a JSON bookmarks backup file includes a total item count (folders and separators included) and an hash value to prevent saving the same backup more than once. *bookmarks-YYYY-MM-DD_<item count>_<hash>.jsonlz4. Does Firefox at least create an HTML backup when you close Firefox if you set browser.bookmarks.autoExportHTML to true on the <b>about:config</b> page? You can check for problems with the <b>places.sqlite</b> database (bookmarks and history) in the Firefox profile folder. *https://addons.mozilla.org/firefox/addon/places-maintenance/ See also: *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox *https://support.mozilla.org/en-US/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file Use one of these to close Firefox if you are currently doing that by clicking the close X on the Firefox title bar. *"3-bar" menu button -> Exit (Power button) *Linux: File -> Quit *Windows: File -> Exit *Mac: Firefox -> Quit Firefox
FredMcD
  • Top 10 Contributor
4269 solutions 59882 answers

Type about:config<enter> in the address bar. If a warning screen comes up, press the Be Careful button. At the top of the screen is a search bar. Type browser.bookmarks.max_backups

The values for this setting are; -1 = unlimited number of backups 0 = Do not create any backups Any other number here will keep that many backups Example: 5 = 5 backups are kept.

Type '''about:config'''<enter> in the address bar. If a warning screen comes up, press the '''Be Careful''' button. At the top of the screen is a search bar. Type '''browser.bookmarks.max_backups''' The values for this setting are; -1 = unlimited number of backups 0 = Do not create any backups Any other number here will keep that many backups Example: 5 = 5 backups are kept.

Question owner

FredMcD said

Type about:config<enter> in the address bar. If a warning screen comes up, press the Be Careful button. At the top of the screen is a search bar. Type browser.bookmarks.max_backups The values for this setting are; -1 = unlimited number of backups 0 = Do not create any backups Any other number here will keep that many backups Example: 5 = 5 backups are kept.

Thanks for the reply, but it is set as 15, and still no backups.

''FredMcD [[#answer-972348|said]]'' <blockquote> Type '''about:config'''<enter> in the address bar. If a warning screen comes up, press the '''Be Careful''' button. At the top of the screen is a search bar. Type '''browser.bookmarks.max_backups''' The values for this setting are; -1 = unlimited number of backups 0 = Do not create any backups Any other number here will keep that many backups Example: 5 = 5 backups are kept. </blockquote> Thanks for the reply, but it is set as 15, and still no backups.

Question owner

cor-el dijo

Note that Firefox normally only creates a new backup when there is a difference in the hash value that is part of the file name. The JSON backup is created when Firefox is started. The name of a JSON bookmarks backup file includes a total item count (folders and separators included) and an hash value to prevent saving the same backup more than once.
  • bookmarks-YYYY-MM-DD_<item count>_<hash>.jsonlz4.
Does Firefox at least create an HTML backup when you close Firefox if you set browser.bookmarks.autoExportHTML to true on the about:config page? You can check for problems with the places.sqlite database (bookmarks and history) in the Firefox profile folder. See also: Use one of these to close Firefox if you are currently doing that by clicking the close X on the Firefox title bar.
  • "3-bar" menu button -> Exit (Power button)
  • Linux: File -> Quit
  • Windows: File -> Exit
  • Mac: Firefox -> Quit Firefox


Thanks for the reply, just to clarify there is no further issue with the bookmarks besides the backups. I can add and edit them all, and they are when I restart.

It enable the html backup everytime it closes, but it didn't make it. I also tried deleting the places.sqlite file, it didn't work either. But now I suspect that firefox isn't pointing to the default bookmarksbackups folder, since when I restored my bookmarks in the bookmarks library > Import and Backup > Restore there was only the option Choose file when at least it should show me the manually backup I created and I stored in bookmarksbakup folder before deleting places.sql.

How can I verify/configure where automatic bookmark backups are saved?

''cor-el [[#answer-972323|dijo]]'' <blockquote> Note that Firefox normally only creates a new backup when there is a difference in the hash value that is part of the file name. The JSON backup is created when Firefox is started. The name of a JSON bookmarks backup file includes a total item count (folders and separators included) and an hash value to prevent saving the same backup more than once. *bookmarks-YYYY-MM-DD_<item count>_<hash>.jsonlz4. Does Firefox at least create an HTML backup when you close Firefox if you set browser.bookmarks.autoExportHTML to true on the <b>about:config</b> page? You can check for problems with the <b>places.sqlite</b> database (bookmarks and history) in the Firefox profile folder. *https://addons.mozilla.org/firefox/addon/places-maintenance/ See also: *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox *https://support.mozilla.org/en-US/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file Use one of these to close Firefox if you are currently doing that by clicking the close X on the Firefox title bar. *"3-bar" menu button -> Exit (Power button) *Linux: File -> Quit *Windows: File -> Exit *Mac: Firefox -> Quit Firefox </blockquote> Thanks for the reply, just to clarify there is no further issue with the bookmarks besides the backups. I can add and edit them all, and they are when I restart. It enable the html backup everytime it closes, but it didn't make it. I also tried deleting the places.sqlite file, it didn't work either. But now I suspect that firefox isn't pointing to the default bookmarksbackups folder, since when I restored my bookmarks in the bookmarks library > Import and Backup > Restore there was only the option Choose file when at least it should show me the manually backup I created and I stored in bookmarksbakup folder before deleting places.sql. How can I verify/configure where automatic bookmark backups are saved?
cor-el
  • Top 10 Contributor
  • Moderator
17578 solutions 159001 answers

Note that the bookmarks.html back is created by default in the main Firefox profile folder in ~/.mozilla if you set browser.bookmarks.autoExportHTML to true.

From the user agent I assume that you use the Firefox version from the official Mozilla server and not a version from the repositories.

Try to create a new profile to test if your current profile is causing the problem.

See "Creating a profile":

If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over problems.

Note that the bookmarks.html back is created by default in the main Firefox profile folder in ~/.mozilla if you set browser.bookmarks.autoExportHTML to true. From the user agent I assume that you use the Firefox version from the official Mozilla server and not a version from the repositories. Try to create a new profile to test if your current profile is causing the problem. See "Creating a profile": *https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over problems. *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
FredMcD
  • Top 10 Contributor
4269 solutions 59882 answers

Perhaps this will interest you;

These add-ons can be a great help by backing up and restoring Firefox

https://addons.mozilla.org/en-US/firefox/addon/febe/ FEBE (Firefox Environment Backup Extension)

FEBE allows you to quickly and easily backup your Firefox extensions, history, passwords, and more. In fact, it goes beyond just backing up -- It will actually rebuild your saved files individually into installable .xpi files. It will also make backups of files that you choose.

https://addons.mozilla.org/en-US/firefox/addon/opie/ OPIE

Import/Export extension preferences

Perhaps this will interest you; These add-ons can be a great help by backing up and restoring Firefox https://addons.mozilla.org/en-US/firefox/addon/febe/ FEBE (Firefox Environment Backup Extension) FEBE allows you to quickly and easily backup your Firefox extensions, history, passwords, and more. In fact, it goes beyond just backing up -- It will actually rebuild your saved files individually into installable .xpi files. It will also make backups of files that you choose. https://addons.mozilla.org/en-US/firefox/addon/opie/ OPIE Import/Export extension preferences

Question owner

cor-el said

Note that the bookmarks.html back is created by default in the main Firefox profile folder in ~/.mozilla if you set browser.bookmarks.autoExportHTML to true. From the user agent I assume that you use the Firefox version from the official Mozilla server and not a version from the repositories. Try to create a new profile to test if your current profile is causing the problem. See "Creating a profile": If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over problems.

Thanks for the help, I found the html backup. I created a new profile, :( same problem. But luanching from console I got this error whenever firefox starts or a manual backup is made.

A coding exception was thrown and uncaught in a Task.

Full message: RangeError: date value is not finite in DateTimeFormat.format() Full stack: PO_populateRestoreMenu/<@chrome://browser/content/places/places.js:449:33 TaskImpl_run@resource://gre/modules/Task.jsm:319:42 Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:932:23 this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:813:7 this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:747:11

Could it be the DateTime format?

''cor-el [[#answer-972440|said]]'' <blockquote> Note that the bookmarks.html back is created by default in the main Firefox profile folder in ~/.mozilla if you set browser.bookmarks.autoExportHTML to true. From the user agent I assume that you use the Firefox version from the official Mozilla server and not a version from the repositories. Try to create a new profile to test if your current profile is causing the problem. See "Creating a profile": *https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over problems. *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox </blockquote> Thanks for the help, I found the html backup. I created a new profile, :( same problem. But luanching from console I got this error whenever firefox starts or a manual backup is made. A coding exception was thrown and uncaught in a Task. Full message: RangeError: date value is not finite in DateTimeFormat.format() Full stack: PO_populateRestoreMenu/<@chrome://browser/content/places/places.js:449:33 TaskImpl_run@resource://gre/modules/Task.jsm:319:42 Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:932:23 this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:813:7 this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:747:11 Could it be the DateTime format?
cor-el
  • Top 10 Contributor
  • Moderator
17578 solutions 159001 answers

What are the names of the backups in the bookmarkbackups folder? The code seems to expect a '-' delimiter in the date string.

That would be this code that is about populating the Restore menu.

Populates the restore menu with the dates of the backups available.

let backupDate = PlacesBackups.getDateForFile(backupFiles[i]);
let m = restorePopup.insertBefore(document.createElement("menuitem"),
                                  document.getElementById("restoreFromFile"));
m.setAttribute("label", dateFormatter.format(backupDate) + sizeInfo);
m.setAttribute("value", OS.Path.basename(backupFiles[i]));
m.setAttribute("oncommand",
                       "PlacesOrganizer.onRestoreMenuItemClick(this);");
What are the names of the backups in the bookmarkbackups folder? The code seems to expect a '-' delimiter in the date string. That would be this code that is about populating the Restore menu. *https://dxr.mozilla.org/mozilla-esr52/source/browser/components/places/content/places.js#408 *https://dxr.mozilla.org/mozilla-esr52/source/toolkit/components/places/PlacesBackups.jsm#264 <pre><nowiki>Populates the restore menu with the dates of the backups available. let backupDate = PlacesBackups.getDateForFile(backupFiles[i]); let m = restorePopup.insertBefore(document.createElement("menuitem"), document.getElementById("restoreFromFile")); m.setAttribute("label", dateFormatter.format(backupDate) + sizeInfo); m.setAttribute("value", OS.Path.basename(backupFiles[i])); m.setAttribute("oncommand", "PlacesOrganizer.onRestoreMenuItemClick(this);");</nowiki></pre>

Question owner

cor-el said

What are the names of the backups in the bookmarkbackups folder? The code seems to expect a '-' delimiter in the date string. That would be this code that is about populating the Restore menu.
Populates the restore menu with the dates of the backups available.

let backupDate = PlacesBackups.getDateForFile(backupFiles[i]);
let m = restorePopup.insertBefore(document.createElement("menuitem"),
                                  document.getElementById("restoreFromFile"));
m.setAttribute("label", dateFormatter.format(backupDate) + sizeInfo);
m.setAttribute("value", OS.Path.basename(backupFiles[i]));
m.setAttribute("oncommand",
                       "PlacesOrganizer.onRestoreMenuItemClick(this);");

Thanks again,

The names of the backups are like this: bookmarks-2017-05-28.json I don't know javascript so maybe this will be as far as I get. If I understood well the first link you sent, it is expecting the full name of the month after converting it from the selected locale format to populate the restore menu. Mine locale is set to match the OS wich is en-US. Sadly it isn't doing the conversion. Anyway, it would explain why the restore menu isn't getting populated, not why the backups aren't generated. Maybe the problem it is in the second link you sent, that it isn't getting the path of the backups directory. But I don't know how to test it.

''cor-el [[#answer-972742|said]]'' <blockquote> What are the names of the backups in the bookmarkbackups folder? The code seems to expect a '-' delimiter in the date string. That would be this code that is about populating the Restore menu. *https://dxr.mozilla.org/mozilla-esr52/source/browser/components/places/content/places.js#408 *https://dxr.mozilla.org/mozilla-esr52/source/toolkit/components/places/PlacesBackups.jsm#264 <pre><nowiki>Populates the restore menu with the dates of the backups available. let backupDate = PlacesBackups.getDateForFile(backupFiles[i]); let m = restorePopup.insertBefore(document.createElement("menuitem"), document.getElementById("restoreFromFile")); m.setAttribute("label", dateFormatter.format(backupDate) + sizeInfo); m.setAttribute("value", OS.Path.basename(backupFiles[i])); m.setAttribute("oncommand", "PlacesOrganizer.onRestoreMenuItemClick(this);");</nowiki></pre> </blockquote> Thanks again, The names of the backups are like this: bookmarks-2017-05-28.json I don't know javascript so maybe this will be as far as I get. If I understood well [https://dxr.mozilla.org/mozilla-esr52/source/browser/components/places/content/places.js#408 the first link you sent], it is expecting the full name of the month after converting it from the selected locale format to populate the restore menu. Mine locale is set to match the OS wich is en-US. Sadly it isn't doing the conversion. Anyway, it would explain why the restore menu isn't getting populated, not why the backups aren't generated. Maybe the problem it is in the second link you sent, that it isn't getting the path of the backups directory. But I don't know how to test it.

Modified by emagel

FredMcD
  • Top 10 Contributor
4269 solutions 59882 answers

emagel said

The names of the backups are like this: bookmarks-2017-05-28.json

The backups are stored in a jsonlz4 file named something like this; bookmarks-2016-06-29_1424_enD1GTHya0JmicnYWg4V4g ==.jsonlz4 In this example; 2016-06-29 = date created, 1424 = number of entries.

Are you renaming those files?

''emagel [[#answer-972974|said]]'' <blockquote> The names of the backups are like this: bookmarks-2017-05-28.json </blockquote> The backups are stored in a jsonlz4 file named something like this; bookmarks-2016-06-29_1424_enD1GTHya0JmicnYWg4V4g ==.jsonlz4 In this example; 2016-06-29 = date created, 1424 = number of entries. Are you renaming those files?

Question owner

FredMcD said

The backups are stored in a jsonlz4 file named something like this; bookmarks-2016-06-29_1424_enD1GTHya0JmicnYWg4V4g ==.jsonlz4 In this example; 2016-06-29 = date created, 1424 = number of entries. Are you renaming those files?

No. I'm just using the name firefox suggests whenever I do a manual backup.

On the bright side I launched firefox with the --jsconsole option and found this error: "update.locale file doesn't exist in either the application or GRE directories" I created /usr/lib64/firefox/update.locale with en-US as the only content and now the restore menu populates. Still no backups though.

''FredMcD [[#answer-973148|said]]'' <blockquote> The backups are stored in a jsonlz4 file named something like this; bookmarks-2016-06-29_1424_enD1GTHya0JmicnYWg4V4g ==.jsonlz4 In this example; 2016-06-29 = date created, 1424 = number of entries. Are you renaming those files? </blockquote> No. I'm just using the name firefox suggests whenever I do a manual backup. On the bright side I launched firefox with the --jsconsole option and found this error: "update.locale file doesn't exist in either the application or GRE directories" I created /usr/lib64/firefox/update.locale with en-US as the only content and now the restore menu populates. Still no backups though.

Modified by emagel