From: | francois pascual <fradu84(at)gmail(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | scheduled switchover |
Date: | 2011-01-10 13:26:06 |
Message-ID: | AANLkTimZZCX1dW9fM6FCjqy0qN_O_SkO10RswHOjp35y@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi,
I use potgresSQL 8.5 with replication. The primary host and slave host are
not in the same place. The bandwidth between master/host is to 10MB. We need
to schedule a switchover and I found a solution to use the minimun of
bandwith to rebuild the database slave
I want to know if somebody use similar procedure?
*Step 1:*
Stop host01 (master)
*Step 2:*
Stop host02 (slave) and start it with master configuration.
*Step 3:*
build replication on host01 (old_master)
*Step 4:
* Allow connexion on host02 (INSERT, DELETE, SELECT...)
*Step 5:*
Stop host02 (master)
*Step 6:*
Stop host01 (slave) and start it with master configuration.
*Step 7:*
Build slave on host02 (old_master)
*Step 8:*
Allow connexion on host01 (master)
END.
I my case when i build slave host (step 3 and step 4), I use this following
command:
rsync -av --rsh=ssh --compress --verbose --progress *--exclude
base*--exclude pg_xlog --exclude pg_log --exclude postgresql.conf
--exclude
pg_hba.conf --exclude postmaster.pid * IP:/home/PGDDATA
I have add "--excluse base" on rsync.
If it's work it's only for the switchover, not when the master host crash.
Regards,
François
From | Date | Subject | |
---|---|---|---|
Next Message | Iñigo Martinez Lasala | 2011-01-10 14:21:21 | Re: saludos y consulta |
Previous Message | Alejandro Brust at federacion | 2011-01-07 19:06:56 | saludos y consulta |