Restoring ledger after main ledger file is corrupted

Ken Heard ken at heard.name
Tue May 4 14:47:00 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Earlier today I was entering transactions in gnucash by using the
"duplicate" feature.  Somehow in the process in one case the template
transaction disappeared.

Normally such a disappeared transaction can be replaced, but if one or
both sides of the transaction is a reconciled transaction there is a
problem.  The *reconciliation* window will still include the original
transaction in its totals, but the the *account* will not.  So in order
to make reconciliation work, the replacement transaction will always
have to appear in the transaction window as unreconciled forever after.

While I will report this problem as a bug and suggest how to fix it, in
the meantime I want to find a work-around.  The obvious way is to
reconstitute the most recent back up, which will include the disappeared
transaction, as my main ledger file and then repost the transaction I
had already posted earlier today.  My immediate problem now is which
backup to use.

It seems I have two choices: either use the most recent *.xac file or
restore the main file,named ken09.gnc in my case, from the *.tgz backup
file.  The *.xac files however confuse me.  Here is a list of the
relevant files in my gnucash directory:

3.3M -rwxr-x--- 1 ken A907 3.3M 2010-05-01 17:03 		
ken09.gnc.20100501170856.xac*
3.3M -rwxr-x--- 1 ken A907 3.3M 2010-05-01 17:08 			
ken09.gnc.20100501174438.xac*
3.3M -rwxr-x--- 1 ken A907 3.3M 2010-05-01 17:44
ken09.gnc*
3.3M -rwxr-x--- 1 ken A907 3.3M 2010-05-01 17:44
ken09.gnc.20100502123055.xac*
3.3M -rwxr-x--- 1 ken A907 3.3M 2010-05-02 12:30
ken09.gnc.20100504112945.xac*
3.3M -rwxr-x--- 1 ken A907 3.3M 2010-05-04 11:29
ken09.gnc.20100504113530.xac*
3.3M -rwxr-x--- 1 ken A907 3.3M 2010-05-04 11:35
ken09.gnc.20100504113822.xac*
3.3M -rwxr-x--- 1 ken A907 3.3M 2010-05-04 11:38
ken09.gnc.20100504113943.xac*
3.3M -rwxr-x--- 1 ken A907 3.3M 2010-05-04 11:39
ken09.gnc.20100504114119.xac*
3.3M -rwxr-x--- 1 ken A907 3.3M 2010-05-04 11:41
ken09.gnc.20100504114401.xac*

There are ten such files altogether, the file data being on the first
line and the names on the second.  (Obviously I am using Linux, the
Debian Lenny distribution, and gnu 2.2.6, the default version for Lenny.)

The third file is in the list is ken09.gnc, the version I backed up on
2010-05-01.  This file has the offending transaction, but not of course
all the transactions posted today.  (There is a later version of this
file dated today and renamed by me ken09X.gnc, which does not have that
transaction but does have the transactions I posted today.)

The fourth file is an *.xac file which has the same time stamp assigned
to it by Linux as the one assigned by Linux to file ken09.gnc recovered
from my backup *.tgz file -- 2010-05-01 at 17:44.  However, the time
assigned to the *.xac file by gnucash is different -- 20100502123055.
How could gnucash assign a date a day later than the date assigned by
Linux?  (Yes, I my computer was at all times set to the right date and
time.)

Stranger still, the Linux time stamp of the fifth file in the list is
the same as the time stamp assigned by gnucash to the fourth file but
the former is two days earlier than the latter.  The same phenomenon
occurs with respect to the fifth and sixth files, both on the same day
but different times.

Several questions occur to me, but in this post I shall ask only four.

1. Would guncash create a new *.xac file every time the main *.gnc file
is opened even if the main file is not changed?

2. Why would gnucash assign a time stamp to an *.xac file to a date or a
time in the future, later than the time stamp assigned by Linux, which
is always the current time and date?

3. If I were to use one of the *.xac files to reconstitute the main
file, which one should it be?

4. Finally, I am concerned with the warning note in section 2.8.2 on the
gnucash guide to the effect that "changes" to scheduled transactions may
not be recovered.  I am not sure what this means.  I have about 20
scheduled transactions every month, the amounts of some of which are
changed after they are posted and saved.  Are these changed amounts not
recoverable?  (I don't use gnucash for invoices, also referred to in
that note.)

Ken Heard


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvga6IACgkQlNlJzOkJmTeuLQCePmGs4Pq3xmEXLf0saouyzOT/
hYQAn33nwwpv6I2OdtpN4H18lB2rNnJM
=edSR
-----END PGP SIGNATURE-----


More information about the gnucash-user mailing list