[prev in list] [next in list] [prev in thread] [next in thread]
List: slony1-general
Subject: Re: [Slony1-general] switchover slony question
From: "Raymond O'Donnell" <rod () iol ! ie>
Date: 2011-02-17 15:43:16
Message-ID: 4D5D4214.9050800 () iol ! ie
[Download RAW message or body]
On 17/02/2011 15:03, Tech Madhu wrote:
> all,
> i got the failover to work.. listing the steps which might be useful for
> other beginners like me
>
> node1 = master, node2=slave
>
> node1 goes down (crash or power failure). while node1 is being
> recovered, if your apps have to continue writing to DB, only way i found
> is that we have to do the failover
>
> on node 2, run the following slonik commands
> 1) failover (id = 1, backup node = 2); (this works only if you
> subscribed your set originally with forward=yes)
> 2) ensure DB can be written into (not readonly anymore)
> 3) drop node (id = 1, event node = 2);
> on node 1, run the following commands once it comes back in service
> 1) dropdb <dbname>
> 2) createdb -O <dbuser> <dbname>
> 3) psql -U user -d DB < backup.sql
> //Note : this backup.sql should not have slony tables, so its
> backup taken before slony was setup using pg_dump -c -s -U <user> <db> >
> backup.sql
It's worth adding here that all you're restoring at this point in the
procedure is the database schema, not the data. I know it's implicit in
the pg_dump command above, but I reckon it's worth saying it clearly.
Ray.
--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie
_______________________________________________
Slony1-general mailing list
Slony1-general@lists.slony.info
http://lists.slony.info/mailman/listinfo/slony1-general
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic