Database Reference
In-Depth Information
CommitLog Archiving
While backups and snapshots are important, there is one fundamental problem
with Cassandra snapshots: they are able to back up only the data that has already
been flushed from the CommitLogs. With CommitLog archiving, Cassandra now
supports point-in-time recovery (available since Cassandra 1.1.1).
To set up a CommitLog segment archive, you first need to find the com-
mitlog_archiving.properties file. It is located in the Cassandra configuration dir-
ectory; this is usually at /etc/cassandra/conf. Setting up the commit-
log_archiving.properties file once you have located it is easy as it requires only
four lines. For the archive_command and the restore_command only one
command with arguments is expected or allowed. If you don't want to enable
CommitLog archiving, ensure that all the fields in this are left blank or commented
out.
archive_command
The easiest way to archive a CommitLog segment is with a *nix hard link (see
Listing 7.16 ) . Therefore, the archive_command parameter should include the
fully qualified path name of the segment to archive. The second part of the hard
link command is what you want to name the CommitLog archive.
Listing 7.16 Create a *nix Hard Link to Archive a CommitLog Segment
Click here to view code image
# ln /raid0/cassandra/commitlogs/ /var/backup/cas-
sandra/commitlogs/1361544837468
restore_command
After the CommitLog has been archived, it's time to restore it. The re-
store_command parameter is typically something as simple as a *nix copy
command (see Listing 7.17 ) .
Listing 7.17 Copy the Archived CommitLog Segments to the CommitLog
Directory
Click here to view code image
 
 
Search WWH ::




Custom Search