View Source

You can restore a MySQL database to an alternate server in your Server Backup Manager by following the instructions below.

MySQL database tables can be restored simultaneously; this is implemented by using multiple threads.

1. Follow the instructions listed on [ServerBackupManager:Browse MySQL instances] to select a Recovery Point containing the necessary database replication and open the _Browse Databases_ window. 

2. When the _Browse Databases_ window opens, select a database instance in the *Database Instance* field. You can then browse the database instance by clicking the corresponding *>* icons. !Browse Databases window.png|border=1!
3. Select the check box for the database you want to restore and click the *Restore Selected* button. !Browse Databases window - Restore Selected.png|border=1!
The _Restore Databases_ window displays, where you can define the options for the restore.
4. On the Introduction screen, review the introductory information and click *Next* to proceed.

!Restore Databases 1.png|border=1!

5. On the _Host_ screen, select the *Restore to Alternate Agent* option.

Select the agent you want to restore in the _Agent_ field, enter *localhost* in the _Database Host_ field, and enter *3306* in the _Database Port_ field.

!Restore Databases - Host alternate agent.png|border=1!
Click *Next* to proceed to the following step.

6. On the _Authentication_ screen, you have two options to specify to connect to the database. Select the *Specify Alternate Authentication Credentials* option. This allows you to set a username and password different from the default ones. The user must have full administrator-level access to the database instance you are going to restore.

!Restore Databases - authentication alternate.png|border=1!

Enter the required credentials in the *Username* and *Password* fields and click *Next* to proceed to the following step.

7. The next screen is _Temporary Instance_. When restoring databases, the system needs to create a temporary directory on the target Server for the restore. There are two options for this.
* *Use Default Temp Directory* \- Creates a directory in an OS-specific default location ({{C:\Temp}} for Windows, {{/tmp}} for Linux).
* *Specify an Alternate Temp Directory* \- Allows you to control exactly where the {{temp}} directory is created on the Server.

!Restore Databases 4.png|border=1!

The other fields (_Connection Information_ and _Virtuozzo Container ID_) can be left unchanged.

Select an option and click *Next* to proceed to the following step.

8. The following screen is the _Data Directory_ screen. By default, the database configuration retrieved during discovery is used. In some environments, this path does not point to the actual location on the filesystem for the data. To remedy this, you can choose to specify the exact path for the data directory. This will ensure that the system can locate the data files for the database during the restore.

!Restore Databases 6.png|border=1!
Select an option and click *Next* to proceed.

9. On the _Base Directory_ screen, specify the exact path for the base directory. By default, the system automatically determines where on the filesystem the necessary program files are located. In some environments, the automatic method fails. !Restore Databases 7.png|border=1!
Select an option and click *Next* to proceed.

10. On the _Summary_ screen, the settings you have selected are listed and can be reviewed.

!Restore Databases - Summary alternate.png|border=1!
11. Once you have verified that the specified settings are correct, the *Restore* button. The restore process will start immediately.

The _Details for Database Restore_ window displays. It indicates that the restore process is launched. You can watch the progress in real time.  !Details for Database Restore window.png|border=1!
12. When the database restore is completed, a success message displays. You can also click through the tabs on this window to review additional database restore details.   !Details for Database Restore window - Success.png|border=1!

{excerpt:hidden=true}Instructions on how to restore a MySQL database to an alternate server with Server Backup Manager.{excerpt}