5 1 0:MySQL Restore

From SEPsesam

Welcome to the latest SEP sesam documentation version 5.1.0 Apollon. For previous documentation version(s), check documentation archive.


The procedures and features explained here only contain information about the SEP sesam-specific parts of MySQL restore. For detailed information on MySQL-specific backup and recovery, refer to MySQL Documentation.

The SEP sesam extension for MySQL and MariaDB is part of a client package and enables online backup and restore of one or more MySQL databases. The restore uses the mysql client program to import the data from a dump file to the MySQL database.

Restore is triggered from the GUI menu bar -> Activities -> Restore. Restore wizard guides you through the process of restoring your data. For step-by-step procedure, see Standard Restore Procedure.

There are two ways to restore MySQL database(s) in SEP sesam: via the GUI restore wizard or via the web Restore Assistant (as of v. ≥ SEP sesam 5.0.0 Jaglion V2). Although most options are the same in both restore interfaces, the web Restore Assistant interface is more intuitive and offers additional advanced options.

Scheduling restore is only supported in GUI mode. For details, see Scheduling Restore


  • Make sure that there is sufficient free space on the target storage system to which you are restoring your data.

Restoring MySQL database(s)

Depending on the interface you are using, follow the appropriate procedure to restore PostgreSQL DB:

MySQL restore via the GUI

Create a new restore task for the MySQL database. You can only restore a single database if you have backed it up with a separate backup task, as described in Configuring MySQL database backup. If you have not backed up individual databases separately, you can only perform a complete MySQL database restore, as shown in the following example.

  1. From the SEP sesam GUI menu bar, select Activities -> Restore. The New Restore Task window opens.
  2. To restore a complete MySQL database, select the backup task with the source all. You can also search the savesets by task name or by filename or path to find the relevant task to restore. You can also restore a single MySQL database, if you have backed it up with a separate backup task; in this case, select the related single database task from the drop-down list.
  3. Note
    With the backup source all you can restore only the complete database.
  4. Under the Saved in period drop-down lists, specify the time frame for which you want to conduct the search. Click Next.
  5. The search results are displayed. From the list of savesets matching your query, click the version you want to restore. Click Next.

  6. Under the Target Settings (previously Save and Start), set additional options.
    • Under the Target path settings, select one of the following options:
      • Restore to original target path (set by default): Restores the data to the same location from which it was backed up. If it is set together with the option Overwrite existing items the target database will be deleted first and a new one will be created from the backup saveset.
      • If you select the New restore target option and browse for the new target location, the target path may be incompatible with the MySQL task type. In this case, click the Expert Options button (in v. ≥ 4.4.3 Beefalo only available in the Expert UI mode) and under the tab Task Type, select MySQL. Then the data is imported into the new database. You always have to combine this option with No recover after restore option.
      • Note
        In case of a single database restore, a special CREATE DATABASE statement is inserted during the backup to be able to restore a single database to the new target location. For details about the statement, see Configuring MySQL database backup.
    • Under the Execution options drop-down list, select one of the following options:
      • Do not overwrite existing items (set by default): The database will not be restored if it already exists on the set target.
      • Overwrite existing items: If the database exists on the target server, it will be replaced by the restored version.
      • Auto recover after restore: The data will be stored directly into the database without caching in the file system. Note that if you use this option the database must already exist, otherwise the restore fails. You have to use this option together with Overwrite existing items option to be able to overwrite the existing database. See the below section Restoring MySQL database under a new name.
      • No recover after restore: Use this option if you are restoring MySQL single database to a different location; afterwards, you have to start the import of data from the command line on the server manually.
        The data will be written as a dump file in the file system work directory, by default SESAM_VAR/work. The name of the file contains mysql- prefix, a saveset ID and the .tmp suffix.
        You have to import the dump file into the database by using mysql command, for example, mysql < /var/opt/sesam/var/work/mysql-SF20081128224529.tmp.

  7. If you want to start your MySQL restore immediately, click Start. If you want to save the restore task, click Save.
A restore task can be scheduled like any other task. If you want to add a restore task to the schedule, see Scheduling Restore.

Restoring MySQL single database under a new name

If you want to restore your MySQL database under a new name, proceed as follows:

  1. Create a new empty database (e.g., test) on the MySQL server.
  2. From the SEP sesam GUI menu bar, select Activities -> Restore. The New Restore Task window opens.
  3. Select a single MySQL database backup and click Next.
  4. Under the Target Settings (previously Save and Start), set the following options:
    • Under the Target path settings, select the New restore target option and enter or browse for your previously created empty database, e.g., test.
    • Under the Execution options, select Overwrite existing items and Auto recover after restore; see Execution options above.
  5. If you want to start the restore immediately, click Start. If you want to save the restore task, click Save.

MySQL restore via the Restore Assistant

You can access the Restore Assistant in one of the following ways:

  • via the GUI: by clicking the Restore Assistant icon in the toolbar or from Activities -> Restore Assistant
  • from SEP sesam Web UI: left menu -> Restore Assistant
  • or by entering the following address in the browser bar: http://[sesamserver]:11401/sep/ui/restore/.
  • If you cannot access the web Restore Assistant, check if you have received the appropriate permissions for online restore.
  • The operations and options available after logging in may differ depending on the user type. Other Web UI display restrictions may depend on the custom roles with specific permissions and the UI mode.
    For details, see About Authentication and Authorization and User Roles and Permissions.

With the web Restore Assistant, you can restore MySQL DB to the original or another location using simple or advanced UI mode. When using advanced UI mode, an additional Options tab is available for setting advanced restore options. You can also restore backup into dump file and restore the data to a single file rather than to original location. In this case, you must specify a restore destination path in the Target window (by browsing or typing the path). Optionally, you can also change the name of the dump file. If the dump file name is not specified, it is generated automatically. For more details, see Restore Assistant.

You can only restore one database if it was backed up alone, with one task per database.

Monitoring restore

You can monitor the restore progress using the Web UI (Monitoring -> Restores) or view the status in the GUI (Main Selection -> Job State -> Restores). The restore overview provides detailed information on the last run of restore jobs, including task name, status (successful, error, in queue...), start and stop time of the last backup, data size, throughput, etc. For details, see SEP sesam Web UI or Restores by State in the GUI.

See also

MySQL Backup - Standard Restore Procedure

Copyright © SEP AG 1999-2024. All rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.