Originally from the User Slack
@Arthur_Li: Hi all, is it possible that I use nodetool snapshot to backup the entire cluster (one node by one node) and restore them on a different cluster with same number of nodes?
@Felipe_Cardeneti_Mendes: yes
@Arthur_Li: may I ask how can I decide which destination node does the snapshot goes to? is there some calculation that I need to do?
@Felipe_Cardeneti_Mendes: the easiest way if you are able to recreate the target cluster is to do a 1:1 source:destination copy by specifying the num_tokens
on the target node which matches the source one
if you can not do that, then the easiest way is to use load and stream https://opensource.docs.scylladb.com/stable/operating-scylla/nodetool-commands/refresh.html#load-and-stream
Nodetool refresh | ScyllaDB Docs
@Arthur_Li: will try nodetool refresh
by saying num_tokens
did you mean the Tokens
in the result of nodetool status
? which is default to 256 I guess
@Felipe_Cardeneti_Mendes: sorry, no …
I meant initial_tokens
Run nodetool ring
, this will show which tokens are owned by which ones. There will be 256 (the value for num_tokens
) entries for each node
transform that into a list, pass as initial_tokens
during the bootstrap of the target cluster
and done, you have a 1:1 mapping
@Arthur_Li: TIL thank you!!
@Felipe_Cardeneti_Mendes: > –initial-token arg Used in the single-node-per-token architecture, where a node owns exactly one contiguous range in the ring space. Setting this property overrides num_tokens.
> This parameter can be used with num_tokens (vnodes ) in special cases such as Restoring from a snapshot.