4 4 44>>-cdr sync replicateset--+-------------------------+-----------> 4 | (1) | 4 '-| Connect Option |------' 4 4>-- --master=data_server-- --replset=repl_set-------------------> 4 4 .---------------. 4 V | 4>--+---target_server-+-+--+---------------------------------+-->< 4 '- --all------------' '- --extratargetrows=--+-delete-+-' 4 +-keep---+ 4 '-merge--' 4
Element | 4Purpose | 4Restrictions | 4Syntax | 4
---|---|---|---|
data_server | 4Name of the database server to use as the reference copy 4of the data | 4Must be the name of an existing database server group in 4SQLHOSTS. See Setting up Database Server 4Groups. | 4Long Identifiers | 4
repl_set | 4Name of the replicate set to synchronize | 44 | Long Identifiers | 4
target_server | 4Name of a database server group on which to perform synchronization | 4Must be the name of an existing database server group in 4SQLHOSTS. See Setting up Database Server 4Groups. | 4Long Identifiers | 4
The following table describes the cdr 4sync replicateset options.
4 44Use the cdr sync replicateset command to synchronize 4data between multiple database servers for a replicate set. This command performs 4direct synchronization as a foreground process.
4The following example illustrates synchronizing all replication servers 4for the replicate set replset_1 using g_serv1 as the reference server:
4cdr sync replicateset --master=g_serv1 --replset=replset_1\
4--all --extratargetrows=keep
Line 2 indicates that all servers associated 4with the replicate set are synchronized and that if the synchronization process 4detects rows on the target servers that do not exist on the reference server 4(g_serv1), that those rows should remain on the other 4servers.
4The following example illustrates synchronizing three servers for the replicate 4set named replset_2:
4cdr sync replicateset -m g_serv1 -s replset_2\
4g_serv2 g_serv3
The reference server is g_serv1 and 4the target servers are g_serv2 and g_serv3. Because the --extratargetrows option is 4not specified, the default behavior occurs: rows, and any dependent rows that 4are based on referential integrity constraints, that are on the target servers 4but not on the reference server, are deleted.
4