Creating a recurring scheduled backup

Create a scheduled backup to run periodic backup operations.

Create a scheduled backup job to automatically run periodic backups.

Prerequisites

Important: The Backup Service requires control over the data and structure of its destination locations. The AWS S3 bucket and the Local file system destinations must be dedicated for use only by OpsCenter. Any additional directories or files in those destinations can prevent the Backup Service from properly conducting a Backup or Restore operation.

Procedure

  1. Click cluster name > Services.
  2. Click the Details link for the Backup Service.
    The Activity tab appears.
  3. In the Scheduled Backups tab, click Create New.
    The Create Backup dialog appears with Schedule selected as the Type.

    Create Scheduled Backup dialog"

  4. Select a date, time, and repeat frequency for the backup schedule.
  5. Make any other selections using the following table for guidance.
    Table 1. Create Backup fields
    Field Description
    Type Type of backup job to create: Run now or Scheduled.
    Schedule Schedule backup settings by date and time. Only appears when Schedule is selected as the Type. Available settings:
    • Date: Day, Month, and Year.
    • Time and Timezone: GMT is the default timezone. To change the timezone, click GMT, select the country and timezone, and click Save.
    • Repeat or Don't Repeat settings: Use to schedule a backup job on a regular periodic basis, or run a scheduled backup during off hours.
    Keyspaces Required. Allows selecting one or more or all keyspaces for a backup.

    When backing up a DSE Graph database, select your graph keyspace. When a keyspace is created in DSE Graph, it is actually comprised of three keyspaces that OpsCenter bundles together because all three keyspaces are required for a DSE Graph backup.

    Tip: Click the plus (+) icon to select one or more options. To keep the list open when making multiple selections, press and hold the Cmd key (Mac) or Ctrl key (Windows/Linux).
    Datacenters Required. The Datacenters field only appears if there are multiple datacenters configured for a cluster. Allows selecting one or more or all datacenters for a backup. Running a backup by a specific datacenter improves backup performance under most circumstances, because the process eliminates backing up data redundantly since the data is replicated to other datacenters anyway.
    Warning: When limiting a backup by datacenter, if the SimpleStrategy replication strategy is used, or the NetworkTopologyStrategy is used with a replication factor of 0 for a datacenter, the snapshot might not contain all the data for the cluster.
    Tip: Click the plus (+) icon to select one or more options. To keep the list open when making multiple selections, press and hold the Cmd key (Mac) or Ctrl key (Windows/Linux).
    Alert on Failure Activates an alert upon backup failure that sends an alert to the event log. Default: False.
    Tip: Enabling Alert on Failure is particularly useful for monitoring scheduled overnight backups. Configure alerts for events and route the alerts through email, or post URLs to a chat room such as HipChat or Slack.
    Current Data Size Current data size is a best estimate of how large the snapshot will be based on the currently selected keyspace or keyspaces. The information is based on table metrics collected by OpsCenter. Current Data Size is a dynamic read-only field that displays Unknown when size information is not available for the selected keyspaces. An Unknown Data Size typically displays when either a system keyspace is selected or keyspace size information has not been collected yet.
    Location Snapshots are saved to the node's snapshot directory for the table being saved. For example, /var/lib/cassandra/data/OpsCenter/settings/snapshots. Add more locations to back up to and restore from, including Local file system and Amazon S3 locations, by clicking Add Location. Set a retention policy for the backup data in each location of a backup job. See Adding a backup location.
    Staging Directory The location of the Backup Service staging directory for backups. The default location is /var/lib/datastax-agent/tmp. To change the default location of the directory, indicate the path using the tmp_dir configuration option in address.yaml.
    Advanced Options Expands the Pre-Backup Script and Post-Backup Script fields for running scripts before or after (or both) snapshots are taken. The script must be located in the appropriate install directory on each node.
    Custom backup scripts must be located in:
    • Package installs: /usr/share/datastax-agent/bin/backup-scripts
    • Tarball installs: install location/agent/bin/backup-scripts

    For details, see Configuring custom scripts to run before and after backups.

    Create Backup Creates a scheduled or runs an ad hoc backup job immediately depending on the selected backup Type (Scheduled or Run Now).
  6. Click Create Backup.

Results

The scheduled backup appears in the Scheduled Backups tab, which displays the keyspaces, datacenters, backup locations, backup schedule, and the timestamp of the last scheduled backup. You can also edit or delete scheduled backups from the Scheduled Backups tab.