Last Comment Bug 218636 - backup bookmark file
: backup bookmark file
Status: RESOLVED FIXED
[eta 04-08-02]
: fixed-aviary1.0
Product: Firefox
Classification: Client Software
Component: Bookmarks & History (show other bugs)
: unspecified
: All All
: P2 enhancement with 6 votes (vote)
: Firefox1.0beta
Assigned To: Vladimir Vukicevic [:vlad] [:vladv]
:
Mentors:
: 220252 221432 221721 227734 227968 228985 229276 249731 250302 262228 308237 311160 314424 315102 329102 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-08 07:13 PDT by sheng han
Modified: 2006-08-27 07:21 PDT (History)
28 users (show)
bugs: blocking‑aviary1.0PR+
bugs: blocking‑aviary1.0+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
simple patch (4.29 KB, patch)
2004-07-25 23:22 PDT, Ben Goodger (use ben at mozilla dot org for email)
no flags Details | Diff | Splinter Review
bookmarks-save-backup-0.patch (9.04 KB, patch)
2004-08-02 13:48 PDT, Vladimir Vukicevic [:vlad] [:vladv]
bugs: review+
bugs: approval‑aviary+
Details | Diff | Splinter Review

Description sheng han 2003-09-08 07:13:07 PDT
User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20030701
Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20030701

I use Firebird on PC/Windows platform. I have a problem when windows system
crash (blue screen), the next time I invoke Firebird, the bookmark file sometime
gone.

I wonder if its possible to place a backup file before 'FB' is up? This backup
file will just contain the bookmarks from last saved session, don't need to
syncronize with current using one. And while 'FB' is closed, do nothing to
backup file.  Next time 'FB' is called, remove old backup with new bookmark....



Reproducible: Sometimes

Steps to Reproduce:
1.
2.
3.

Actual Results:  
lost bookmark file...

Expected Results:  
that i can recover my bookmark from not too long ago when windows F$$K up

please....i've lost my bookmark for a couple of times.....
Comment 1 Ryuichi KUBUKI 2003-09-15 21:44:06 PDT
Quite agree on this bug. If it had journaling backup and rollback feature, it'd
be better, for Mozilla bookmark is a kind of personal database.
Comment 2 Mike Connor [:mconnor] 2003-09-25 06:03:51 PDT
*** Bug 220252 has been marked as a duplicate of this bug. ***
Comment 3 Mike Connor [:mconnor] 2003-09-25 11:40:51 PDT
*** Bug 220252 has been marked as a duplicate of this bug. ***
Comment 4 Mike Connor [:mconnor] 2003-10-06 19:02:22 PDT
*** Bug 221432 has been marked as a duplicate of this bug. ***
Comment 5 Mike Connor [:mconnor] 2003-10-09 11:55:18 PDT
*** Bug 221721 has been marked as a duplicate of this bug. ***
Comment 6 Christian Flatscher 2003-11-26 09:34:12 PST
Hi,

I suggest to add a feature to Mozilla / Firebird that allows to create backups
of files such as bookmarks.html, Personal toolbar, mail prefs, news prefs, etc.

How about adding a menu entry to the "Edit / Preferences..." menu underneath the
"Navigator" branch called "Settings backup"?

This should contain tick boxes of what somebody wants to backup, to where and
how often (time interval) this should happen. Also a restore feature should be
introduced with a selection option what and which backup should be restored.

This may solve some of the issues where an OS freezes or crashes unrecoverably.

