Manual Backup

This section explains how to manually create a backup of a database.

This procedure can be carried out using either the Administration API or ConfD.

Prerequisites

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

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

Procedure - Administration API

The following examples use curl on a Linux terminal to send REST calls to endpoints in the Administration API. You can also use other interfaces and languages to interact with the API. For more information, see Administration API.

Placeholder values are styled as Bash variables, for example: $EXASOL_IP. Replace the placeholders with your own values.

  1. To get information about the database, send a GET request to the /api/v1/databases endpoint.

    curl -k -X "GET" \
    "https://$EXASOL_IP/api/v1/databases" \
    -H "accept: application/json" \
    -H "Authorization: Basic $AUTH_TOKEN"

    The response includes the database ID, name, and version. Additional details are included depending on the configuration and platform.

  2. Each backup is written to an archive volume. By default, an S3 bucket is created during deployment and configured as a remote archive volume. The name of the remote archive volume is cloud_data_remote_volume.

    To get information about existing archive volumes for the database, send a GET request to the /api/v1/databases/DATABASE_ID/volumes endpoint. For example:

    curl -k -X "GET" \
    "https://$EXASOL_IP/api/v1/databases/$DATABASE_ID/volumes" \
      -H "accept: application/json" \
      -H "Authorization: Basic $TOKEN"
  3. To create a backup, send a PUT request to the /api/v1/databases/DATABASE_ID/backups/start endpoint.

    You must specify the backup level (level) and expiration time (expire) parameters in the request.

    • The backup level parameter indicates if this is a full or incremental backup. For more information about backup types, see Backup Essentials.
    • The expiration time parameter determines when the backup is considered invalid and can be automatically cleaned up. Expiration time is given in the format #w #d #h #m.

    For example:

    curl -k -X "PUT" \
    "https://$EXASOL_IP/api/v1/databases/$DATABASE_ID/backups/start" \
    -H "accept: application/json" \
    -H "Authorization: Basic $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "backupVolumeId": 10002,
    "backupVolumeName": "r0002",
    "level": 0,
    "expire": "1w"
    }'

Abort a backup using the Administration API

To abort a backup that is in progress, send a PUT request to the /api/v1/databases/DATABASE_ID/backups/abort endpoint.

curl -k -X "PUT" \
"https://$EXASOL_IP/api/v1/databases/$DATABASE_ID/backups/abort" \
-H "accept: application/json" \
-H "Authorization: Basic $TOKEN"

Procedure - ConfD

The following examples use the command-line tool confd_client in a Linux terminal connected to a database node. For more information about how to use this tool, 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. For example:

    confd_client -c db_list
    - Exasol
  2. 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}'

    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 volume IDs typically start at 10001.

    See also Create Remote Archive Volume.

    To find the names of available local archive volumes, use the ConfD job st_volume_list:

    confd_client -c st_volume_list | grep name

    To find the volume ID of a local archive volume, use the ConfD job st_volume_info. The ID is stored under “id”.

    confd_client -c st_volume_info -a '{"vname": VOLUME_NAME}'

    See also Create Local Archive Volume.

  3. To start a backup, use the ConfD job db_backup_start:

    confd_client -c db_backup_start -a '{db_name: DATABASE_NAME,backup_volume_name: VOLUME_NAME,level: LEVEL, expire: "EXPIRE_TIME"}'
    Parameter Description
    db_name The database name.
    backup_volume_name The archive volume name. The backup will be stored in this volume.
    level

    The backup level (0, 1 ... 9). Level 0 means a full backup and levels 1 to 9 are incremental backups.

    For more information about backup types, see Backup Essentials.

    expire The expiration time for the backup using the format "#w #d". For example: "1w 3d".

    For example, to create a level 0 backup of the database prod_db in volume r0001 with a 1 week expiration time:

    confd_client -c db_backup_start -a '{db_name: prod_db, backup_volume_name: r0001, level: 0, expire: "1w"}'
  4. To verify that the backup was created, use the ConfD job db_backup_list:

    confd_client -c db_backup_list -a 'db_name: DATABASE_NAME'

Abort a backup

To abort a backup that is in progress, use the ConfD job db_backup_abort:

confd_client -c db_backup_abort -a 'db_name: DATABASE_NAME'