[GNC] Post crash recovery log file suggestion

Geoff cleanoutmyshed at gmail.com
Mon Jan 17 18:31:58 EST 2022


Hi David

First, if you are using the default data store format of XML, every time 
you open GnuCash it creates a copy of your complete BLAH.gnucash file 
with a timestamp appended to the filename, plus one or more much smaller 
transaction log files.  You can specify the retention period for these 
files under Edit / Preferences / General, and GnuCash will automatically 
clean them up for you.  Depending on your backup frequency and number of 
cycles, a shorter retention period may improve your backup times without 
reducing your risk exposure.  See the first two attached screenshots.

Second, GunCash supports three different RDBMS (Relational DataBase 
Management Systems) - MySQL, Postgres, and SQLite.  The first two are 
"client/server" systems and require you to install, configure, and 
manage the backend RDBMS independently of GnuCash itself - not an easy 
job for the inexperienced.  SQLite, by contrast, is a "client only" 
RDBMS that requires no additional maintenance than the XML data store, 
and resides in a single data file in the location that you specify.  You 
can open it on any computer that has GnuCash installed, copy it, back it 
up, and restore it just like any other data file.  To enable this, 
simply do a File / Save As / Data Format = sqlite3.  See the third 
attached screenshot.

SQLite is the most widely used RDBMS in the world, read more about it here:
   https://www.sqlite.org/mostdeployed.html
   https://www.sqlite.org/about.html

Finally, remember John's advice:
 >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.

Hope this helps.

Regards

Geoff
=====

On 18/01/2022 2:06 am, David G. Pickett via gnucash-user wrote:
> John,
> 
> So, less code.  It seems odd that they wrote the code for the replay but do not automatically do it, making it a hidden feature.  Hopefully it is truncated or a new log started with every save, so duplicates are not a problem.
> 
> My saves are not slow, but the huge number of huge files slows my backup to my cloud.  GNUCash files are probably the second largest part of my storage after pictures!  We discussed since-save and incremental-save previously.
> 
> I think my original GNUCash used an RDBMS, and that was fine.  I am not sure how to turn that on, or what additional files I would need to back up!  Currently, I can open my backup GNUCash files on my second PC, but I am not sure with RDBMS that I could still do that.
> Best,
> David
> 
> 
> -----Original Message-----
> From: john <jralls at ceridwen.us>
> To: David G. Pickett <dgpickett at aol.com>
> Cc: gnucash-user at gnucash.org <gnucash-user at gnucash.org>
> Sent: Sat, Jan 15, 2022 5:21 pm
> Subject: Re: [GNC] Post crash recovery log file suggestion
> 
> 
>> 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
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnc_preferences.jpg
Type: image/jpeg
Size: 59872 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20220118/b343e662/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnc_XML_data_files.jpg
Type: image/jpeg
Size: 77892 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20220118/b343e662/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnc_convert_XML_to_SQLite.jpg
Type: image/jpeg
Size: 146571 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20220118/b343e662/attachment-0005.jpg>


More information about the gnucash-user mailing list