Re: [GENERAL] Copy the database..

2007-11-06 Thread Scott Marlowe
On 11/3/07, Abandoned <[EMAIL PROTECTED]> wrote: > > I tryed pg_dump but it is very slowly. Are there any faster way to > copy database? Assuming it's all happening on the same db server, yes: psql template1 create database newdb template olddb ---(end of broadcast)--

Re: [GENERAL] Copy the database..

2007-11-06 Thread Martijn van Oosterhout
On Sat, Nov 03, 2007 at 01:42:09PM -, Abandoned wrote: > I tryed pg_dump but it is very slowly. Are there any faster way to > copy database? Have you tried CREATE DATABASE .. TEMPLATE ? (See amual for syntax) Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org

Re: [GENERAL] Copy the database..

2007-11-06 Thread Abandoned
On Nov 2, 5:30 pm, Sascha Bohnenkamp <[EMAIL PROTECTED]> wrote: > if you dump/undump using a pipe there is no temp file ... > > Abandoned schrieb: > > > > > On Nov 2, 3:49 pm, Sascha Bohnenkamp <[EMAIL PROTECTED]> wrote: > >> maybe pg_dump | pg_undump could work? > > >> I mean pg_dump with the appr

Re: [GENERAL] Copy the database..

2007-11-06 Thread Abandoned
On Nov 2, 3:49 pm, Sascha Bohnenkamp <[EMAIL PROTECTED]> wrote: > maybe pg_dump | pg_undump could work? > > I mean pg_dump with the appropriate parameters and undump directly to > the other database? > > This may one of the fastest ways to do it I think. > > Abandoned schrieb: > > > Hi.. > > I want

[GENERAL] Copy the database..

2007-11-06 Thread Abandoned
Hi.. I want to copy my database.. I have a database which is name db01 and i want to copy it as name db01copy ? How can i do this ? This database is very big 200GB so i want to the fastest way. Also if you suggest pg_dump how can i remove the dump data after copying ? Note: I have a root account wi

Re: [GENERAL] Copy the database..

2007-11-06 Thread Sascha Bohnenkamp
maybe pg_dump | pg_undump could work? I mean pg_dump with the appropriate parameters and undump directly to the other database? This may one of the fastest ways to do it I think. Abandoned schrieb: > Hi.. > I want to copy my database.. > I have a database which is name db01 and i want to copy i

Re: [GENERAL] Copy the database..

2007-11-06 Thread Sascha Bohnenkamp
if you dump/undump using a pipe there is no temp file ... Abandoned schrieb: > On Nov 2, 3:49 pm, Sascha Bohnenkamp <[EMAIL PROTECTED]> wrote: >> maybe pg_dump | pg_undump could work? >> >> I mean pg_dump with the appropriate parameters and undump directly to >> the other database? >> >> This may

Re: [GENERAL] Copy the database..

2007-11-05 Thread Rainer Bauer
Tom Lane wrote: >Rainer Bauer <[EMAIL PROTECTED]> writes: >> Wouldn't it be possible to copy the database folder and somehow instruct the >> postmaster to include the copied data after a restart? > >See CREATE DATABASE's TEMPLATE option. It's a bit crude but I think >it'll help. Thanks, Tom. Wor

Re: [GENERAL] Copy the database..

2007-11-04 Thread Julio Cesar Sánchez González
El dom, 04-11-2007 a las 02:16 +0100, Rainer Bauer escribió: > Abandoned wrote: > > >I tryed pg_dump but it is very slowly. Are there any faster way to > >copy database? > > Actually, I was looking for something along the same line. > > I often want to test some functionality in my program base

Re: [GENERAL] Copy the database..

2007-11-03 Thread Tom Lane
Rainer Bauer <[EMAIL PROTECTED]> writes: > Wouldn't it be possible to copy the database folder and somehow instruct the > postmaster to include the copied data after a restart? See CREATE DATABASE's TEMPLATE option. It's a bit crude but I think it'll help. regards, tom la

Re: [GENERAL] Copy the database..

2007-11-03 Thread Rainer Bauer
Abandoned wrote: >I tryed pg_dump but it is very slowly. Are there any faster way to >copy database? Actually, I was looking for something along the same line. I often want to test some functionality in my program based on the same dataset. However, dump/restore takes too long to be of any use.