[Slony1-general] Switching Slave VM
Sung Hsin Lei
sungh.lei at gmail.com
Thu Jul 23 01:46:32 UTC 2020
Hello,
I have a slave machine who's database I want to restore on a different
machine
with a different ip. Since the backup process takes several hours, I
disconnect the master,
backup the slave db and restore it on the new slave machine. Then I
shutdown the slave
machine and reconnect the master to the new slave machine. Finally, I run
the following
script:
store path (server = 1, client = 2, conninfo = 'dbname = Securithor2 host =
192.168.1.101 user = slonyuser password = Ert3c5L221JKert port = 5432');
store path (server = 2, client = 1, conninfo = 'dbname = Securithor2 host =
192.168.1.102 user = slonyuser password = Ert3c5L221JKert port = 5432');
REPAIR CONFIG (
SET ID = 1,
EVENT NODE = 2
);
This procedure works but I would like the old slave to maintain replication
while I perform
the backup and restore. II would also like the new slave to catch up
replication
after I close the old slave an switch the node to point to new slave.
Adding a node or changing node id is not an option for us.
My question is, do I have to stop replication to old slave while I setup
new slave
or was I too paranoid and the procedure will also work if I do not
interrupt replication
during backup and restore process.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slony.info/pipermail/slony1-general/attachments/20200722/a343bbcd/attachment.htm>
More information about the Slony1-general
mailing list