[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clone database with no financial transactions





Chris Travers wrote:
On Mon, Jun 27, 2011 at 11:02 PM, Chris Travers <..hidden..> wrote:
On Mon, Jun 27, 2011 at 10:02 PM, david <..hidden..> wrote:
I want to clone a database but with no financial transactions. I want to
keep customers, vendors, parts, services, accounts, etc. but all
accounts with zero balance.

Is this possible?

Yes.  In psql:

CREATE DATABASE my_newdb WITH TEMPLATE my_old_db;


Note this will clone everything.
If you want to get rid of the transactions, you will need to delete
everything in the acc_trans, ar, ap, and gl tables.


Ahh.. that's the bit I was looking for. Do I do that with psql?