nodetool rebuild

Rebuilds data by streaming from other nodes.

Rebuilds data by streaming from other nodes.

Synopsis

$ nodetool [(-h <host> | --host <host>)] [(-p <port> | --port <port>)]
     [(-pw <password> | --password <password>)]
     [(-pwf <passwordFilePath> | --password-file <passwordFilePath>)]
     [(-u <username> | --username <username>)] rebuild [--] <src-dc-name>
     [-dc <source_dc>
Options
Short Long Description
-h --host Hostname or IP address
-p --port Port number
-pwf --password-file Password file path
-pw --password Password
-u --username User name
-- Separates an option from an argument that could be mistaken for a option.
Other options are:
Short Long Description
-dc --dcs The name of the datacenter that Cassandra uses as the source for streaming. Cassandra rebuilds from any datacenter. If a datacenter is not specified, Cassandra chooses at random.
-ts --tokens Token ranges, specify in this format: (start_token_1,end_token_1],(start_token_2,end_token_2],...(start_token_n,end_token_n].

Description

This command operates on multiple nodes in a cluster. The rebuild tool only streams data from a single source replica when rebuilding a token range.

If rebuild fails because some token ranges cannot be retrieved, you can rebuild selectively by using the -ts or --token option to specify a list of tokens, or one or more token ranges.

Attention: If nodetool rebuild is interrupted before completing its process, it cannot be restarted from the point of failure. If you run rebuild again, it starts from the beginning.