Restore Database from Backup

This section explains how to restore a database from a backup.

A database backup is stored in an archive volume, which can be located within the cluster (local archive volume) or on another system (remote archive volume). In case of a database instance failure or error, the database can be restored to a previous state using a backup.

Prerequisites

  • The database must be stopped. For more information, see Stop a Database.
  • The database that you are restoring the backup to must have the same number of active nodes as the one used to create the backup.
  • The version of the database that you are restoring the backup to must be one of the following:

    • The exact same version as the database used to create the backup. For example, both databases are Exasol 7.1.19.

    • A newer version within the same minor release as the database used to create the backup. For example, the backed up database is Exasol 7.1.19 and the new database is Exasol 7.1.20.

    • One major release newer than the database used to create the backup. For example, the backed up database is Exasol 7.0.20 and the new database is Exasol 7.1.20.

Procedure

  1. Go to Services > EXASolution, The EXASolution Instance screen is displayed.
  2. Select the checkbox next to the database name you want to restore from the backup and click Shutdown. The database is shut down when the green light next to the database name turns grey, and the status is Created.
  3. Next, click the database name. The EXASolution Instance Screen is displayed.
  4. Click Backups. The EXASolution Database Backup List screen is displayed.
  5. The expiration dates set up for each database backup can be changed. Update the new date under the Expiration column and click Apply to save your changes.

    This screen displays all the database backups available with the following information:

    Backup Property Description
    Database Name of the database instance.
    Backup ID A unique identifier of the backup.
    Volume The volume name that the backup is stored on.
    Level

    EXASolution provides some flexibility with backup levels:

    • Level 0 is a full backup
    • Level 1 is an incremental backup to the full backup (only changes since the full backup are saved)
    • Level 2 is an incremental backup to level 1 (only changes since the level 1 backup are saved)
    • Level 3 is an incremental backup to level 2 (only changes since the level 2 backup are saved)
    • And so on until level 9.
    Timestamp The date and time the backup was created.
    Expiration The expiration date of the backup.
    Usage (GiB) The size of the backup in GiB.
    Increment The increment of the backup over the last full backup.
    Status The status of the backup.

    To view all expired backups, select the checkbox next to Show expired Backup and then click Refresh.

  6. Select the Restore Type from the following options:
    1. Blocking: Continue to restore the data from the backup into the database with the database still in offline mode. This is the fastest way to restore the backup. Read or write operations on the database is not possible.
    2. Non-blocking: Restores the most necessary part of the data into the database and the database is in online mode. This option is usefully when you want to have a smaller downtime for the database. The data is loaded slightly slower as compared to the blocking restore type.
    3. Virtual Access: Use this option if you want to restore a single object of a database into another database. Selecting Virtual-access starts the database in a read-only mode.
  7. Click Restore to restore the database. You can monitor the progress of the database restore process in the monitoring section.

Additional operations you can perform in the EXASolution Database Backup List screen include the following:

Options Descriptions
Delete

Deletes a backup. Select the backup(s) to be deleted and click Delete.

Delete unusable backups Deletes unusable backups - for example, corrupt backups, foreign backup with a different number of nodes or incremental backups to backups that are no longer stored - are deleted to clear up space. Select Delete unusable backups.
Show foreign database backups Displays backups from other databases.

Verification

To verify that the database has been restored, connect to the database and view the latest entries in EXA_SYSTEM_EVENTS:

SELECT MEASURE_TIME, EVENT_TYPE FROM EXA_SYSTEM_EVENTS ORDER BY MEASURE_TIME DESC;

You should see entries with RESTORE_START and RESTORE_END similar to the following:

MEASURE_TIME EVENT_TYPE
2021-10-05 13:18:47.351000 STARTUP
2021-10-05 13:18:42.727000 RESTORE_END
2021-10-05 13:18:40.503000 RESTORE_START