[GNC] Problems upgrading to 4.8a
Phil Wolff
adiabat at centurylink.net
Wed Sep 7 12:50:16 EDT 2022
Geert ~
On 9/7/22 00:45, Geert Janssens wrote:
Phill,
<snip>
"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.
This .gnucash file is what I refer to as "data file."
"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
Don't see any of these
"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
Lots of these, dating back to when I migrated from Quicken to GNC
"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
Just one, contents as you describe
"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>
3 files; -2.8, -2.8~ and -2.8-backup suffixes. If the 2.8 is the GNC
version, that means that my recollection of seeing "1.something" in
Synaptic is faulty.
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've never seen anything other than my .gnucash and .log files here,
and it's now empty because I moved (mv, not cp) them to
~/Documents/gnucash yesterday.
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.
That's exactly what I saw yesterday by comparing the old and new .gcm
files.
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 ?
No. If the migration occurred during the Ubuntu 20.04 -> 22.04 upgrade,
I would not have seen it go by in the torrent generated by the
upgrader. If it showed such a message the first time I ran gnucash
after the upgrade, I missed seeing it.
* 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.
That is what I found late yesterday. I had reported that my Scheduled
Transactions were not being posted, and John Ralls pointed me to the ST
section in Preferences. Sure enough, none of the boxes were checked,
and manually running Actions/Scheduled Transactions/Since Last Run
entered all of the delinquents. However when I called up dconf-editor,
I found a folder /org/gnucash with 7 subfolders, one of which is
GnuCash. Oddly, GnuCash contains 6 subfolders named the same as ones in
its parent, and both sets of folders contain folders
/dialogs/scheduled-trans/since-last-run with binary keys
show-file-at-open and show-notify-window-at-file-open that are enabled.
It appears that GConf did get migrated to DConf but gnucash isn't
reading dconf. Just to confirm:
dellbert at dellbert:~/Documents/gnucash$ gnucash --version
GnuCash 4.8
Build ID: 4.8a+(2021-09-28)
~ Phil
Regards,
Geert
Op dinsdag 6 september 2022 17:54:52 CEST schreef Phil Wolff:
> Geert ~
>
> I discovered that the environment variables GNC_DATA_HOME and
> GNC_CONFIG_HOME were not defined. They are now defined as
> $HOME/.local/share/gnucash and $HOME/.config/gnucash respectively
as
> indicated at
[1]https://wiki.gnucash.org/wiki/Configuration_Diagrams_-_Linux.
> Both directories were already present; $HOME/.local/share/gnucash
was
> populated, $HOME/.config/gnucash was empty.
>
> I moved my data and log files from DOT_GNUCASH_DIR to
> $HOME/Documents/gnucash. DOT_GNUCASH_DIR is now empty, so
apparently the
> update did in fact migrate the other files to
$HOME/.local/share/gnucash in
> spite of the missing GNC_DATA_HOME definition.
>
> As you suggested, I moved GNC_DATA_HOME "out of the way" by
renaming
> $HOME/.local/share/gnucash, and then ran gnucash. As expected, a
new
> $HOME/.local/share/gnucash was created and populated. The only
difference I
> see is in the size of the .gcm file in the books subdirectory --
the
> original file is much larger than the new one, clearly due to the
months of
> activity represented by the older file.
>
> A critical problem remains: scheduled transactions are not being
entered as
> they come due. The Scheduled Transaction Editor page contains all
of the
> expected entries, and none of the "Next Occur" dates are older
than the day
> that the version update took place. And it's not just a problem
with
> entries that were there prior to the update; yesterday I created a
new
> entry scheduled for today, and the transaction did not get
created.
>
> What else can I look at to diagnose this problem?
>
>
> ~ Phil
>
> On 9/6/22 05:20, Geert Janssens wrote:
References
1. https://wiki.gnucash.org/wiki/Configuration_Diagrams_-_Linux
More information about the gnucash-user
mailing list