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

cdr sync replicate

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

Syntax

4
4
Read syntax diagramSkip visual syntax diagram4>>-cdr sync replicate--+-------------------------+-------------->
4                       |                    (1)  |
4                       '-| Connect Option |------'
4 
4>-- --master=data_server-- --repl=repl_name--------------------->
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_name Name of the replicate 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 sync replicate 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
--repl= -r Specifies the name of the replicate to synchronize
4
4

Usage

4
4

Use the cdr sync replicate command to synchronize 4data between multiple database servers for a specific replicate. This command 4performs direct synchronization as a foreground process.

4
4

Examples

4
4

The following example illustrates synchronizing all replication servers 4for the replicate named repl_1:

4
cdr sync replicate --master=g_serv1 --repl=repl_1\
4--all --extratargetrows=keep

The data on the server group g_serv1 is used as the reference for correcting the data on the other 4servers. Line 2 indicates that all servers associated with the replicate are 4synchronized and that if the synchronization process detects rows on the target 4servers that do not exist on the reference server (g_serv1), that those rows should remain on the other servers.

4

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

4
cdr sync replicate -m g_serv1 -r repl_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 ]