From: | Iñigo Martinez Lasala <imartinez(at)vectorsf(dot)com> |
---|---|
To: | "Net Tree Inc(dot)" <nettreeinc(at)gmail(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: how do I do dump and restore without bugging with constraint? |
Date: | 2010-02-23 11:03:01 |
Message-ID: | 1266922981.24312.217.camel@coyote |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
Using pg_dump from your new host (that is, newer version)
1- Dump schema.
pg_dump -h server_source -U username -s -Fp -f schema.sql database
2- Dump data only.
pg_dump -h server_source -U username -a -Fc -f data.dmp database
3- Modify schema.
4- Restore schema in new host.
psql -U username -d database -h server_destination -f
modified_schema.sql
5- Restore data disabling triggers
pg_restore -h server_destination -U username -d database
--disable-triggers -a data.dmp
-----Original Message-----
From: Net Tree Inc. <nettreeinc(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: [ADMIN] how do I do dump and restore without bugging with
constraint?
Date: Tue, 23 Feb 2010 12:50:27 +0800
Hi all,
I am dumping both schema and data from old database to new one. The new
database schema is somehow contain slightly different schema then the
old one. When I do restore it shown alot errors related with
constraints. How can I dump and to restore from old to new without
dealing with constraint and just forces data dump to where it suppose to
belong?
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2010-02-23 14:31:42 | Re: [GENERAL] Re: how do I do dump and restore without bugging with constraint? |
Previous Message | Magnus Hagander | 2010-02-23 10:56:53 | Re: [GENERAL] pg_dump: aborting because of version mismatch |
From | Date | Subject | |
---|---|---|---|
Next Message | dipti shah | 2010-02-23 11:25:52 | Minor systax error but not able to resolve it... |
Previous Message | Magnus Hagander | 2010-02-23 10:56:53 | Re: [GENERAL] pg_dump: aborting because of version mismatch |