Comparing two Gnucash files
David Carlson
david.carlson.417 at gmail.com
Thu Jul 11 14:54:06 EDT 2013
On Thursday, 7/11/2013 12:46 PM, Maf. King wrote:
> Hi Alois,
>
> Would there be any merit for you to do a save as....uncompressed XML for both
> sqlite databases - maybe your diff tool will give you a clue about the newer
> file?
>
> I can already hear the howls of anguish from the devs about attempting a merge
> of the 2 data files, though! Back up and back up often if you take that path.
> - there is a gnucash-qif utility somewhere on the web and possibly you could
> import newer transactions from one of the files, but not sure about how to
> handle date changes or deletions...
>
> HTH,
> Maf.
>
>
> On Thu 11 July 13 19:38:41 Alois Mahdal wrote:
>> Hi,
>>
>> I need to compare two sqlite-based GC files (holding few months
>> of personal finances) that may or may not be different.
>>
>> However, if they are, either one of them is newer, or (in worse
>> case) they must have a common ancestor, which I guess physically
>> does not exist, unless GC saves history of revisions like e.g.
>> git.
>>
>> Note that the changes on both sides might be as wall additive as
>> substractive, so usual rule as "bigger = newer" is way too risky
>> here. Also there won't be many chages, I'd guess minor (like date)
>> edits to 10-100 items, maybe a split here and there.
>>
>> Now if it was a CSV or any other simple structure, I'd just grab
>> <my favorite diff/merging tool> and resolve the "conflict" using
>> merge if necessary. I realize, though, that GC's data structure
>> must be very complicated, so if I am able to simply dump the
>> sqlite file and give it a try, I could spend hours on it and not
>> be sure, and in case of merging, I could easily end up with unusable
>> file.
>>
>> No backups available :/
>>
>> So is ther a "safe way" to do it? Or should I just bite the bullet,
>> flip a coin and carefully revise the data according to other sources?
>>
>> Thanks,
>> aL.
This is one reason to stay with the compressed XML format. Then there
would be one or more sets of backup log files that could be mined for
information about recent changes. I do not know if GnuCash still
creates those log files when SQlite is used.
David C
More information about the gnucash-user
mailing list