Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I back up and restore data from a Riak cluster? What commands do I need to run?

share|improve this question

First, on each machine, you need to know a valid node name and the Erlang cookie value.

You can find out what nodes you have by running riak-admin status | grep 'nodename'

You can find the cookie name in vm.args. For me, this file was located in /usr/local/riak/etc/. There should be a line like "-setcookie foo`. The default value is 'riak'.

On the machine where you want to do the backup, run (from the docs):

sudo riak-admin backup <node> <cookie> <filename> [[node|all]]

For example:

sudo riak-admin backup rk1@ MyCookieVal /home/me/riak-backup-01-11-2012.dat all

(The .dat file extension is arbitrary.)

Note that you can run this command remotely if the machine you're running it from has riak-admin available.

On the machine where you want to do the restore, run (from the docs):

riak-admin restore <node> <cookie> <filename>

For example:

riak-admin restore riak@ MyCookieVal ~/riak-production-backup-01-11-2012.dat
share|improve this answer
Just a note on file permissions, check this thread too… ! – setsuna Sep 20 '13 at 12:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.