WIKI system downtime recovery: Because the WIKI system is a virtual machine environment, you can use the image to restore the system when a problem occurs. Moreover, the failure rate of the virtual machine environment is low. Mysql database downtime recovery: mysql incremental recovery prerequisites: * Enabled
WIKI system downtime recovery: Because the WIKI system is a virtual machine environment, you can use the image to restore the system when a problem occurs. Moreover, the failure rate of the virtual machine environment is low. Mysql database downtime recovery: mysql incremental recovery prerequisites: * Enabled
WIKI
Tip: if multiple databases exist:
2) resume full backup in the early morning
Start recovery. First, reply to full backup in the early morning, And then restore all incremental data from the full backup to the problem.
Decompress the full backup file
[Root @ lampbackup] # gzip-d mysql_backup_2013-06-16. SQL .gz
Start full Backup Recovery
[Root @ lampbackup] # mysql-uroot-p 'oldboy '-S/data/3306/mysql. sock
[Root @ lampbackup] # mysql-uroot-p 'oldboy '-S/data/3306/mysql. sock-e "showdatabases ;"
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| Baozi |
| Chengcai |
| Haole |
| Lalala |
| Mysql |
| Oldboy |
| Test |
| Xiaobao |
+ -------------------- +
[Root @ lampbackup] # mysql-uroot-p 'oldboy '-S/data/3306/mysql. sock-e "set namesgbk; select * from oldboy. student ;"
+ ----- + ----------- + ------ + -------------------- +
| Sno | Sname | Ssex | Sage | Sdept |
+ ----- + ----------- + ------ + -------------------- +
| 1 | ???? | ?? | 24 | ????? Ú ???? |
| 2 | elain | ?? | 26 | computer applica |
| 3 | xiaozhang | ?? | 28 | ??? Why ??? Í |
| 4 | jeacen | ?? | 20 | computer applica |
| 5 | ???? | ?? | 29 | ????? Ú ??? §?????? |
+ ----- + ----------- + ------ + -------------------- +
3) Restore Incremental Backup
Then we will restore full backup and Incremental Backup:
[Root @ lampbackup] # mysql-uroot-p 'oldboy '-S/data/3306/mysql. sock
[Root @ lampbackup] # mysql-uroot-p 'oldboy '-S/data/3306/mysql. sock
+ ----- + ----------- + ------ + -------------------- +
| Sno | Sname | Ssex | Sage | Sdept |
+ ----- + ----------- + ------ + -------------------- +
| 1 | ???? | ?? | 24 | ????? Ú ???? |
| 2 | elain | ?? | 26 | computer applica |
| 3 | xiaozhang | ?? | 28 | ??? Why ??? Í |
| 4 | jeacen | ?? | 20 | computer applica |
| 5 | ???? | ?? | 29 | ????? Ú ??? §?????? |
| 6 | xiaobao | ma | 29 | computer |
+ ----- + ----------- + ------ + -------------------- +
Now we have restored the full backup data from to the time when the problem occurred.
Note: you must follow the steps to extract the latest binlog. Minimize data loss. Ensure data integrity.
This article is from the "attack wave" blog. Please keep this source