replicating to a stopped server

From: Joao Miguel Ferreira <joao(dot)mc(dot)ferreira(at)criticalsoftware(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: replicating to a stopped server
Date: 2007-10-12 18:13:01
Message-ID: 1192212781.3908.0.camel@azagthot.critical.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have a 'strange' situation:

I need to make a replica copy of my database to a reduntant
spare
computer.

The reduntant computer is not running postgres, but postgres is
installed. The redundant computer is running in a special
run-level (I'm
talking Linux here) in which Pg is _not_ running.

When the primary computer crashes the redundant one will be
rebooted in
'normal' mode and Postgres must be started with the databases
from the
replica.

a) So... how do I replicate a database to a stopped postgres ?

b) Is it safe just to copy the /var/lib/pg/* directories to the
right
place and let Pg boot on that ?

c) I know the right tool for this should be 'pg_dump' but it
needs a
live postgres daemon running, in order to install the replica.
Is this
correct ?

d) Is it viable to start postgres directlly from the dump ? by
specifying the dump-file in the cmd line ?


thx a lot
joao



Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Nolan 2007-10-12 18:18:33 Detailed logging, but only for one user?
Previous Message Alan Hodgson 2007-10-12 18:03:29 Re: DB errors