[GNC] Problems upgrading to 4.8a
Geert Janssens
geert.gnucash at kobaltwit.be
Wed Sep 7 03:45:25 EDT 2022
Phill,
The values you set for GNC_DATA_HOME and GNC_CONFIG_HOME are the defaults when
these variables are not set. So there's no need to explicitly set them, only if you want to
override the default values.
It's normal that there's nothing in GNC_CONFIG_HOME. GnuCash will never write files in that
directory itself, but it will look for user generated config files in there (log.conf or config-
user.scm currently).
Next, I'm not sure we are talking about the same thing really when we refer to "data files". To
avoid further confusion I'll define a few things first:
"Data files" are the ones containing your actual accounting data. These files normally have
file extension ".gnucash". If you have these files from the 1.x period they may also have no
extension at all or the ".xacc" extension.
"Backup files" are autogenerated by gnucash and - as the name suggests - contain backups
of your accounting data. They are generated in the same directory as your "Data file" and
have as file name
<Data file name>.<timestamp>.gnucash
"Log files" in this context are also auto generated by gnucash and contain a transaction log.
That is it logs all changes made to transactions in chronological order between file saves.
They can be used to replay such changes on top of a backup file to restore lost data. They are
also generated in the same directory as the "Data files" and have as file name
<Data file name>.<timestamp>.log
"Metadata files" or "state files" contain non-accounting data. That is it will record per "Data
file" which windows and tabs you had open last time you were working with that "Data file",
it will also remember window positions and sizes, the options for reports that were still open
and so on. There is exactly one "Metadata file" per "Data file" and these will be stored in
GNC_DATA_HOME/books. The name of such a file will be
<Data file><optional-sequence-number>.gcm
"Saved reports" is a bit of an outlier. It is a single file that contains all "Saved report
configurations" you have created in gnucash. For historical reasons this file is shared by all
your "Data files". It is found in GNC_DATA_HOME and is called saved-reports-<version>
With those defined, let's turn back to the migration. I'm surprised your DOT_GNUCASH_DIR
is empty. GnuCash will only *copy* files during migration, not move. So even in the case of a
successful migration, the original files should have still been in DOT_GNUCASH_DIR. I'd
expect at least a populated books directory and a saved-reports file, unless you never
created custom report configurations.
I also quickly checked and found the migration code is slightly dumb in that it will copy *all*
files in DOT_GNUCASH_DIR. That will include your data files, backup files and log files if you
effectively had stored them. But that leads to a very tricky situation unfortunately: without
explicit action, gnucash would continue automatically open your data file from the
DOT_GNUCASH_DIR directory while you might believe that after migration the files should be
loaded from GNC_DATA_HOME. I think you have more or less solved this by moving the data
file (and log and backup files) to $HOME/Documents/gnucash. But I just wanted to point this
out to be sure you're not inadvertently get caught by this confusion.
As for the .gcm file sizes: these files hold the state of your windows, tabs open reports and so
on. I presume you had many more open last time you ran gnucash with the old .gcm files in
place. Rerunning gnucash without a .gcm file is like a reset of your state information. It will
only open single account hierarchy page and unless you reopened all tabs and reports
before closing like you had before that would explain why the old one is much bigger.
A few final remarks:
* You never mentioned this, but normally gnucash would pop up a message when it has
attempted this migration. Did you actually get this message ?
* You mentioned you were migrating from gnucash 1.x. Was that really the previous version
of gnucash you ran on your system, or just that the data file you now opened was last
opened with gnucash 1.x ? Somewhere in the 2.x series we switched backends for these
preferences (from the old GConf to the newer DConf). Migration between these two
backends has been done somewhere between 2.x and 3.x, but that migration code is no
longer present in gnucash 4.x. So if you really never ran gnucash 2.x and 3.x, this means all
your preferences have been reset to default. In that case you probably want to go through
your preferences again in "Edit->Preferences" to check if they are still as you want them to
be.
More information about the gnucash-user
mailing list