Run Manual Backup

This section describes how to manually create a backup of a database instance.  

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

Before you can create a new backup you need to know the name of the database and the name of the archive volume where the backup will be stored. If there is no available archive volume, you must create one first, see Create Local Archive Volume or Create Remote Archive Volume.

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

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

    Local archive volumes

    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 manually create 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 name of the database.
    backup_volume_name The name of the archive volume. The backup will be stored in this volume.
    level

    The backup level (0, 1 ... 9). Level 0 means a full backup, levels 1-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".

    The following example creates a backup of database PROD_DB in volume r0001 at level 0 and it is set to expire in two weeks.

    confd_client -c db_backup_start -a '{db_name: PROD_DB, backup_volume_name: r0001, level: 0, expire: "1w"}'

Verification

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 backup

To abort the creation of the backup file, use the ConfD job db_backup_abort:

confd_client -c db_backup_abort -a 'db_name: DATABASE_NAME'