Home | Previous Page | Next Page   Appendix A. Command-Line Utility Reference > 4 4 4

cdr sync replicateset

4
The cdr sync replicateset command synchronizes 4data among replication servers to repair inconsistent data within a replicate 4set. 4
4

Syntax

4
4
Read syntax diagramSkip visual syntax diagram4>>-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 
4 4 4
Notes:
4
    4
  1. See page Connect Option.
  2. 4
4 444444444444444444444444444444
Element Purpose Restrictions Syntax
data_server Name of the database server to use as the reference copy 4of the data Must be the name of an existing database server group in 4SQLHOSTS. See Setting up Database Server 4Groups. Long Identifiers
repl_set Name of the replicate set to synchronize Long Identifiers
target_server Name of a database server group on which to perform synchronization Must be the name of an existing database server group in 4SQLHOSTS. See Setting up Database Server 4Groups. Long Identifiers
4

The following table describes the cdr 4sync replicateset options.

4 4444444444444444444444444444444
Long Form Short Form Meaning
--all -a Specifies that all servers defined for the replicate are 4synchronized
--extratargetrows= -e Specifies how to handle rows found on the target servers 4that are not present on the server from which the data is being copied (data_server): 4
    4
  • delete: (default) remove rows and dependent rows, 4based on referential integrity constraints, from the target servers
  • 4
  • keep: retain rows on the target servers
  • 4
  • merge: retain rows on the target servers and replicate 4them to the data source server
--master -m Specifies the database server to use as the reference copy 4of the data
--replset -s Specifies the name of the replicate set to synchronize
4
4

Usage

4
4

Use 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.

4
4

Examples

4
4

The following example illustrates synchronizing all replication servers 4for the replicate set replset_1 using g_serv1 as the reference server:

4
cdr 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.

4

The following example illustrates synchronizing three servers for the replicate 4set named replset_2:

4
cdr 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
4

See Also

4
4 4
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]