Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 86B7B4758FB for ; Fri, 2 Aug 2002 12:46:24 -0400 (EDT) Received: from hotmail.com (oe76.law4.hotmail.com [216.33.148.172]) by postgresql.org (Postfix) with ESMTP id DEC9B475425 for ; Fri, 2 Aug 2002 12:46:23 -0400 (EDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 2 Aug 2002 09:46:29 -0700 X-Originating-IP: [212.9.66.13] From: "Areski Belaid" To: References: <3CCE936B.245D870C@juliana-multimedia.com> <200204301522.44037.jm.poure@freesurf.fr> <3CCECCD8.A11B8F8C@juliana-multimedia.com> <1022941995.3cf8db2b32686@webmail.acucore.com> Subject: Duplicate Database Date: Fri, 2 Aug 2002 18:46:01 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: X-OriginalArrivalTime: 02 Aug 2002 16:46:29.0585 (UTC) FILETIME=[2660A410:01C23A44] X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/7 X-Sequence-Number: 1352 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 structure and data like that, I can update this new version and keep the last one active during the release version. BUT, doesm't work =( 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 Of course, it doesn't work, otherwise I won't disturb you =) 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