NOTE _ mysql

Source: Internet
Author: User
Note bitsCN.com when backing up a mysql database

Pay attention to the cold backup of mysql database

Cold backup means that when the database is shut down normally, it will provide us with a complete database. Cold backup is a way to copy key files to another location.

Advantages: www.bitsCN.com

1. it is a very fast backup method (just copy files)

2. easy to archive (simple copy)

3. easy recovery to a certain point in time (you only need to copy the file back)

4. it can be combined with the archiving method to restore the database to the "latest state.

5. low maintenance and high security.

However, cold backup also has the following shortcomings:

1. when used separately, only recovery at a certain time point can be provided.

2. during the entire backup process, the database must be backed up instead of other work. That is to say, in the cold backup process, the database must be closed.

3. if the disk space is limited, it can only be copied to tape and other external storage devices, and the speed will be very slow.

4. data cannot be restored by table or by user.

I started the service for mysql from the server today and found the problem. because the master server has a large data volume, I used cold backup to directly cp to the slave server. I reported the following error when I restarted the mysql server:

130307 9:21:44 InnoDB: Error: page 2328 log sequence number 73 1311259268

InnoDB: is in the future! The Current system log sequence number 73 815920160.

InnoDB: Your database may be created UPT or you may have copied the InnoDB

InnoDB: tablespace but not the InnoDB log files. See

InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html

InnoDB: for more information.

Find the information and find out that during cold backup, the data table must be backed up using the InnoDB storage engine ib_logfile0 ib_logfile1. This file is used to store the transaction log information of the InnoDB engine.

Directly copy the above files to the slave server to start the service normally.

BitsCN.com

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.