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

Re: database copy tool



As a note, if you do this, you will not be able to assign groups to the new instance unless you assign them to the old instance.  This limitation is removed in branches/1.4 and will be fixed in 1.4.1.  If you need to fix in the meantime you can run this on the copy of the db via psql:

select setting__set('role_prefix', 'lsmb_[old_dbname]__');

Note if you already have a role prefix (not usually the case), this step is unnecessary and in fact should not be done.  You can test that by:

select * from defaults where setting_key = 'role_prefix';

On Tue, Sep 16, 2014 at 1:26 PM, Erik Huelsmann <..hidden..> wrote:
Hi Louis,

On Tue, Sep 16, 2014 at 7:26 PM, Louis <..hidden..> wrote:

Is there a tool for copying a production lsmb db into a fresh development
db.


Yes, with setup.pl you can copy your production database to a new database which you can use to test/develop your business. One remark applies: roles are shared between prodution and development system.


 
Or does:
pg_dump --format=tar proddb > ./proddb.pg
pg_restore --clean --create --format=tar --dbname=testdb ./proddb.pg

do the trick

even faster: createdb -T proddb testdb

:-)


--
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users




--
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor lock-in.
http://www.efficito.com/learn_more
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users