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