--Christian
Comment 7 sheng han 2003-11-27 02:23:37 PST
FYI,
I discovered a plugin in the Firebird extentions page:
(http://texturizer.net/firebird/extensions/#bookmarkbackup)

I am using it, it will save the bookmark to your specified folder every day with
the weekday as a loop. So I end up with 7 bookmark backups in that folder, which
is quite acceptable for me. I guess people who need the backup feature can use
this before the actual native solution would came out.
Comment 8 Mike Connor [:mconnor] 2003-12-07 15:24:14 PST
*** Bug 227734 has been marked as a duplicate of this bug. ***
Comment 9 Mike Connor [:mconnor] 2003-12-17 19:47:06 PST
*** Bug 227968 has been marked as a duplicate of this bug. ***
Comment 10 José Jeria 2003-12-19 12:56:14 PST
*** Bug 228985 has been marked as a duplicate of this bug. ***
Comment 11 Ben Goodger (use ben at mozilla dot org for email) 2004-02-25 17:14:29 PST
Targeting for Pierre. Enough people are encountering mysterious bookmarks loss
that having a backup is useful. 
Comment 12 Ben Goodger (use ben at mozilla dot org for email) 2004-03-10 23:12:12 PST
brendan says it's worthwhile investigating if there's a platform pattern here
... perhaps file rename/move operations aren't atomic on windows, etc. 
Comment 13 Mike Connor [:mconnor] 2004-04-14 14:41:41 PDT
*** Bug 229276 has been marked as a duplicate of this bug. ***
Comment 14 Bradley Chapman (not reading bugmail, still gone but not forever) 2004-05-16 12:31:28 PDT
The Bookmarks Synchronizer extension is also a valuable tool that allows for
off-site backup of bookmarks using the FTP protocol. It can also export
bookmarks in XML format, and the latest versions have quite advanced functionality.

http://www.extensionsmirror.nl/index.php?showtopic=15
Comment 15 Ben Goodger (use ben at mozilla dot org for email) 2004-07-01 15:20:12 PDT
->danm

do a bugzilla query on "lost bookmarks" to find a number of bugs that backing up
the bookmark file would work around. 

First of all, just check to see if bookmark file is being held open when it
should have been closed...

A safe approach in general might be to make a copy of the bookmarks.html file
for backup purposes after a successful write of the bookmarks file. Many of the
"lost bookmarks" bugs result in bookmarks.html either being REMOVED or being
truncated to 0. In either case - when the browser starts instead of replacing
the bookmarks file with the DEFAULT one, the BACKUP file if present should be
used. This may hide the bug completely from users. 
Comment 16 Mike Connor [:mconnor] 2004-07-05 08:31:29 PDT
*** Bug 249731 has been marked as a duplicate of this bug. ***
Comment 17 Mike Connor [:mconnor] 2004-07-08 08:25:58 PDT
*** Bug 250302 has been marked as a duplicate of this bug. ***
Comment 18 Ben Goodger (use ben at mozilla dot org for email) 2004-07-25 23:22:38 PDT
Created attachment 154340 [details] [diff] [review]
simple patch

not sure if we want to do this - not sure what the use is, but here it is
Comment 19 chris hofmann 2004-07-30 14:29:36 PDT
who would be good reviewers?  danm, sspitzer, dveditz...  lets get some eyes on
this and decide..  
Comment 20 Vladimir Vukicevic [:vlad] [:vladv] 2004-07-30 14:45:17 PDT
Patch needs to be updated due to nsSafeOutputStream changes (bug 252053).  Ben
and I also talked about making the parser catch a truncated file by catching a
missing "</HTML>" -- should be done either later today or by monday at the latest.
Comment 21 Vladimir Vukicevic [:vlad] [:vladv] 2004-07-30 14:50:11 PDT
wrong button.
Comment 22 Vladimir Vukicevic [:vlad] [:vladv] 2004-08-02 13:48:06 PDT
Created attachment 155020 [details] [diff] [review]
bookmarks-save-backup-0.patch

Updated patch.	Tries to save a backup copy of the previous successful write,
instead of right after the latest write -- if the problems we're seeing are
caused by fs corruption/lossage, then doing that copy afterwards won't help us
any.  The patch then ends up saving a backup after any change but before the
next Flush or if the save timer fires, whichever comes first.  It also moves
the scheduling-related timer-disabling into the timer callback itself, so we
still get the periodic saves even though scheduling/etc. is disabled
Comment 23 Ben Goodger (use ben at mozilla dot org for email) 2004-08-07 22:43:54 PDT
Comment on attachment 155020 [details] [diff] [review]
bookmarks-save-backup-0.patch

>-    // bookmark timers and scheduling are disabled for 1.0, until
>-    // they can be fixed (bug 253478)
>-#if 0
>     /* timer initialization */
>     busyResource = nsnull;
> 
>     if (!mTimer)
>     {
>         busySchedule = PR_FALSE;
>         mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
>         NS_ASSERTION(NS_SUCCEEDED(rv), "unable to create a timer");
>         if (NS_FAILED(rv)) return rv;
>         mTimer->InitWithFuncCallback(nsBookmarksService::FireTimer, this, BOOKMARK_TIMEOUT, 
>                                      nsITimer::TYPE_REPEATING_SLACK);
>         // Note: don't addref "this" as we'll cancel the timer in the nsBookmarkService destructor
>     }
>-#endif

did you mean to remove this if 0? 

otherwise, r/a=ben@mozilla.org
Comment 24 Vladimir Vukicevic [:vlad] [:vladv] 2004-08-07 23:27:46 PDT
(In reply to comment #23)

> did you mean to remove this if 0? 

Yeah, I did, though I guess I meant to change the comment above it as well --
turns out I need that timer to do periodic saves of bookmarks. :)
Comment 25 Vladimir Vukicevic [:vlad] [:vladv] 2004-08-09 14:50:45 PDT
in branch/trunk.
Comment 26 PikeUK 2004-08-10 03:48:25 PDT
On my system the bookmarks.bak file doesn't seem to get updated when
bookmarks.html is changed and Firefox restarted, it simply stays the same as it
was when first created (according to nsIFile.idl copyTo can fail if the target
file already exists).

Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040809 Firefox/0.9.1+
Comment 27 Ryan Polk (Quark) 2004-08-10 12:40:42 PDT
setting fixed-aviary1.0 for bugfixes checked into branch, for searching purposes.
Comment 28 Peter van der Woude [:Peter6] 2004-09-30 03:31:19 PDT
*** Bug 262228 has been marked as a duplicate of this bug. ***
Comment 29 Phil Ringnalda (:philor, back in August) 2004-12-27 19:25:12 PST
*** Bug 276169 has been marked as a duplicate of this bug. ***
Comment 30 :Gavin Sharp [email: gavin@gavinsharp.com] 2004-12-27 21:15:15 PST
*** Bug 276169 has been marked as a duplicate of this bug. ***
Comment 31 Justin Wood (:Callek) 2004-12-27 23:05:03 PST
*** Bug 276169 has been marked as a duplicate of this bug. ***
Comment 32 :Gavin Sharp [email: gavin@gavinsharp.com] 2004-12-28 00:26:50 PST
*** Bug 276169 has been marked as a duplicate of this bug. ***
Comment 33 Elmar Ludwig 2005-09-13 00:06:46 PDT
*** Bug 308237 has been marked as a duplicate of this bug. ***
Comment 34 Ryan Flint [:rflint] (ping via IRC for reviews) 2005-10-04 23:02:55 PDT
*** Bug 311160 has been marked as a duplicate of this bug. ***
Comment 35 Elmar Ludwig 2005-10-30 13:47:56 PST
*** Bug 314424 has been marked as a duplicate of this bug. ***
Comment 36 Elmar Ludwig 2005-11-07 14:32:44 PST
*** Bug 315102 has been marked as a duplicate of this bug. ***
Comment 37 Steve England [:stevee] 2006-03-02 07:11:55 PST
*** Bug 329102 has been marked as a duplicate of this bug. ***
Comment 38 Mike Connor [:mconnor] 2006-08-27 07:21:41 PDT
sorry for bugspam, long-overdue mass reassign of ancient QA contact bugs, filter on "beltznerLovesGoats" to get rid of this mass change

Note You need to log in before you can comment on or make changes to this bug.