pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Quickest command to dump and restore the database? : pg_dump and pg_restore?  using PostgreSQL 8.3 running on RedHat 5.3
3+ messages / 3 participants
[nested] [flat]

* Quickest command to dump and restore the database? : pg_dump and pg_restore?  using PostgreSQL 8.3 running on RedHat 5.3
@ 2010-05-25 08:15 Khangelani Gama <Khangelani.Gama@ucs-software.co.za>
  2010-05-25 12:44 ` Re: Quickest command to dump and restore the database? : pg_dump and pg_restore? using PostgreSQL 8.3 running on RedHat 5.3 Ian Lea <ian.lea@gmail.com>
  2010-05-25 22:45 ` Re: Quickest command to dump and restore the database? : pg_dump and pg_restore?  using PostgreSQL 8.3 running on RedHat 5.3 Samuel Stearns <SStearns@internode.com.au>
  0 siblings, 2 replies; 3+ messages in thread

From: Khangelani Gama @ 2010-05-25 08:15 UTC (permalink / raw)
  To: pgsql-admin

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 are 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=${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 addressee only, and may contain the confidential information of UCS Group and/or its subsidiaries. Any review, 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 their e-mail facilities or e-mails sent other than strictly for business purposes.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Quickest command to dump and restore the database? : pg_dump and pg_restore? using PostgreSQL 8.3 running on RedHat 5.3
  2010-05-25 08:15 Quickest command to dump and restore the database? : pg_dump and pg_restore?  using PostgreSQL 8.3 running on RedHat 5.3 Khangelani Gama <Khangelani.Gama@ucs-software.co.za>
@ 2010-05-25 12:44 ` Ian Lea <ian.lea@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Ian Lea @ 2010-05-25 12:44 UTC (permalink / raw)
  To: Khangelani Gama <Khangelani.Gama@ucs-software.co.za>; +Cc: pgsql-admin

pg_dump and restore are typically fast.  Have you tried other -F
values? c does compression which, in your case, on your servers, might
be slow.  You could also try running the dump on the server that is
hosting the source database, copying the file across and loading it on
the target server.  Or some variation on that theme.  Maybe that would
at least tell you which bit was slow.


--
Ian.



On Tue, May 25, 2010 at 9:15 AM, Khangelani Gama
<Khangelani.Gama@ucs-software.co.za> wrote:
> 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
> are 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=${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
> addressee only, and may contain the confidential information of UCS Group
> and/or its subsidiaries. Any review, 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 their e-mail facilities or e-mails sent
> other than strictly for business purposes.
>



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Quickest command to dump and restore the database? : pg_dump and pg_restore?  using PostgreSQL 8.3 running on RedHat 5.3
  2010-05-25 08:15 Quickest command to dump and restore the database? : pg_dump and pg_restore?  using PostgreSQL 8.3 running on RedHat 5.3 Khangelani Gama <Khangelani.Gama@ucs-software.co.za>
@ 2010-05-25 22:45 ` Samuel Stearns <SStearns@internode.com.au>
  1 sibling, 0 replies; 3+ messages in thread

From: Samuel Stearns @ 2010-05-25 22:45 UTC (permalink / raw)
  To: Khangelani Gama <Khangelani.Gama@ucs-software.co.za>; pgsql-admin

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_dump 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 are 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=${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 addressee only, and may contain the confidential information of UCS Group and/or its subsidiaries. Any review, 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 their e-mail facilities or e-mails sent other than strictly for business purposes.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2010-05-25 22:45 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-05-25 08:15 Quickest command to dump and restore the database? : pg_dump and pg_restore?  using PostgreSQL 8.3 running on RedHat 5.3 Khangelani Gama <Khangelani.Gama@ucs-software.co.za>
2010-05-25 12:44 ` Re: Quickest command to dump and restore the database? : pg_dump and pg_restore? using PostgreSQL 8.3 running on RedHat 5.3 Ian Lea <ian.lea@gmail.com>
2010-05-25 22:45 ` Samuel Stearns <SStearns@internode.com.au>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox