Where does Gnucash save it backup files when using mysql data source

L. D. James ljames at apollo3.com
Sun Jul 5 04:18:10 EDT 2015


On 07/04/2015 11:03 PM, John Ralls wrote:
>> On Jul 4, 2015, at 6:27 PM, L. D. James <ljames at apollo3.com> wrote:
>>
>> On 07/04/2015 08:54 PM, Sean Porterfield wrote:
>>> On 07/04/15 19:59, L. D. James wrote:
>>>
>>>>>      I have found the backups of gnucash to be very invaluable.  In
>>>> However, I find it very convenient that when actually using Gnucash, it
>>>> actually backs up the data.  The data is backed-up when you use it.
>>> I manually run a script to dump the mysql database after I close
>>> Gnucash, compress it, and copy it to a server.  That could probably be
>>> more automated by including the call to gnucash in the script, but
>>> manual backups are fine for me.
>>>
>>> I do see that Gnucash creates files in ~/.gnucash/translog/ presumably
>>> for the transactions that were done in the session.  I didn't see
>>> anything else that resembled a backup.
>> Thanks, Sean.  Having a Gnucash wrapper would be a workaround solution to consider.  I'm not suggesting that Gnucash performs any mysql backup.  I'm just hoping for some type of default backup directory (such as what you looked for) and a feature to perform a backup when exiting, in the same or similar formate that it already uses (xml/compressed).
>>
>> Currently I've been using the "save as" but the problem with that is that it changes to the "save as" file for the actual active file. The current backup feature it issues is to backup using numbers, but keeps the active file by the one the user is actually using.
>>
>> I'm appreciating the feedback.  If anyone sees merit in this, it'll help me with the wording for the feature request.
> The XML backup works because with that backend GnuCash loads a file and then writes out a new file. The old file is renamed to become the backup.
>
> That won’t work on the SQL backends because they immediately write changes back to the DB, which naturally changes to reflect the  update without creating a new file or database. That’s how databases work. MySql and Postgres complicate matters further because they’re server-based and the GnuCash user may lack either the access to the server machine or the database privileges necessary to make backups or both. In consequence we’ve had the policy since we introduced the SQL backend that its users are responsible for arranging backups themselves. We’ll have to review that when we convert to using SQL by default. One option would be that the XML format will be in the export menu rather than a “Save As” option, and since part of the point of the change is to support multiple simultaneous users we’ll need to provide some sort of audit facility as well.
>
> Regards,
> John Ralls
John.  Thanks for explaining how it works.  Adding an export feature 
would be ideal.  The feature request would be even more complete to have 
an option to export on exit with an incremental number associated with 
the configured filename.  This way the users would have a way to 
appreciate the many versions (backups) they have come to appreciate.  
I've only worked with a few accounting problems, I believe all of the 
ones I've seen perform a backup when exiting.  It appears the developers 
have a lot of concern for the novice computer users who neglect to 
backup and are later crying trying to find a way to recover their 
precious data once the active version becomes corrupted... just like a 
number of users in previous different threads have been afraid to 
upgrade for fear of losing their data. I've told them in each case to 
just backup their data, or use one of the default backed up versions.

-- L. James

-- 
L. D. James
ljames at apollo3.com
www.apollo3.com/~ljames


More information about the gnucash-user mailing list