Creating and managing backup configurations (beta)

Create and manage backup configurations for DSE Backup and Restore backup stores.

Important: The DSE Backup and Restore Service is currently in beta and is intended to be used by users provisioning DSE via the DataStax Cass Operator in a Kubernetes cluster.
Before you can actually run a backup, you'll need to configure a backup configuration for each of your backup stores. Backup configurations comprise the following required parameters:
  • A configuration name.
  • The name of the keyspace you want to back up.
    Important: You can only assign one keyspace to a backup configuration. You cannot backup individual tables within a keyspace.
  • The name of the backup store or stores in which to store the keyspace backup.
  • The frequency at which the backup should be run.
  • Whether the backup should run automatically using the specified frequency.
    Note: If the backup is disabled, the frequency is ignored.

Create an automatic backup configuration

An automatic backup configuration will backup the specified keyspace to the specified backup store at the time specified by the frequency parameter, which is a standard cron expression.

To create an automatic backup configuration:

  1. Open cqlsh and list the existing backup stores:
    LIST BACKUP STORES;
    
     name         | class                                                | settings
    --------------+------------------------------------------------------+--------------------------
     store_name | com.datastax.bdp.db.backups.destinations.FSBlobStore | {'path': '/full_path'}
  2. Create the new backup configuration:
    • config_name with a name of your choice. Configuration names can use alphanumeric characters and underscores only. They are case insensitive.
    • keyspace with the keyspace to backup.
    • backup_store with the name of the backup store to use.
      Tip: You can specify multiple stores for the backup by separating them with commas. Backups are then stored in each backup store, for instance one in a FSBlobStore and one in a S3BlobStore.
    • cron_expression with a standard cron expression, for example, daily at midnight:
      0 0 * * *
      Tip: Easily generate cron timing expressions using https://crontab-generator.org/. Note that shortcuts such as */30 * * * * to run a backup every 30 minutes are not supported.
    • enabled set to true.
    CREATE BACKUP CONFIGURATION config_name 
        OF keyspace
        TO STORE backup_store    
        WITH frequency = 'cron_expression'
        AND enabled = true;
    Note: For more information, see CREATE BACKUP CONFIGURATION (beta).
  3. Verify that the backup configuration was created:
    LIST BACKUP CONFIGURATIONS;
    
     name          | target_keyspace | stores              | frequency         | enabled | next_execution_time
    ---------------+-----------------+---------------------+-------------------+---------+---------------------
     config_name |       keyspace| ['backup_store'] | cron_expression |   True  |           timestamp

Create a manual backup configuration

The only difference between an automatic backup configuraton and a manual backup configuration is that enabled is set to false. The frequency parameter is ignored and the backup configuration can only be run manually.

To create a manual backup configuration:

  1. Open cqlsh and list the existing backup stores:
    LIST BACKUP STORES;
    
     name         | class                                                | settings
    --------------+------------------------------------------------------+--------------------------
     store_name   | com.datastax.bdp.db.backups.destinations.FSBlobStore | {'path': '/full_path'}
  2. Create the new backup configuration:
    • config_name with a name of your choice. Configuration names can use alphanumeric characters and underscores only. They are case insensitive.
    • keyspace with the keyspace backup.
    • backup_store with the name(s) of the backup store to use.
      Tip: You can specify multiple stores for the backup by separating them with commas. Backups are then stored in each backup store, for instance one in a FSBlobStore and one in a S3BlobStore.
    • cron_expression with five asterisks: * * * * * because it is ignored.
    • enabled set to false.
    CREATE BACKUP CONFIGURATION config_name 
        OF keyspace
        TO STORE backup_store [, backup_store_N]    
        WITH frequency = '* * * * *'
        AND enabled = false;
    Note: For more information, see CREATE BACKUP CONFIGURATION (beta).
  3. Verify that the backup configuration was created:
    LIST BACKUP CONFIGURATIONS;
    
     name        | target_keyspace | stores           | frequency | enabled  | next_execution_time
    -------------+-----------------+------------------+-----------+----------+---------------------
     config_name |       keyspace  | ['backup_store'] | * * * * * |   False  |                null

Alter and drop backup configurations

You can alter existing backup configurations and drop backup configurations you no longer need.

To alter an existing backup configuration:

  1. List your existing backup configurations:
    LIST BACKUP CONFIGURATIONS;
    
     name        | target_keyspace | stores           | frequency | enabled  | next_execution_time
    -------------+-----------------+------------------+-----------+----------+---------------------
     config_name |       keyspace  | ['backup_store'] | * * * * * |   False  |                null
  2. Alter the backup configuration settings as required:
    1. Add an additional backup store to the backup configuration:
      ALTER BACKUP CONFIGURATION config_name ADD STORE store_name;
    2. Remove a backup store from the backup configuration:
      ALTER BACKUP CONFIGURATION config_name DROP STORE store_name;
    3. Modify the frequency of the backup configuration:
      ALTER BACKUP CONFIGURATION config_name WITH frequency;
Note: For more information, see ALTER BACKUP CONFIGURATION (beta).

To drop an existing backup configuration:

  1. List your existing backup configurations:
    LIST BACKUP CONFIGURATIONS;
    
     name        | target_keyspace | stores           | frequency | enabled  | next_execution_time
    -------------+-----------------+------------------+-----------+----------+---------------------
     config_name |       keyspace  | ['backup_store'] | * * * * * |   False  |                null
  2. Drop an existing backup configuration:
    DROP BACKUP CONFIGURATION config_name;
Note: For more information, see DROP BACKUP CONFIGURATION (beta).

What to do next

With the backup store and the backup configuration created, continue to Managing backups (beta).