Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 973734761FF for ; Fri, 2 Aug 2002 13:36:05 -0400 (EDT) Received: from localhost.localdomain (unknown [208.255.226.178]) by postgresql.org (Postfix) with ESMTP id 6F8E44761B0 for ; Fri, 2 Aug 2002 13:36:04 -0400 (EDT) Received: from localhost (localhost [[UNIX: localhost]]) by localhost.localdomain (8.11.6/8.11.6) id g72HGjY02044; Fri, 2 Aug 2002 13:16:45 -0400 Content-Type: text/plain; charset="iso-8859-1" From: Chris Ruprecht Organization: MMRD To: "Areski Belaid" , Subject: Re: Duplicate Database Date: Fri, 2 Aug 2002 13:16:45 -0400 User-Agent: KMail/1.4.1 References: <3CCE936B.245D870C@juliana-multimedia.com> <1022941995.3cf8db2b32686@webmail.acucore.com> In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200208021316.45445.chrup@earthlink.net> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/9 X-Sequence-Number: 1354 On Friday 02 August 2002 12:46 pm, Areski Belaid wrote: > Hello to everyone, > > I have a application using Postgres DB and I going to create a new version > on the same server... I would like duplicate my database with all structu= re > and data > like that, I can update this new version and keep the last one active > during the release version. > > BUT, doesm't work =3D( > > First I create the backup, like that : > pg_dump > db.out > > > After I try to duplicate this one : > > So I create a other user "new-user" and I create a new db "new-db" > (new-user is the owner new-db) > next step : > change 1 ligne on db.out file : > Replace : "\connect - dbname" by "\connect - new-db" > > To finish, I try that : > psql new-db< db.out try psql -f db.out newdb run the whole thing as user postgres, that should work. > > > > Of course, it doesn't work, otherwise I won't disturb you =3D) > > Error message: > 1: You are now connected as new user new-db > 2: ERROR: Relation 'table1' already exists > 3: ERROR: Relation 'table1' already exists > 4: ... > > > > I tried a lot of think without success, Some helpsssssssss pleaseee. > > > > Thanks to the community, Areski > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html