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

Reply via email to