Enabling commitlog backups

Commitlog backups allow point-in-time restores.

Prerequisites

  • You must use Java 7 when backing up commitlogs.

Commitlog backups allow you to restore your data to a particular point in time.

Commitlog backups are only available for the following versions of DataStax Enterprise:

  • For DataStax Enterprise 3.2: 3.2.8 or greater
  • For DataStax Enterprise 4.0: 4.0.5 or greater
  • For DataStax Enterprise 4.5: 4.5.3 or greater
  • 4.6 or greater
Note:

Enabling commitlog archiving modifies Cassandra's commitlog_archiving.properties configuration file.

OpsCenter automatically enables commitlog archiving on the new nodes when adding new nodes to a cluster using OpsCenter if commitlog archiving is enabled on the cluster. If you manually add nodes to a cluster and commitlog archiving is enabled, you must manually copy commitlog_archiving.properties to the new nodes prior to starting DataStax Enterprise.

Procedure

  1. Click the name of the cluster you want to manage from the left pane.
  2. Click Services.
  3. Click View Details for the Backup Service.
  4. Click the Settings tab.
  5. Under Commitlog Backup click Configure.
  6. Set the slider to On.
  7. Enter the path where you want to store the commitlogs on each node under Backup Directory.

    The location set under Backup Directory must be writable both by the user running DataStax Enterprise and the agent user. Starting in OpsCenter 5.1, the agent user and the DataStax Enterprise user are by default the same user.

    If the location runs out of disk space, the backup will fail. Commitlog files record every mutation of the data in a cluster, and can grow quite large over time. The disk performance of this location is also extremely important, as the disk write speed will likely be a bottleneck for write-heavy use cases, and the read performance a bottleneck for restore operations.

  8. If you want to backup the commitlogs to a cloud storage provider like Amazon S3, click Add Location.
    1. In the Add Location window, select the location type under Location and indicate how long the snapshot data should be saved by selecting a Retention Policy.

      To save the commitlogs to Amazon S3, select Amazon S3, set the bucket name, and your AWS key and secret. Make sure you have the proper AWS IAM privileges. The bucket name must conform to the S3 guidelines.You can set a maximum upload rate to avoid saturating your network by selecting Throttle S3 transfer rate and setting the maximum MB per second to upload the data. To compress the data, select Enable compression. This will reduce the amount of data going through your network, but will increase the CPU load for the server.

      The Retention Policy can be set to Retain All, which saves the commitlogs indefinitely, or to a set period of time. Once the commitlogs are older than the time set in Retention Policy, the commitlogs will be deleted.

    2. Click Save Location.
  9. Click Save.
  10. OpsCenter will perform a rolling restart of your cluster after enabling commitlog backups. Set the sleep time between restarting each node, and optionally select Drain before stopping if you want to perform a nodetool drain operation, and click Restart Cluster.