Reducing File Size

Doug Pastorello spiderdad10 at comcast.net
Mon Jan 3 20:21:53 EST 2011


Mike,
You can rename the attachment.bin file to gcCull.pl. I have no
experience in doing this on a Windows system, but I'll try giving some
insight based on my Lunix work. In Linux, the GnuCash database is an XML
file, which is compressed. My script works on the XML file directly, so
the database needs to be uncompressed before using the script. I expect
there is a Windows tool that can be used to uncompress the DB. Maybe
there is another Windows user in the community here that can describe
how to access the GnuCash XML database.
There are also Windows versions of Perl. Once installed, you should be
able to do something like "perl gcCull.pl my_db.xml 2009". This should
create a new XML file, less the old transactions. You should be able to
compress this new XML (optional?) and open it in GnuCash.
This script does not "zero out" any accounts. It just removes old
transactions. You will need to restore the opening balances for your
accounts. That is why I recommended that you do an account summary
report on the original DB. This data can be used to correct the balances
in the new DB. The stock and mutual fund account transactions (splits)
are not deleted. However, the 'bank' portions of the transactions are
deleted. That is why I recommend running a "Check&Repair" on the new DB.
I hope this helps. Let me know if you have other questions.
--Doug.

On Sun, 2011-01-02 at 16:53 -0600, Mike C. wrote:
> Thanks for your response to my issue but I am afraid I don't understand
> how to use it.  I don't speak Linux.  I downloaded your attachment that
> is called attachment.bin, not gcCull.pl.  Now I don't know what to do
> with it to install in in Perl and then how do I run it?  I am not
> familiar with gunzip as it is a Linux zip program.  I have a Windows zip
> function but I am not sure why the data file needs to be zipped.
> Does your script zero all the income and expense accounts and put the
> new in equity and leave the stock and mutual fund asset accounts without
> change?  It would be great if that is the case.  Then I could delete the
> unneeded stock asset accounts.
> Hope you can help this Linus illiterate **Windows user.
> Mike
> 
> On 1/2/2011 10:43 AM, Doug Pastorello wrote:
> > Mike,
> > I have a script that I use to remove old transactions/splits from the
> > Gnucash file. This will reduce the size of your database. See the
> > following thread;
> > http://lists.gnucash.org/pipermail/gnucash-user/2010-April/034407.html
> >
> > 	--Doug.
> >
> > On Sun, 2011-01-02 at 10:29 -0600, Mike C. wrote:
> >> I have the same problem that several others have mentioned.  Since I
> >> converted over 15 years of Quicken data the Gnucash file is now 1845 KB
> >> after compression and takes a long time to load or to generate reports. 
> >> I would like to eliminate old data that is no longer needed without
> >> affecting the current account totals. 
> >> It seems like I can delete asset accounts that have a zero balance
> >> without causing a problem.  I have lots of accounts that are stock or
> >> bond purchases that have long since been sold.  Is there a problem with
> >> this action to reduce the data file size?
> >> The other accounts I would like to delete are the income accounts
> >> (dividend/interest/capital gains) associated with these stocks and
> >> bonds.  I know I can delete the accounts and move them to Total Income
> >> but that doesn't reduce the data.  Also doing a close books doesn't
> >> reduce the data detail.  I would like to eliminate the detail without
> >> affecting the total assets on the balance sheet.  Does anyone know of a
> >> way of accomplishing this?
> >> Thanks,
> >> Mike
> >> _______________________________________________
> >> gnucash-user mailing list
> >> gnucash-user at gnucash.org
> >> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> >> -----
> >> 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