Creating a recurring backup
OpsCenter can create a scheduled backup to run periodic backup operations.
Procedure
- Click the name of the cluster you want to manage from the left navigation pane and click Services.
- Click View Details for the Backup Service.
-
Click Create Backup.
The Create Backup dialog appears.
-
Select the backup parameters:
- Under Type, click Schedule.
- Schedule—Select a date and time and frequency for the backup. GMT is the default timezone. To change the timezone, click GMT, select the country and timezone, and click Save.
- Select a Keyspace to backup—Select the keyspace that you want to back up, or select All Keyspaces.
-
Location—Snapshots are saved to the node's
snapshot directory for the table being saved. For example,
/var/lib/cassandra/data/OpsCenter/settings/snapshots.
In the Add Location pane, click the edit icon to
edit the Location and Retention Policy.
-
Select the location type of On Server or Amazon S3 in
Location. Indicate how long the snapshot data
should be saved by selecting a Retention Policy.
The Retention Policy can be set to Retain All, which saves the snapshot
data indefinitely, or to a set period of time. After the snapshot data
is older than the time set in Retention Policy, the snapshot data is
deleted.
To save the snapshot data to Amazon S3, select Amazon S3 for the Location, set the bucket name, and enter your AWS key and secret. Make sure you have the proper AWS IAM privileges. The bucket name must conform to the S3 guidelines.
Note: You must use Java 7 or greater to store at an S3 location.(Applicable to Amazon S3 only) To avoid saturating your network, set a maximum upload rate. Select Throttle S3 transfer rate and set the maximum MB per second to upload the data. To compress the data, select Enable compression. This reduces the amount of data going through your network and reduces the disk and data usage in S3, but increases the CPU load for the server.
-
If you want the snapshot copied to an additional location in Amazon S3,
click Add Location.
The Add Location dialog appears.
- Optional:
To set custom pre- or post-backup scripts, click Advanced
Options:
Pre-Backup Script— Enter the name of a script to run before the backup is started.
Post-Backup Script— Enter the name of a script to run after the backup is completed.
For details, see Using custom scripts before and after backups.
- Click Create Backup.
Results
The scheduled backup appears in the Scheduled Backups tab.
