Reducing File Size

Doug Pastorello spiderdad10 at comcast.net
Sun May 15 21:45:23 EDT 2011


Mike,
Glad to hear that you are making progress. It sounds like you are making
goos progress. To address your questions;
1. You should not need to make a new "file" to zero out the imbalance
register. Just add a transaction, for the total amount, between
imbalance and the desired register. I used "retained earnings" because
it was there. I've been told that doing that is not the best accounting
practice. Adding the transaction to a register called "accumulated
earnings" may be more accurate.
2. There are two ways of getting rid of the stock accounts. One is to
modify the Perl script. There is a simple filter in the script that
causes the script to keep stock transactions. It is a pretty simple
modification. The other is to do what you said, and chance the account
type to a bank account. Either should be fine. However, I've never
changed a stock account into a bank account.
--Doug.

On Sat, 2011-05-14 at 14:52 -0500, Mike C. wrote:
> I have finally discovered what I was doing wrong was not entering perl
> correctly in the cmd line.  I have run it well on a dummy small file
> before I tackle my 18M data file.  I just have a couple of questions. 
> The only way I can see to get the "imbalance" to retained earnings after
> setting starting balances for bank accounts is to add an income file
> such as "accumulated earnings" in the year being specified after
> gccull.pl is run and enter an amount that would be the total of retained
> earnings?  This balance will then be reflected as retained earnings on a
> balance sheet.
>  I also have a number of old stock and bond accounts that have zero
> balance that can't be deleted because of multiple transactions.  Is the
> best change them to "bank" accounts before running gccull.pl so all the
> transactions will be deleted or is there a better way?
> Thanks, this script should make a major difference in the time to load
> and save my files.
> Mike
> 
> On 1/3/2011 7:21 PM, Doug Pastorello wrote:
> > 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