List Backups

This section explains how to list all existing backups for a given database.

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

Prerequisites

There are no prerequisites for this procedure.

Procedure - Administration API

The following examples use curl in 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 --insecure -X "GET" \
    "https://$EXASOL_IP:4444/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. To get information about all existing backups for the current database, send a GET request to the /api/v1/databases/DATABASE_ID/backups/ endpoint. For example:

    curl --insecure -X "GET" \
    "https://$EXASOL_IP:4444/api/v1/databases/$DATABASE_ID/backups" \
    -H "accept: application/json" \
    -H "Authorization: Basic $TOKEN"

    If the backup was taken from another database than the one you are currently connected to, it is said to have been taken on a foreign database. Backups taken on foreign databases cannot be listed using the Administration API. In this case you must use ConfD.

Procedure - ConfD

The following examples use ConfD through the command-line tool confd_client, which is available on all database nodes. For more information, see ConfD.

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

  1. Connect to EXAClusterOS (COS) using c4 connect -t <DEPLOYMENT>[.<NODE>]/cos. For example:

    c4 connect -t 1/cos

    In most cases it does not matter on which node you access ConfD. If you do not specify a node, c4 will connect to the first active node in the deployment. The command prompt in COS indicates which node you are connected to:

    [root@n11 ~]#

    For more information about how to use c4 connect, see How to use c4.

  2. To find the name of the database, use the ConfD job db_list. For example:

    confd_client db_list
    - MY_DATABASE
  3. To get information about all backups for the current database, use the ConfD job db_backup_list:

    confd_client db_backup_list db_name: MY_DATABASE

    List foreign databases

    If the backup was taken from another database than the one you are currently connected to, it is said to have been taken on a foreign database. To list backups that were taken on foreign databases as well as backups taken on the current database, use the ConfD job db_backup_list with the show_foreign parameter set to True.

    confd_client db_backup_list db_name: MY_DATABASE show_foreign: True