Backup a cluster
ori.bar at nivertech.com
Mon May 2 18:22:14 EDT 2011
I have a cluster of riak nodes running on bitcask which I wish to backup.
The backup will later run on a new cluster, with the same number of nodes,
but possibly with different node names (for example, IP changed and I use IP
in -name in vm.args). I have figured there are two methods for backup:
1] Use the "riak-admin backup" script - I believe this should be simple, and
I should not have to account for the node name change since riak-admin
restore just does lots of successive puts().
* Let the nodes in the original cluster be named old1, old2, old3, ...,
* We manually copy the bitcask dir from each node.
* Let the nodes in the new cluster be named new1, new2, ..., newN.
* Copy the bitcask backups to the new cluster, DO NOT START THE NODES
* On new1, run "riak-admin reip old1 new1"
* Open riak console on new1, and type:
> Ring = riak_core_ring_manager:get_my_ring().
> Ring1 = riak_core_ring:rename_node(Ring, 'old1', 'new1').
> Ring2 = riak_core_ring:rename_node(Ring1, 'old2', 'new2').
> RingN = riak_core_ring:rename_node(RingNMinusOne, 'oldN', 'newN').
* Start other nodes via riak start.
* For each non-new1 node, use riak-admin join to join the newly created
Are these two procedures correct? I am especially worried about the second
one which might wreak havoc with the database if what I wrote here is
Ori Bar, Software Engineer
email: ori.bar at nivertech.com
The content of this message is Nivertech Ltd Confidential. If you are not
the intended recipient and have received this message in error, any use or
distribution is prohibited. Please notify me immediately by reply e-mail and
delete this message from your computer system. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users