This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
public:module:mariadb_database:restore [2021/02/02 14:47] ronnie.chan |
public:module:mariadb_database:restore [2021/02/02 15:20] ronnie.chan |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Restore Options ===== | ===== Restore Options ===== | ||
+ | ---- | ||
The restore options available: | The restore options available: | ||
Line 12: | Line 13: | ||
iii. **Restore raw file** – CloudBacko Pro will restore the database *.sql files to a location on the local machine. Which then can be copied to another MariaDB server on another machine for manual recovery. | iii. **Restore raw file** – CloudBacko Pro will restore the database *.sql files to a location on the local machine. Which then can be copied to another MariaDB server on another machine for manual recovery. | ||
- | ===== Automatic MariaDB Database Restore ===== | + | ===== 1). Automatic MariaDB Database Restore ===== |
---- | ---- | ||
Line 56: | Line 57: | ||
| {{public:module:mariadb_database:image120.png?800}} | | | {{public:module:mariadb_database:image120.png?800}} | | ||
+ | 4. Select the storage destination that contains the MariaDB databases that you would like to restore from. | ||
+ | |||
+ | | {{public:module:mariadb_database:image122.png?800}} | | ||
- | 4. Select the storage destination that contains the MariaDB databases that you would like to restore from. | + | 5. Select to restore the MariaDB node from a specific backup job then select the files or folders that you would like to restore. Click Next to proceed. |
- | + | ||
- | 5. Select to restore the MariaDB node from a specific backup job then select the files or folders that you would like to restore. Click Next to proceed. | + | |
- | + | ||
- | NOTE | + | | {{public:module:mariadb_database:image124.png?800}} | |
+ | |||
+ | <WRAP info> | ||
To restore to either original or alternate location please unselect the MariaDB data node and only select the databases only. | To restore to either original or alternate location please unselect the MariaDB data node and only select the databases only. | ||
+ | </WRAP> | ||
+ | 6. Select to restore the MariaDB Databases to the Original location and click **Next** to proceed. | ||
- | 6. Select to restore the MariaDB Databases to the Original location and click Next to proceed. | + | | {{public:module:mariadb_database:image126.png?800}} | |
- | 7. Confirm the temporary directory path is correct and then click Restore to proceed. | + | 7. Confirm the temporary directory path is correct and then click **Restore** to proceed. |
+ | |||
+ | | {{public:module:mariadb_database:image128.png?800}} | | ||
+ | 8. After the MariaDB database(s) has been restored. | ||
+ | |||
+ | | {{public:module:mariadb_database:image130.png?800}} | | ||
- | 8. After the MariaDB database(s) has been restored. | + | 9. Using MariaDB Command Line Client, you can list the restored databases and tables. |
- | + | Example: Listing the tables in the database using **show tables** | |
- | + | ||
- | 9. Using MariaDB Command Line Client, you can list the restored databases and tables. | + | <code> |
- | Example: Listing the tables in the database using show tables | + | |
MariaDB [(none)]> show databases; | MariaDB [(none)]> show databases; | ||
+--------------------+ | +--------------------+ | ||
Line 121: | Line 130: | ||
MariaDB [(none)]> | MariaDB [(none)]> | ||
- | + | </code> | |
+ | |||
+ | ===== 2). Manual MariaDB Database Restore ===== | ||
+ | ---- | ||
- | 7.3 Manual MariaDB Database Restore | ||
To restore the MariaDB databases from your storage destination to a location on disk and manually recover the databases. | To restore the MariaDB databases from your storage destination to a location on disk and manually recover the databases. | ||
- | 1. In the AhsayOBM main interface, click the Restore icon. | + | |
+ | 1. In the CloudBacko Pro's main interface, click the Restore icon. | ||
+ | |||
+ | {{public:module:mariadb_database:image118.png}} | ||
- | 2. Select the backup set that you would like to restore the MariaDB Database from. | + | 2. Select the backup set that you would like to restore the MariaDB Database from. |
+ | |||
+ | | {{public:module:mariadb_database:image132.png?800}} | | ||
+ | 3. Select the storage destination that contains the MariaDB databases that you would like to restore from. | ||
+ | |||
+ | | {{public:module:mariadb_database:image122.png?800}} | | ||
- | 3. Select the storage destination that contains the MariaDB databases that you would like to restore from. | + | 4. Select to restore the MariaDB database(s) from a specific backup job then select the files or folders that you would like to restore and select the **Restore raw file** option. Click **Next** to proceed. |
- | + | ||
- | 4. Select to restore the MariaDB database(s) from a specific backup job then select the files or folders that you would like to restore and select the Restore raw file option. Click Next to proceed. | + | |
- | + | ||
+ | | {{public:module:mariadb_database:image134.png?800}} | | ||
+ | 5. Select the location on the local machine you wish to restore the MariaDB database files to. Click **Next** to proceed. | ||
+ | | {{public:module:mariadb_database:image136.png?800}} | | ||
+ | |||
+ | 6. Confirm the temporary directory path is correct and then click **Restore** to proceed. | ||
+ | | {{public:module:mariadb_database:image138.png?800}} | | ||
+ | |||
+ | 7. After the MariaDB database(s) has been restored. | ||
- | 5. Select the location on the local machine you wish to restore the MariaDB database files to. Click Next to proceed. | + | | {{public:module:mariadb_database:image140.png?800}} | |
- | 6. Confirm the temporary directory path is correct and then click Restore to proceed. | + | |
- | + | 8. Check the location on the local machine to verify the MariaDB database files have been restored. | |
- | 7. After the MariaDB database(s) has been restored. | + | |
- | + | ||
- | 8. Check the location on the local machine to verify the MariaDB database files have been restored. | + | |
Example: Using Windows File Explorer | Example: Using Windows File Explorer | ||
- | + | ||
- | 7.3.1 Recovering MariaDB Databases | + | | {{public:module:mariadb_database:image142.png?800}} | |
- | 1. Login to MariaDB Server using MariaDB Command Line Client and verify the database instance is running. | + | |
+ | |||
+ | 9. Recovering MariaDB Databases | ||
+ | |||
+ | <WRAP indent> | ||
+ | |||
+ | 9.1. Login to MariaDB Server using MariaDB Command Line Client and verify the database instance is running. | ||
+ | <code> | ||
Enter password: ****** | Enter password: ****** | ||
Welcome to the MariaDB monitor. Commands end with ; or \g. | Welcome to the MariaDB monitor. Commands end with ; or \g. | ||
Line 170: | Line 198: | ||
MariaDB [(none)]> | MariaDB [(none)]> | ||
- | 2. Create the database names that need to be recovered. | + | </code> |
+ | |||
+ | 9.2. Create the database names that need to be recovered. | ||
Example: chinook, nation, and sportdb. | Example: chinook, nation, and sportdb. | ||
+ | |||
+ | <code> | ||
MariaDB [(none)]> create database chinook; | MariaDB [(none)]> create database chinook; | ||
Query OK, 1 row affected (0.003 sec) | Query OK, 1 row affected (0.003 sec) | ||
Line 180: | Line 213: | ||
MariaDB [(none)]> create database sportdb; | MariaDB [(none)]> create database sportdb; | ||
Query OK, 1 row affected (0.003 sec) | Query OK, 1 row affected (0.003 sec) | ||
- | 3. Recover Databases | + | </code> |
+ | |||
+ | 9.3. Recover Databases | ||
Repeat the following steps for all databases you wish to restore. | Repeat the following steps for all databases you wish to restore. | ||
+ | |||
+ | <code> | ||
MariaDB [(none)]> use chinook; | MariaDB [(none)]> use chinook; | ||
Database changed | Database changed | ||
Line 206: | Line 244: | ||
Query OK, 4079 rows affected (0.03 sec) | Query OK, 4079 rows affected (0.03 sec) | ||
Records: 4079 Duplicates: 0 Warnings: 0 | Records: 4079 Duplicates: 0 Warnings: 0 | ||
+ | </code> | ||
- | 4. Check the database status | + | 9.4. Check the database status |
- | Example: Listing the tables in the database using show tables | + | |
+ | Example: Listing the tables in the database using **show tables** | ||
+ | |||
+ | <code> | ||
MariaDB [(none)]> show databases; | MariaDB [(none)]> show databases; | ||
+--------------------+ | +--------------------+ | ||
Line 514: | Line 556: | ||
+---------------------------------------+ | +---------------------------------------+ | ||
124 rows in set (0.004 sec) | 124 rows in set (0.004 sec) | ||
+ | </code> | ||
+ | </WRAP> | ||
- | 7.4 Automatic MariaDB Database Restore (Alternative Location) | + | ===== 3). Automatic MariaDB Database Restore (Alternative Location) ===== |
- | 1. Login to MariaDB Server using MariaDB Command Line Client and verify the database instance is running. | + | ---- |
+ | |||
+ | 1. Login to MariaDB Server using MariaDB Command Line Client and verify the database instance is running. | ||
+ | |||
+ | <code> | ||
Enter password: ****** | Enter password: ****** | ||
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 90 | Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 90 | ||
Line 544: | Line 592: | ||
MariaDB [(none)]> | MariaDB [(none)]> | ||
+ | </code> | ||
- | 2. In the AhsayOBM main interface, click the Restore icon. | + | 2. In the CloudBacko Pro's main interface, click the Restore icon. |
+ | |||
+ | | {{public:module:mariadb_database:image118.png}} | | ||
+ | 3. Select the backup set that you would like to restore the MariaDB Database from. | ||
+ | |||
+ | | {{public:module:mariadb_database:image146.png?800}} | | ||
- | 3. Select the backup set that you would like to restore the MariaDB Database from. | + | 4. Select the storage destination that contains the MariaDB databases that you would like to restore from. |
- | + | ||
- | 4. Select the storage destination that contains the MariaDB databases that you would like to restore from. | + | |
- | + | ||
+ | | {{public:module:mariadb_database:image148.png?800}} | | ||
+ | 5. Select to restore the MariaDB node from a specific backup job then select the files or folders that you would like to restore. Click **Next** to proceed. | ||
- | 5. Select to restore the MariaDB node from a specific backup job then select the files or folders that you would like to restore. Click Next to proceed. | + | | {{public:module:mariadb_database:image150.png?800}} | |
- | NOTE | + | <WRAP info> |
To restore to either original or alternate location please unselect the MariaDB data node and only select the databases only. | To restore to either original or alternate location please unselect the MariaDB data node and only select the databases only. | ||
- | 6. Select to restore the MariaDB Databases to the alternate location and click Next to proceed. | + | </WRAP> |
+ | |||
+ | 6. Select to restore the MariaDB Databases to the alternate location and click **Next** to proceed. | ||
+ | |||
+ | | {{public:module:mariadb_database:image152.png?800}} | | ||
+ | 7. Confirm the MariaDB database details such as Database name, Host, Port, Username, and Password. | ||
+ | Example: To restore and clone a copy of the **chinook** database on the original server with new name **chinook_clone**. | ||
+ | | {{public:module:mariadb_database:image154.png?800}} | | ||
+ | |||
+ | 8. Confirm the temporary directory path is correct and then click **Restore** to proceed. | ||
- | 7. Confirm the MariaDB database details such as Database name, Host, Port, Username, and Password. | + | | {{public:module:mariadb_database:image156.png?800}} | |
- | Example: To restore and clone a copy of the chinook database on the original server with new name chinook_clone. | + | |
- | 8. Confirm the temporary directory path is correct and then click Restore to proceed. | + | 9. After the MariaDB database(s) has been restored. |
+ | |||
+ | | {{public:module:mariadb_database:image158.png?800}} | | ||
+ | 10. Using MariaDB Command Line Client, you can list the restored databases and tables. | ||
+ | Example: Listing the tables in the restore cloned database using **show tables** | ||
- | 9. After the MariaDB database(s) has been restored. | + | <code> |
- | + | ||
- | 10. Using MariaDB Command Line Client, you can list the restored databases and tables. | + | |
- | Example: Listing the tables in the restore cloned database using show tables | + | |
MariaDB [(none)]> show databases; | MariaDB [(none)]> show databases; | ||
+--------------------+ | +--------------------+ | ||
Line 607: | Line 669: | ||
+-------------------------+ | +-------------------------+ | ||
11 rows in set (0.001 sec) | 11 rows in set (0.001 sec) | ||
+ | </code> | ||