pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Areski Belaid <areski5@hotmail.com>
To: pgsql-php@postgresql.org
Subject: Re: Duplicate Database
Date: Fri, 2 Aug 2002 19:33:30 +0200
Message-ID: <OE41JmAkxWnefxGZ2Li0000b02f@hotmail.com> (raw)
References: <3CCE936B.245D870C@juliana-multimedia.com>
	<1022941995.3cf8db2b32686@webmail.acucore.com>
	<OE76IVwEBblN7eNYhaS0000ba07@hotmail.com>
	<200208021316.45445.chrup@earthlink.net>

I just found and it's working good :

createdb --template=db new-db


=), haaaaaaaaaaa Que bien





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
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

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 =)
>
> 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



view thread (3+ messages)

Message-ID: <OE41JmAkxWnefxGZ2Li0000b02f@hotmail.com>
Permalink:  ../OE41JmAkxWnefxGZ2Li0000b02f@hotmail.com/
Also on:    postgresql.org/message-id/OE41JmAkxWnefxGZ2Li0000b02f@hotmail.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-php@postgresql.org
  Cc: areski5@hotmail.com
  Subject: Re: Duplicate Database
  In-Reply-To: <OE41JmAkxWnefxGZ2Li0000b02f@hotmail.com>
  References: <3CCE936B.245D870C@juliana-multimedia.com> <1022941995.3cf8db2b32686@webmail.acucore.com> <OE76IVwEBblN7eNYhaS0000ba07@hotmail.com> <200208021316.45445.chrup@earthlink.net> <OE41JmAkxWnefxGZ2Li0000b02f@hotmail.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