Create Backup Schedule

This section describes how to create a schedule to automatically start backups.

Backup scheduling is based on full backups and incremental backups. For more information, see Backup Essentials.

Do not add or remove nodes on the archive volume or on the data volume being backed up while the backup is in progress.

Do not stop the database while a backup is in progress.

Prerequisites

You must have an archive volume for the backups. For more information, see Create Remote Archive Volume with Amazon S3 .

Procedure

This procedure is carried out using ConfD.

To determine the names and IDs of the database, archive volumes, and existing backups, you can also use the Administration API. For more information, see List Backups.

The ConfD examples are written in Bash on a Linux terminal running the Exasol tool confd_client, which is accessed by connecting to EXAClusterOS on the database nodes using Exasol Deployment Tool (c4). You can also interact with ConfD from an external tool using Python and XML-RPC. For more information, see ConfD.

Placeholder values are indicated with UPPERCASE characters. Replace the placeholders with your own values.

  1. To find the name of the database, use the ConfD job db_list:

    confd_client -c db_list
  2. When you create a backup, you must refer to the archive volume by name or volume ID. By default, an S3 bucket is created during deployment and configured as a remote archive volume with the name cloud_data_remote_volume.

    Remote archive volumes

    To find the names of available remote archive volumes, use the ConfD job remote_volume_list:

    confd_client -c remote_volume_list

    To find the volume ID of a remote archive volume, use the ConfD job remote_volume_info. The ID is stored under “vid”.

    confd_client -c remote_volume_info -a '{"remote_volume_name": VOLUME_NAME}'

    Remote archive volume IDs typically start at 10001.

    See also Create Remote Archive Volume with Amazon S3 Create Remote Archive Volume.

  3. To create the backup schedule, use the ConfD job db_backup_add_schedule.

    A common backup schedule is a weekly backup with an expiration of 10 days and incremental backups Monday - Saturday with an expiration of 3 days. To set up this configuration, create two backup schedules. For example:

    confd_client -c db_backup_add_schedule -a '{db_name: DATABASE_NAME, backup_name: weekly_full_backup, backup_volume_name: VOLUME_NAME, enabled: True, level: 0, expire: "1w 3d",  minute: "0", hour: "0", day: "*", month: "*", weekday: "0"}'
    confd_client -c db_backup_add_schedule -a '{db_name: DATABASE_NAME, backup_name: daily_incremental, backup_volume_name: VOLUME_NAME, enabled: True, level: 1, expire: "3d",  minute: "0", hour: "0", day: "*", month: "*", weekday: "1,2,3,4,5,6"}'

Verification

To verify that the schedule was created, use the ConfD job db_info. The information is found under config > backups.

confd_client -c db_info -a 'db_name: DATABASE_NAME'

Example output:

config:
  _sec_name: 'DB : Exasol'
  auto_start: true
  backups:
    daily_incremental:
      day: '*'
      enabled: true
      expire: 259200
      hour: '0'
      level: 1
      minute: '0'
      month: '*'
      volume: r0002
      weekday: 1,2,3,4,5,6
    weekly_full_backup:
      day: '*'
      enabled: true
      expire: 864000
      hour: '0'
      level: 0
      minute: '0'
      month: '*'
      volume: r0002
      weekday: '0'