NetBackup™ Web UI MySQL Administrator's Guide
- Overview
- Managing MySQL instances and databases
- Managing MySQL environment credentials
- Protecting MySQL instances and databases
- Restoring MySQL instances and databases
- Troubleshooting MySQL operations
- API for MySQL instances and databases
Steps to perform recovery after restore operation
The procedure to perform post recovery is as follows for various platforms:
For Windows (VSS):
- Go to Control Panel > System and Security > Administrative Tools >Services.
- Select MySQL service and stop it.
- Delete or move everything from MySQL data directory.
Note:
Post restore, change the attributes of the restored data directory and files by using the following command.
attrib -S <restore_path>/*.* /S /D
- Copy all the contents of restored data directory to MySQL data directory.
- Delete all the temporary files from data directory.
For example:
C:\ProgramData\MySQL\MySQL Server 8.0\Data\#innodb_temp
.Delete
undo_00x
files from following data directory:\ProgramData\MySQL\MySQL Server 8.0\
For example:
C:\ProgramData\MySQL\MySQL Server 8.0\undo_001
- Start MySQL service.
For Linux (LVM):
- Stop MySQL services.
- Copy all the contents of restored data directory to MySQL data directory.
- Change ownership of MySQL data directory.
For example:
chown -R mysql:mysql <full/path/of/MySQL/Data/Dir>
- Start the MySQL service.
Recover MySQL database using the mysqldump utility.
Below are examples of Netbackup commands which are used mostly in Windows and Linux platform.
For Windows:
mysql --host=localhost --user=root --port=3306 -p netbackup < C:\mysql_dump_testjune13\mysqlBackup_Dump_xxx.sqlx
For Linux:
mysql --host=localhost --user=root --port=3306 -p netbackup < /home/Single_DB_Recovery/mysqlBackup_Dump_1656932006.sqlx
The example commands below will create a single dump file containing all the databases.
For Windows:
mysql --host=localhost --user=root --port=3306 -p < C:\mysql_dump_testjune13\mysqlBackup_Dump_xxx.sqlx
For Linux:
mysql --host=localhost --user=root --port=3306 -p < /home/Entire_Instance_Recovery/mysqlBackup_Dump_1656933025.sqlx