Sync changes from Slave to Master
-
Team,
We are having a custom file in a similar format to config.xml to track any changes made in firewall .
We have created this file on a temporary basis so as to compare the changes.
So now, if a change has been made to slave node, we want to copy that same file to master node once the master will be up.
What is the possible solution to copy this file from slave node to master node when master will be up as we will lose the access to slave as soon as master node will be up. -
@vikas-gupta said in Sync changes from Slave to Master:
as we will lose the access to slave as soon as master node will be up.
Why?
What you want to do seems to be dangerous. You should better use the XMLRPC-Sync for transferring settings between nodes.
-
@vikas-gupta Configurations are synced from primary to secondary. There is no safe way to sync the other way.
If your primary is going to experience an extended outage, you probably just want to configure your secondary as the new primary and bring up the replacement node as a secondary.
Setting a maintenance window and restoring the primary backup to the secondary is probably the most reliable way.
Else keep a log of your changes and make them again on the primary before you bring it back online.
-
@derelict said in Sync changes from Slave to Master:
Configurations are synced from primary to secondary. There is no safe way to sync the other way.
Why not? As far as a can remember, I've already done that in the past this way:
Deactivated sync interface on secondary when booting up the master again.
Disabled XMLRPC Sync on master by removing the sync IP.
Reenabled the sync interface on the secondary and configured High Availability Sync. -
@viragomann Good luck with that.
It might work for some things but if you do something like create a new CARP VIP with an advskew of 100 (the default on the secondary) I would expect it will not sync to the primary correctly.