Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 6D5DF633CF9 for ; Tue, 25 May 2010 19:45:22 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 84321-07 for ; Tue, 25 May 2010 22:45:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from imail.internode.com.au (exchht01-ext.internode.com.au [203.26.95.185]) by mail.postgresql.org (Postfix) with ESMTP id 66A9C632DEC for ; Tue, 25 May 2010 19:45:10 -0300 (ADT) Received: from EXCHMAIL.staff.internode.com.au ([169.254.1.229]) by exchht01.staff.internode.com.au ([fe80::193f:3ff6:d38f:74dc%12]) with mapi; Wed, 26 May 2010 08:15:06 +0930 From: Samuel Stearns To: Khangelani Gama , "pgsql-admin@postgresql.org" Date: Wed, 26 May 2010 08:15:05 +0930 Subject: Re: Quickest command to dump and restore the database? : pg_dump and pg_restore? using PostgreSQL 8.3 running on RedHat 5.3 Thread-Topic: Quickest command to dump and restore the database? : pg_dump and pg_restore? using PostgreSQL 8.3 running on RedHat 5.3 Thread-Index: Acr74mayoct/JdhmTkKEQrz08QKphAAePGQg Message-ID: <68B59BEDCD36854AADBDF17E91B2937A01A57CCDF4@EXCHMAIL.staff.internode.com.au> References: In-Reply-To: Accept-Language: en-US, en-AU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-AU Content-Type: multipart/alternative; boundary="_000_68B59BEDCD36854AADBDF17E91B2937A01A57CCDF4EXCHMAILstaff_" MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.01 tagged_above=-10 required=5 tests=BAYES_40=-0.001, HTML_MESSAGE=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/245 X-Sequence-Number: 34718 --_000_68B59BEDCD36854AADBDF17E91B2937A01A57CCDF4EXCHMAILstaff_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Try this: pg_dump -a source_db | psql target_db Sam ________________________________ From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql= .org] On Behalf Of Khangelani Gama Sent: Tuesday, 25 May 2010 5:45 PM To: pgsql-admin@postgresql.org Subject: [ADMIN] Quickest command to dump and restore the database? : pg_du= mp and pg_restore? using PostgreSQL 8.3 running on RedHat 5.3 Hi all I would like to know the quickest way of dumping and restoring the database= in version 8.3 of PostgreSQL database running in RedHat 5.3. We are currently using the command below, which seems to be very slow. We a= re moving from individual database to centralized database pg_dump -U enterprisedb -Fc -t ${i} --data-only --ignore-version ${STORE_DB= _HOST} -p ${DB_PORT} ${STORE_DB} | ${PG_BIN}/pg_restore -U enterprisedb -p = ${DB_PORT} -t ${i} --data-only --dbname=3D${CDBS_DB} Please assist...Thanks in advance Thanks Confidentiality Notice:http://ucs.co.za/conf.html ________________________________ The contents of and attachments to this e-mail are intended for the address= ee only, and may contain the confidential information of UCS Group and/or i= ts subsidiaries. Any review, use or dissemination thereof by anyone other t= han the intended addressee is prohibited. If you are not the intended addre= ssee please notify the writer immediately and destroy the e-mail. UCS Group= Limited and its subsidiaries distance themselves from and accept no liabil= ity for unauthorised use of their e-mail facilities or e-mails sent other t= han strictly for business purposes. --_000_68B59BEDCD36854AADBDF17E91B2937A01A57CCDF4EXCHMAILstaff_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Try this:

 

pg_dump –a source_db | psql targ= et_db

 

Sam

 

 


From:= pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] = On Behalf Of Khangelani Gama
Sent: Tuesday, 25 May 2010 5= :45 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Quickest co= mmand to dump and restore the database? : pg_dump and pg_restore? using PostgreSQ= L 8.3 running on RedHat 5.3
=

 

Hi all

 

 

I would like to know the quickest way of dumping and restoring the database in version 8.3 of PostgreSQL database running in RedHat 5.3.<= /o:p>

 

We are currently using the command below, which seems to be very sl= ow. We are moving from individual database to centralized database <= /span>

 

 =

pg_dump -U enterprised= b -Fc -t ${i} --data-only --ignore-version ${STORE_DB_HOST} -p ${DB_PORT} ${STORE= _DB} | ${PG_BIN}/pg_restore -U enterprisedb -p ${DB_PORT} -t ${i} --data-only --dbname=3D${CDBS_DB}

 =

 =

 =

Please assist…Th= anks in advance

 =

 =

 =

 =

 =

Thanks=

 =

 =

 =

 =

 =

 =

 

 

Confidentiality Notice:http:= //ucs.co.za/conf.html

 

 

 <= /span>


The contents of and attachments to this e-mail are intended for the addressee only, and may con= tain the confidential information of UCS Group and/or its subsidiaries. Any revi= ew, use or dissemination thereof by anyone other than the intended addressee is prohibited. If you are not the intended addressee please notify the writer immediately and destroy the e-mail. UCS Group Limited and its subsidiaries distance themselves from and accept no liability for unauthorised use of th= eir e-mail facilities or e-mails sent other than strictly for business purposes= .

--_000_68B59BEDCD36854AADBDF17E91B2937A01A57CCDF4EXCHMAILstaff_--