Riak Backup Strategies

These are the basic strategies used to backup Riak's data (to protect yourself from cases like total cluster failure or data deletion by tired developer).

The common issues to note:

  • The backed up node should be stopped.
  • Backups are inconsistent (no coordination between backuped nodes)
  • Data directories depends on OS (the list in official docs)

Note: If you have installed riak on OS X using homebrew, the data directory is something like /usr/local/Cellar/riak/2.0.0-beta1/libexec/data

Note: If you want to setup the local cluster on OS X and you have installed riak with homebrew, follow this tutorial.

Differential backup

The general info available here: https://github.com/drewkerrigan/riak-differential-backup

  • Copy only the keys, that were modified from the previous backup
  • Riak Migration Tool-based (may be an issue: see Caveats)
  • More complex, compared to other options

Filesystem data dirs copy

This approach is the one in the official documentation : http://docs.basho.com/riak/latest/ops/running/backups/

  • Official recommendation
  • Different paths on different OSes
  • backup the full cluster data

Using riak-admin cli tool

This strategy was recently deprecated in favor of filesystem backup, described former. See docs for details

riak-admin backup <node name> <erlang cookie> <file name with path> all