Database Reference
In-Depth Information
able incremental backup to a node, you need to edit cassandra.yaml and set incre-
mental_backups: true . This will result in the creation of hard links in the backup's
directory under the data directory.
Therefore, you have snapshots with incremental backup. You also have a backup of all the
SSTables created after the snapshot is taken. Incremental backups have the same problem
as snapshots. They are hard links; they delete obsolete data files that are not to be deleted.
It is recommended to run clearsnapshot before a new snapshot is created, and make
sure that the backup's directory has no incremental backup.
Backing up the data is just half the story. Backups are meaningful when they are restored
in the case of node replacement or to launch a whole new cluster from the backup data of
another cluster. There is more than one way to restore a node. We will see two approaches
here. The first step is to just paste the appropriate files to the appropriate location. Perform
the following steps:
1. Shut down the node that is going to be restored. Clean the .db files for the
column family from the data directory. It is located under
<data_directoy>/<keyspace>/<column_family> . Do not delete
anything other than the .db files. Also, delete the commit logs from the com-
mitlog directory.
2. From the backup, take the snapshot directory that you wanted to replace. Paste
the content of everything in that snapshot directory to the data directory men-
tioned in the previous step.
If you have enabled incremental backup, you may want to take them into account
too. You need to paste all the incremental backup taken from your backup (it is
situated under <data_directory>/<keyspace>/<column_family>/
backups ) to the data directory, the same as we did with snapshots in the previ-
ous step.
3. Restart the node.
Here are a couple of things to note:
• If you are restoring the complete cluster, shut down the cluster while restoring
and restore the nodes one by one.
• Once the restoration process is done, execute nodetool repair .
• If you are trying to restore on a completely new machine that has no idea about
the keyspace that is being restored, it may be worth checking the schema for the
Search WWH ::




Custom Search