Is it possible to set firefox to recreate the daily bookmarkbackup (json) file each time it close as opposed to once a day ?
From what I understand, Firefox create a daily backup of it's bookmarks in a .json file the first time it closes each day. We found that if a user has already closed Firefox in the present day (and the .json bookmarkbackup file is already created for the present day), it won't add to this file the bookmarks added later in the day at futures Firefox closes...
So if, for example, places.sqlite gets corrupted later in the day, all new bookmarks added after the first close (and creation of original daily backup) of Firefox aren't backuped...
Is there any way to set it so that each time it closes for the current day, it regenerate the daily backup of bookmarks with the lastest bookmarked pages?
Thanks
Επιλεγμένη λύση
Ok I think I've found the final solution. Here it is :
- I create a symlink for the bookmarks.html file so it gets created on the user network share as opposed to the local profile folder
- Use the following settings in the pref.js
- // This line enable auto-creation of bookmarks.html file each time firefox closes
- pref("browser.bookmarks.autoExportHTML", true);
- // This line disable the smart bookmarks (so they don't get double, triple, etc. backuped)
- pref("browser.places.smartBookmarksVersion", -1);
- // This line prevent .json daily bookmarks backup from being created, so firefox uses bookmarks.html file instead when loading bookmarks
- pref("browser.bookmarks.max_backups", 0);
Thanks a lot for pointing me to the right direction for a solution.
Franck
Ανάγνωση απάντησης σε πλαίσιο 👍 1Όλες οι απαντήσεις (9)
Not sure how to do such, but i can tell you this, please update firefox.
Also if it did it every time it closes, it may be terminated and the JSON gets corrupted.
Note that a JSON backup is created when you start Firefox and not when you close Firefox.
You can make Firefox create an automatic HTML backup (bookmarks.html) when you exit Firefox if you set the browser.bookmarks.autoExportHTML pref to true on the about:config page.
That backup is created by default in the profile folder as bookmarks.html, but you can set the file name and path via the browser.bookmarks.file pref on the about:config page.
The browser.bookmarks.file pref doesn't exist by default and you need to create a new String pref with the name browser.bookmarks.file and set the value to the full path of the backup bookmarks file.
Note: an HTML backup doesn't preserve tags and annotations, so you lose those if you need to import the HTML backup.
If you click on "more system details", you'll see that i'm using firefox 20 for linux... wich is the lastest version for ubuntu 10.04LTS at the moment I think
Thanks cor-el for the suggestion. Would it be possible to reimport that backup.html file each time firefox open?
The problem is that we have about 4000 users here and were looking for a way to preserve bookmarks for firefox for every users on the network file server but making 4000 backups of "places.sqlite" file that is 10Mb wasn't logical as it would add about 40Gb to our daily backups + the traffic each time someone start or stop firefox. So backuping backups.json was more logical since this file weight about 12kb.
Any suggestion?
P.S. the location of the files don't matter since we can do a logical link (ln -s) in linux to place the real file anywhere
Thanks
If places.sqlite is not present in the main profile folder then Firefox will automatically rebuild the bookmarks from the most recent JSON backup in the bookmarkbackups folder. If no JSON backups are present there as well then Firefox will load a bookmarks.html file in the main profile folder.
Thanks cor-el for your help, I'll try the solution this afternoon to make sure it's working.
- I'll setup a symlink for the bookmarks.html file to be hosted on the user share and setup firefox to create this file at each close. - Since the local profile gets recreated at each login, if I remove the symlink for the bookmarkbackups folder, It will be recreated empty and therefore the bookmarks.html file should be imported correctly.
Thanks
Just tested and it works partially for what I try to do.
The bookmarks.html file gets created and preserve all bookmarks for the user. The only problem now is that this bookmarks.html file contains Smart Bookmarks auto-generated sections (Most Visited, Recently Bookmarked, Recent tags) and since those gets recreated dynamically by firefox, those 3 sections are added in the next bookmarks.html file as double, triple, etc...
Is there any way to disable those 3 sections from about:config from appearing???
Thanks
Επιλεγμένη λύση
Ok I think I've found the final solution. Here it is :
- I create a symlink for the bookmarks.html file so it gets created on the user network share as opposed to the local profile folder
- Use the following settings in the pref.js
- // This line enable auto-creation of bookmarks.html file each time firefox closes
- pref("browser.bookmarks.autoExportHTML", true);
- // This line disable the smart bookmarks (so they don't get double, triple, etc. backuped)
- pref("browser.places.smartBookmarksVersion", -1);
- // This line prevent .json daily bookmarks backup from being created, so firefox uses bookmarks.html file instead when loading bookmarks
- pref("browser.bookmarks.max_backups", 0);
Thanks a lot for pointing me to the right direction for a solution.
Franck
Τροποποιήθηκε στις