4 4 3:MySQL Restore

From SEPsesam
Jump to: navigation, search
Draft.png WORK IN PROGRESS
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 Grolar. For previous documentation version(s), check MySQL.


Overview

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 Menu bar -> Activities -> Restore. Restore wizard guides you through the process of restoring your data. For step-by-step procedure, see Standard Restore Procedure.

Prerequisites

  • Make sure that you have required permissions and access rights for MySQL restore, as described in Configuring MySQL database backup.
  • Make sure that there is sufficient free space on the target storage system to which you are restoring your data.

Restoring MySQL databases

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.jpg

  7. Review your restore task configuration and set additional restore options in the final Save and Start step of the wizard.
    • 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 files 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, you have to select Restore with corresponding task type MySQL option in the additional Restore type window. 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 files/items (set by default): The database will not be restored if it already exists on the set target.
      • overwrite existing files/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 files option to be able to overwrite the existing database.
      • No recover after restore: Use this option if you are restoring MySQL 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 save.jpg

  8. 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.

See also

MySQL Backup