Huawei cloud server mysql data recovery process

Data recovery server environment to deploy and cause of the malfunction:

·
Huawei cloud ECS server, the server using linux operating system, database version 5.6 ,.
When performing a database update the test version, incorrectly sql script that should be executed in the test library to perform in the production library, resulting in part of the table is truncate,
while a small amount of data within the portion of the table is delete. Examples of data within the table are used as the default innodb storage engine.
·

Data recovery needs:

·

Restore truncat Table 8 and Table 4 are of small amounts of data to be delete.
·

Server data recovery process:

·
1. partition backup
. ·
Because there are other business is still running in the client ECS
is guaranteed to be truncate table underlying data is not destroyed first to mysql data directory where the partition backup.
Huawei cloud server mysql data recovery process
·
2. Get database fragmentation
·
Due to the large field types and values myisam engine table does not exist in the customer table 12 needs to be restored,
in order to save data transfer time, and download the necessary databases to obtain recovery period pieces by scanning the data segment.
Further innodb engine data recovery must rely on the table structure information, the configuration information table mysql stored in .frm file name correspondence table.
Frm file recovery intact in this case, can be used directly. Download the need to restore the table corresponding frm file.
Huawei cloud server mysql data recovery process
·
3. Analysis of system tables.
·
Read data segment within the system table information, access needs to be restored 12 table registration information in the system tables.
·
4. Restore the truncate table.
·
Extraction data table corresponding to each page in the data segment file download is complete,
parsing frm file correspondence table acquired configuration information to the table the table.
The allocation rule of the underlying data acquired by the table structure information.
·
The delete data table is restored,
*
the basic flow with recovery truncate table,
need to be extracted is marked as recorded "delete" is different in that the data analysis.
·
6. Data reduction.
·
The example of the table created by parsing mysql table structure information in the recovery environment,
and the recovered data import
Huawei cloud server mysql data recovery process

·
7. data cleansing.
·
Since the grab from the bottom of the primary key of the record may exist without recording repeating and unique distortion and the like,
the extracted abnormal records may need to be handled manually.
*
8. The data validation.
·
Open Remote Desktop, data validation is correct, the amount of data is normal by the customer.
Customer-proven, truncate table full recovery, delete table records the complete recovery, data recovery process is completed.

Guess you like

Origin blog.51cto.com/sun510/2478035