[GNC] Post crash recovery log file suggestion

john jralls at ceridwen.us
Sat Jan 15 17:21:42 EST 2022


> On Jan 15, 2022, at 11:10 AM, David G. Pickett via gnucash-user <gnucash-user at gnucash.org> wrote:
> 
> As 4.9 does abort ungracefully from time to time, I grow weary of reentering my unsaved transactions.  I suggest that you post them to a new sort of log file as I go, so I do not have to save megabytes of almost duplicate files so often to avoid this.  Of course, if I leave the cursor on a modified line, I still might lose that line, unless you can log that along with its state when I change tabs.   (Maybe I should be warned when I change tabs that I left an uncommitted transaction, not later when I save?)  When the app starts, it can check the file and replay.  When there is a save and the normal files are closed or flushed to disk, the new log file can be truncated.  It'd be very much like an RDBMS log.  And perhaps a way to allow us to save less often?

We do, that's what the *.log files in the same directory as your data file are. Note, though, that they log only transactions and their splits. Nothing else, especially not the business stuff, is logged.


To re-enter them use File>Import>Replay GnuCash Log File.

You could enable auto-save in preferences, but when that runs it blocks the UI so it can be a bit tedious if you have a large file. You might also consider the SQLite3 backend that writes the database immediately when you complete a transaction, at the expense of not making a backup file and not being able to quit without saving if you decide you've made a mess of a session.

Regards,
John Ralls



More information about the gnucash-user mailing list