4 4 3:MySQL Restore

From SEPsesam
Jump to: navigation, search
This page is a draft. Treat the information on this page with caution as it may be incomplete.

Copyright © SEP AG 1999-2020. 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.

Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3/4.4.3 Beefalo V2. For previous documentation version(s), check MySQL.


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

SEP sesam extension for MySQL and MariaDB is a part of a client package and enables an online backup and restore of one or more MySQL databases. During restore the mysql client program is used 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.

SEP sesam also provides the web Restore Assistant interface (Web UI) which is designed to be more intuitive and offers additional advanced options compared to GUI restore wizard while, on the other hand, it does not support the restore of special tasks types, such as MySQL, MS SQL, PostgreSQL, Oracle, etc. For these task types you can only use the GUI restore wizard to restore your data.


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

Restoring MySQL database(s)

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. Information sign.png 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. MySQL restore select task Beefalo V2.jpg

  7. 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.
      • Information sign.png 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.

    MySQL restore target Beefalo V2.jpg

  8. If you want to start your MySQL restore immediately, click Start. If you want to save the restore task, click Save.
Information sign.png Note
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.

Monitoring restore

You can view the status of your restore jobs by selecting Job State -> Restores from the Main Selection. Restore overview provides detailed information on the last run of restore jobs, including the task name, status (successful, error, in queue ...), start and stop time of the last backup, data size, throughput, client and message.

As of 4.4.3 Beefalo V2, you can also monitor the restore progress using the Web UI. For details, see SEP sesam Web UI.