pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Nguyen, Dan <danguyen@lsil.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: newbie psql - Backup/Restore - database
Date: Wed, 23 Oct 2002 06:11:42 -0700 (PDT)
Message-ID: <20021023061053.X3876-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <EB1DF7EA0D32D611B79C0002A51363F17004F2@exw-ks.ks.lsil.com>

On Mon, 21 Oct 2002, Nguyen, Dan wrote:

> Hello all,
>
> I just convert a MSQL database to PSQL and wondering if someone can help me
> to duplicate or restore a database in a short period.  Here is what I have
> done.
>
> Backup <users> database:
>    pg_dump -C -D -n -f backupDB.psql users
>
> Duplicate <users> database:
>    1. createdb test
>    2. edit the backupDB.psql file and remove the first block regarding users
> DATABASE
>    3. psql -a -e -f backupDB.psql test
>
>
> Doing this way will take about a hour to duplicate a database with about
> 50,000 records.  Is there any other ways that you can help me to speed up
> the process?

Not using -D to pg_dump will probably help since that'll use copy rather
than insert.





view thread (3+ messages)  latest in thread

Message-ID: <20021023061053.X3876-100000@megazone23.bigpanda.com>
Permalink:  ../20021023061053.X3876-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20021023061053.X3876-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, danguyen@lsil.com
  Subject: Re: newbie psql - Backup/Restore - database
  In-Reply-To: <20021023061053.X3876-100000@megazone23.bigpanda.com>
  References: <EB1DF7EA0D32D611B79C0002A51363F17004F2@exw-ks.ks.lsil.com> <20021023061053.X3876-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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