[GNC] (no subject)

davidcousens49 at gmail.com davidcousens49 at gmail.com
Tue Feb 22 17:28:02 EST 2022


On Tue, 2022-02-22 at 10:49 -0700, Mario Nigrovic wrote:
> Many years ago, I had used gnucash, and was pretty happy with it. I was
> very careful to make regular backups of my data, and so, when my disk
> inevitably crashed, I was not too worried. However, I was mortified to
> discover that, although all my transaction data had been saved, all my
> custom reports were lost, as they had been stored separately in a secret
> undisclosed location, I later discovered to be elsewhere in my home
> directory.
Mario, 

The locations are neither secret or undisclosed 
https://wiki.gnucash.org/wiki/Configuration_Locations although they may not have
been documented when you last used GnuCash.  

User preference settings however are stored in a different manner on the various
OSs that GNucash runs on. 
https://www.gnucash.org/docs/v4/C/gnucash-guide/basics-migrate-settings.html#:~:text=GnuCash%20preferences%20are%20stored%20in,machine%20to%20migrate%20your%20preferences.&text=On%20Unix%20and%20macOS%20%2C%20these,display%20in%20the%20file%20manager
.

The location of the data file is a matter of your own choice. Would suggest a
directory/folder for each separate data file/set of books you operate keeping
the backups and log files in the same directory. I have a directory which is the
parent of the separate directories for each set of books which simplifies
backups to NAS and cloud and synchronizing desktop and laptop without having to
specify the individual sub directories.

A full backup would also need to backup the above locations as well as the data
file. Easily done with bash scripts run by cron jobs in Linux.
> 
> Recently, I have decided to try again to use gnucash, but I would like very
> much to ensure ALL my data is backed up. So I hit upon the idea of running
> the tool under a custom value of $HOME, but I was then shocked to discover
> that even with this method, gnucash was able to remember previous locations
> of my database file, which suggests that the tool is also using some kind
> of other mechanism to save historical data, and that makes me very nervous
> about actually being able to do proper backups of everything related to the
> tool.
GnuCash remembers the last location of the last data file opened. This is
intentional behaviour primarily for the convenience of the majority of users. It
is stored as a path to the last file opened and no financial data is stored
anywhere else but in the data file.  You can always use the menu File->Open
dialogue to override and change between different sets of books if you deal with
multiple financial entities.  If you backup the datafile and its local backups
and log files, you can restore to any point in the date range covered. I also
backup to an onsite NAS and off site cloud storage periodically as well as
synchronizing between several computers. This is fairly easy to setup either
with utilities like Unison or with cron jobs running Bash scripts in Linux and
likely with similar utilities on Windows and MacOSX.

> Doing some sleuthing using strace, I was able to find the previous database
> location delivered through some socket connection, and that really scares
> me, since it is now possible critical data is stored via some other Linux
> service and I will have no way to trace out where this may be to avoid
> future nasty surprises.
> I have not seen any documentation about backup strategies other than the
> aromatic saving of previous data files, yet I do see that there was data
> being stored at least in ~/.local, so I'm hoping someone on this list may
> be able to point me to some more thorough discussion of ALL the places user
> data from gnucash may be stored.
See the above links.

David Cousens
> Thanks for your help!
> 
> -- Mario
> 
> -- Mario
> _______________________________________________
> 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.



More information about the gnucash-user mailing list