Package: gnucash
Version: 1.8.9-4
Severity: grave

  I'm sitting here watching a (likely futile) attempt to restore two months' 
worth of lost information for a user.  While it's likely that nothing can get 
the data back, I finally think I figured out what happened and how the data 
was lost.  I think the sequence of events is quite likely to occur in the 
hands of a user.  (in fact, I myself would probably only have avoided it by 
accident)

  Here's the deal: when you save a gnucash file, it creates a backup file 
that's indexed by the date on which it was saved.  This backup is very useful 
in the event that you have a program crash or make a serious blunder with the 
interface.  In early November, the user in question did just this: she loaded 
a backup of her "Accounts" file due to some sort of problem with the program.  
However, this resulted in the *backup* file being used as the new default 
save file and as gnucash's default file to load on startup.  "Accounts" 
remained frozen in a state from about November 3.

  All was well until she asked me for help with importing some old Quicken 
data, earlier today.  After importing the data into a separate file, I (not 
knowing that she was using the backup file) innocently opened the file 
"Accounts".  Apparently, either this or saving the file Accounts (not sure 
which) triggered GNUCash's "helpful" backup-purger, which immediately wiped 
out both her main accounts file and all of her recent backups.  We were left 
only with Accounts (the November 3rd edition, remember); two months' worth of 
data entry went down the drain without my knowing.

  Now, I understand why this functionality might be useful, but it seems far 
too easy to destroy data with it at the moment.  I suggest that, at the very 
least, several more sanity checks be incorporated.  For instance, only delete 
a file if:

  (A) there are at least X newer backups *by mtime* of the main file, AND
  (B) the file in question is at least Y days old *by mtime*, AND
  (C) the current sanity checks (that it looks like a GNUcash backup file with 
timestamp >Y days ago) apply, where the timestamp takes the LAST date in the 
filename when multiple dates are available.

  (A) makes sure that some backups are always available if you screw up; (B) 
makes sure that GNUcash isn't mislead by confusing filenames (such as 
Accounts.200411060911.xac.200501201015.xac).  At the very least, the 
modification of (C) should be made so that the ill effects of filenames like 
the one above are limited.

  Without some tightening of the criteria, I think the backup-purging should 
be disabled by default, as it's way too easy to unexpectedly lose data right 
now.

  Daniel

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-2-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) (ignored: LC_ALL set 
to en_US)

Versions of packages gnucash depends on:
ii  bonobo                   1.0.22-2.2      The GNOME Bonobo System.
ii  gdk-imlib1               1.9.14-16.2     imaging library for use with gtk 
(
ii  gnucash-common           1.8.9-4         A personal finance tracking 
progra
ii  guile-1.6-libs           1.6.7-1         Main Guile libraries
ii  guile-1.6-slib           1.6.7-1         Guile SLIB support
ii  libart2                  1.4.2-19        The GNOME canvas widget - runtime 
ii  libaudiofile0            0.2.6-5         Open-source version of SGI's 
audio
ii  libbonobo2               1.0.22-2.2      The GNOME Bonobo library.
ii  libc6                    2.3.2.ds1-20    GNU C Library: Shared libraries 
an
ii  libdate-manip-perl       5.42a-2         a perl library for manipulating 
da
ii  libdb3                   3.2.9-20        Berkeley v3 Database Libraries 
[ru
ii  libesd0                  0.2.35-2        Enlightened Sound Daemon - Shared 
ii  libfinance-quote-perl    1.08-1          Perl module for retrieving stock 
q
ii  libfreetype6             2.1.7-2.3       FreeType 2 font engine, shared 
lib
ii  libgal23                 0.24-1.4        G App Libs (run time library)
ii  libgdk-pixbuf-gnome2     0.22.0-7        The GNOME1 Canvas pixbuf library
ii  libgdk-pixbuf2           0.22.0-7        The GdkPixBuf image library, gtk+ 
ii  libghttp1                1.0.9-15        original GNOME HTTP client 
library
ii  libglade-gnome0          1:0.17-3        Library to load .glade files at 
ru
ii  libglade0                1:0.17-3        Library to load .glade files at 
ru
ii  libglib1.2               1.2.10-9        The GLib library of C routines
ii  libgnome32               1.4.2-19        The GNOME libraries
ii  libgnomeprint15          0.37-5          The GNOME Print architecture - 
run
ii  libgnomesupport0         1.4.2-19        The GNOME libraries (Support 
libra
ii  libgnomeui32             1.4.2-19        The GNOME libraries (User 
Interfac
ii  libgtk1.2                1.2.10-17       The GIMP Toolkit set of widgets 
fo
ii  libgtkhtml20             1.0.4-6.2       HTML rendering/editing library - 
r
ii  libguile-ltdl-1          1.6.7-1         Guile's patched version of 
libtool
ii  libguppi16               0.40.3-11       GNOME graph and plot component
ii  libgwrapguile1           1.3.4-12        g-wrap: Tool for exporting C 
libra
ii  libice6                  4.3.0.dfsg.1-10 Inter-Client Exchange library
ii  libltdl3                 1.5.6-3         A system independent dlopen 
wrappe
ii  liboaf0                  0.6.10-3        The GNOME Object Activation 
Framew
ii  libofx0c102              1:0.6.6-3       library to support Open Financial 
ii  liborbit0                0.5.17-9        Libraries for ORBit - a CORBA ORB
ii  libpopt0                 1.7-5           lib for parsing cmdline 
parameters
ii  libqthreads-12           1.6.7-1         QuickThreads library for Guile
ii  libsm6                   4.3.0.dfsg.1-10 X Window System Session 
Management
ii  libstdc++5               1:3.3.5-6       The GNU Standard C++ Library v3
ii  libx11-6                 4.3.0.dfsg.1-10 X Window System protocol client 
li
ii  libxext6                 4.3.0.dfsg.1-10 X Window System miscellaneous 
exte
ii  libxi6                   4.3.0.dfsg.1-10 X Window System Input extension 
li
ii  libxml1                  1:1.8.17-10     GNOME XML library
ii  libzvt2                  1.4.2-19        The GNOME zvt (zterm) widget
ii  oaf                      0.6.10-3        The GNOME Object Activation 
Framew
ii  slib                     3a1-4.2         Portable Scheme library
ii  xlibs                    4.3.0.dfsg.1-10 X Keyboard Extension (XKB) 
configu
ii  zlib1g                   1:1.2.2-4       compression library - runtime

-- no debconf information

-- 
/----------------- Daniel Burrows <[EMAIL PROTECTED]> -----------------\
|              I used to be indecisive, but now I'm not sure.               |
\--------------------- A duck! -- http://www.python.org --------------------/

Attachment: pgpGeIJOwRefK.pgp
Description: PGP signature

Reply via email to