copyReplicas

Syntax

copyReplicas(srcNode, destNode, chunkId)

Arguments

srcNode is a string indicating the alias of origination node.

destNode is a string indicating the alias of destination node.

chunkId is a string or a string vector indicating ID of chunks.

Details

Copy replicas of one or multiple chunks from a node to another node. If the destination node already has the chunk, the command is skipped.

This command can only be executed by an administrator on a controller node.

We can check the execution status with function getRecoveryTaskStatus .

Examples

Copy replicas of all chunks on “node1” to “node2”.

$ chunkIds=exec chunkId from pnodeRun(getAllChunks) where node="node1"
$ copyReplicas("node1","node2",chunkIds);