WIKI system and MysQL database recovery documentation

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.