Configure backups

navigation

To make sure that your data is continuously protected in case of a database failure, you can schedule full and incremental backups to be run with regular intervals. You can also create backups manually when required, for example before a system update.

Backups are stored on archive volumes. Archive volumes can be configured either locally within the cluster (local archive) or on a location outside of the cluster (remote archive). This article explains how to create a local archive volume and a simple backup schedule.

To learn more about backups, see Backup and Restore.

To learn more about how to create and manage archive volumes, see Storage Management.

The following examples use ConfD through the command-line tool confd_client, which is available on all database nodes. You can also access ConfD through XML-RPC in your own Python programs. For more information, see ConfD.

Create a local archive volume

  1. Connect to the cluster operating system (COS) using c4 connect -i PLAY_ID -s cos.

    Example:
    Copy
    ./c4 connect -i c3275f84 -s cos

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

  2. To create a local archive volume, use the ConfD job st_volume_create and configure the required parameters as described in the following table.

    Some parameter values for the archive volume must match the corresponding values for the data volume. To find out the values for the data volume, use the ConfD jobs db_info and st_node_list.

    Required parameters

    The following parameters must be included with the st_volume_create command:

    Parameter name

    Data type

    Value

    disk

    string

    The disk name in Exasol for the storage disk where the data volume resides.

    owner

    tuple, list

    Owner tuple (or list of tuples) for the data volume.

    nodes

    list

    List of node IDs in the data volume.

    num_master_nodes integer

    The number of master nodes (active nodes) in the data volume.

         

    name

    string

    A name for the new archive volume.

    redundancy

    integer

    The redundancy level of the archive volume.

    size

    string

    Volume size for the archive volume as a string, with unit (MiB, GiB, or TiB).

    The size value depends on the database size and the backup schedule.

    partition_size

    string, integer

    4294967296 for volumes <250 GiB

    34359738368 for volumes ≥ 250 GiB and <1TiB

    274877906944 for volumes ≥ 1 TiB

    shared

    boolean

    true

    type

    string

    archive

    block_size string 512 KiB
    stripe_size string 512 KiB

    Master nodes

    The parameter num_master_nodes defines the number of master nodes that the volume will use, which is the number of active nodes in the cluster. For example, in a cluster with 3 active nodes and 1 reserve node (3+1), num_master_nodes must be set to 3.

    Example:

    To create a 1 TiB data volume with the name LocalArchiveVolume1 on the storage disk disk1 with 3 master nodes and redundancy 2, execute the following ConfD job:

    Copy
    confd_client st_volume_create name: LocalArchiveVolume1 disk: disk1 type: archive size: '1 TiB' nodes: '[11, 12, 13]' num_master_nodes: 3 redundancy: 2 block_size: '512 KiB' stripe_size: '512 KiB' partition_size: 274877906944 shared: true owner: '[500,500]'
    # ConfD returns the volume ID of the new archive volume:
    vid: 3

Create a backup schedule

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

Example:

A typical backup schedule is a weekly backup with an expiration of 10 days and incremental backups on the first 6 days of the week with an expiration time of 3 days. To set up this configuration, you must create two backup schedules:

Copy
confd_client db_backup_add_schedule db_name: MY_DATABASE backup_name: weekly_full_backup backup_volume_name: VOLUME_NAME enabled: true level: expire: '1w 3d'  minute: 0 hour: 0 day: '*' month: '*' weekday: 0
Copy
confd_client db_backup_add_schedule db_name: MY_DATABASE 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'

Next step: Connect to Exasol