Обсуждение: Fresh copy of a PG DB ?

Поиск
Список
Период
Сортировка

Fresh copy of a PG DB ?

От
Pascal Heraud
Дата:
Hello all,

I want to have a fresh copy of my postgres database on another server in
order to provide a simple mechanism of failover.
My current solution is to backup the database every hour and re-create
from scratch on the other side.

Currently the database is small and its not an issue but when the size
will be bigger, it can become an issue as you can guess :)

What are the other solution to provide this service in a incremental
manner ? Is there any "dupplication" tool or mechanism provided to allow
such a repplication ?

We looked at the way of using a replication solution but it seems very
coupled to the version of the database we use. We are using PGSQL 8.2.4
on a Gentoo Linux OS.

Thanks for any clue :)

Pascal


Re: Fresh copy of a PG DB ?

От
Andreas 'ads' Scherbaum
Дата:
Hello,

On Fri, 28 Dec 2007 10:15:05 +0100 Pascal Heraud wrote:

> What are the other solution to provide this service in a incremental
> manner ? Is there any "dupplication" tool or mechanism provided to allow
> such a repplication ?

One solution is "Slony" to replicate tables to another database.
Or you can use PITR do copy every WAL logfile to your second machine
and apply all changes as far as you have logfiles.


> We looked at the way of using a replication solution but it seems very
> coupled to the version of the database we use. We are using PGSQL 8.2.4
> on a Gentoo Linux OS.

Uh? At least a replication with PITR is straightforward, some config
modifications, a script to archive the logfile, one to restore the
logfile and something to transfer the logfile to your other machine.
Basically, that should be all you need.
Not so long ago i created such a setup and the replication itself was
the easy part. It got much worse the time we had to integrate the
replication into RH cluster software.


Kind regards

--
                Andreas 'ads' Scherbaum
German PostgreSQL User Group

Re: Fresh copy of a PG DB ?

От
Cédric Villemain
Дата:
Pascal Heraud a écrit :
> Hello all,
>
> I want to have a fresh copy of my postgres database on another server
> in order to provide a simple mechanism of failover.
> My current solution is to backup the database every hour and re-create
> from scratch on the other side.
>
> Currently the database is small and its not an issue but when the size
> will be bigger, it can become an issue as you can guess :)
>
> What are the other solution to provide this service in a incremental
> manner ? Is there any "dupplication" tool or mechanism provided to
> allow such a repplication ?
Sure ! As ou can read in the doc, here :
http://www.postgresql.org/docs/8.2/static/high-availability.html

>
> We looked at the way of using a replication solution but it seems very
> coupled to the version of the database we use. We are using PGSQL
> 8.2.4 on a Gentoo Linux OS.

You have not the lastest version wich is 8.2.5. You are running a
production site on a Gentoo??? You need to replicate asap, sure !

>
> Thanks for any clue :)
>
> Pascal
>
>
> ---------------------------(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


--
Cédric Villemain
Administrateur de Base de Données
Cel: +33 (0)6 74 15 56 53
http://dalibo.com - http://dalibo.org


Вложения

Re: Fresh copy of a PG DB ?

От
Cédric Villemain
Дата:
Pascal Heraud a écrit :
> Is there any specific issues with gentoo ?
no, there is nothing specific to Gentoo, but the power of Gentoo is the
tweaking, not the stable production server you can expect to admin quietly .
search "[Slony1-general] 2 problems" thread on slony-I mailing list.

and please, reply also to pgsql-admin.
> Pascal.
>>
>> You have not the lastest version wich is 8.2.5. You are running a
>> production site on a Gentoo??? You need to replicate asap, sure !
>>
>>>
>>> Thanks for any clue :)
>>>
>>> Pascal
>>>
>>>
>>> ---------------------------(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
>>
>>
>


--
Cédric Villemain
Administrateur de Base de Données
Cel: +33 (0)6 74 15 56 53
http://dalibo.com - http://dalibo.org


Re: Fresh copy of a PG DB ?

От
"Usama Dar"
Дата:


On Dec 28, 2007 5:58 PM, Cédric Villemain <cedric.villemain@dalibo.com> wrote:
Pascal Heraud a écrit :
> Is there any specific issues with gentoo ?
no, there is nothing specific to Gentoo, but the power of Gentoo is the
tweaking, not the stable production server you can expect to admin quietly .
search "[Slony1-general] 2 problems" thread on slony-I mailing list.

i know of and periodically maintain a couple of big installations on Gentoo running without a hitch,
--
Usama Munir Dar http://www.linkedin.com/in/usamadar
Consultant Architect
Cell:+92 321 5020666
Skype: usamadar