Thread: Re: Copy the database..

Re: Copy the database..

From
Rainer Bauer
Date:
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.

Wouldn't it be possible to copy the database folder and somehow instruct the
postmaster to include the copied data after a restart?

Rainer

Re: Copy the database..

From
Tom Lane
Date:
Rainer Bauer <usenet@munnin.com> 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 lane

Re: Copy the database..

From
Julio Cesar Sánchez González
Date:
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 based on the same
> dataset. However, dump/restore takes too long to be of any use.
>
> Wouldn't it be possible to copy the database folder and somehow instruct the
> postmaster to include the copied data after a restart?
>
> Rainer
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly

Hi for all,

Try with de PITR
(http://www.postgresql.org/docs/8.1/static/backup-online.html), should
be help you...


--
Regards,

Julio Cesar Sánchez González.

--
Ahora me he convertido en la muerte, destructora de mundos.
Soy la Muerte que se lleva todo, la fuente de las cosas que vendran.

www.sistemasyconectividad.com.mx        http://darkavngr.blogspot.com/



Re: Copy the database..

From
Rainer Bauer
Date:
Tom Lane wrote:

>Rainer Bauer <usenet@munnin.com> 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. Works like a charm.

Rainer