Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 31B164761EE for ; Wed, 23 Oct 2002 09:11:39 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id A95534761D3 for ; Wed, 23 Oct 2002 09:11:38 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 7233DD60A; Wed, 23 Oct 2002 06:11:42 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 67ABD5C02; Wed, 23 Oct 2002 06:11:42 -0700 (PDT) Date: Wed, 23 Oct 2002 06:11:42 -0700 (PDT) From: Stephan Szabo To: "Nguyen, Dan" Cc: Subject: Re: newbie psql - Backup/Restore - database In-Reply-To: Message-ID: <20021023061053.X3876-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/215 X-Sequence-Number: 6073 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 database: > pg_dump -C -D -n -f backupDB.psql users > > Duplicate 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.