Re: Quickest command to dump and restore the database? : pg_dump and pg_restore? using PostgreSQL 8.3 running on RedHat 5.3

From: Ian Lea <ian(dot)lea(at)gmail(dot)com>
To: Khangelani Gama <Khangelani(dot)Gama(at)ucs-software(dot)co(dot)za>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Quickest command to dump and restore the database? : pg_dump and pg_restore? using PostgreSQL 8.3 running on RedHat 5.3
Date: 2010-05-25 12:44:13
Message-ID: AANLkTimdXbI61peWgcCtIR1yTdHGXCkzlYkxFhh86OHx@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Gama(at)ucs-software(dot)co(dot)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.
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2010-05-25 17:42:33 Re: transaction_timestamp()
Previous Message Ireneusz Pluta 2010-05-25 12:31:50 Re: How can I tell if I'm autovacuuming?