copy ru

To instantiate or repair a follower member of a replication unit you can copy another follower in that replication unit from another shard.

Syntax

COPY [RU|REPLICATION_UNIT] -RU ru_id
         [-SOURCE source_shard_name] -TARGET target_shard_name
         [-REPLACE repl_shard_name]
         [-timeout timeout] 
         [-force]
                  

Options

Table 2-37 GDSCTL copy ru Options

Option Description
-force

Allow the operation to bypass RAFT replication role checks.

-replace

Removes the replication unit follower specified by -ru from the database specified in -replace.

-ru

Replication unit ID

-source

Name of the source shard.

-target

Name of the target shard .

-timeout

Timeout of connection retention between the time FAN event is sent to clients and chunk going read-only/down (seconds).

-verbose

Enable verbose mode.

Usage Notes

The source shard and target shard shouldn't be the replica leader for the given replication unit. If a member of the specified replication unit exists on the target shard, it is replaced by full replica of replication unit from the source shard.

If -source is not specified, then an existing follower of the replication unit will be chosen automatically as the source shard.

If the target database doesn't already contain a member of the specified replication unit, then the total number of replicas for the given replication unit should be below replication factor, unless -replace is specified.

If -replace is specified, the replication unit member is removed from the specified database.

Examples

GDSCTL> copy ru -ru 1 -source sh1 -target sh2