MySQL backup and recovery series --MySQL

MYSQL backup and restore
backup: copy
RAID1, RAID10: to ensure that hardware damage without service interruption;
backup and restore: You can ensure that data is lost due to a logic error caused by
the type of backup:
Hot Backup: reading and writing unaffected
warm backup: you can only perform a read operation
cold backup: offline backup, read and write operations are suspended

Logical and physical backup backup
physical backup: copying data files
logical backup: exporting the data to a text file

Full backup, incremental backup and differential backup
What backup:
data, configuration files, binary logs, transaction logs,
master-slave server architecture

Physical backup: Fast
Logical backup: slow, loss of precision floating point: using text processing tools to facilitate processing them directly, may be strong portability;

Backup strategy: Full + incremental differences fully +
MYSQL backup tool:
the mysqldump: logical backup tool, MyISAM (temperature), the InnoDB (hot backup)
mysqlhotcopy works: physical backup tools, warm backup
file system tools:
CP: cold standby
LV: Logic volume snapshot capability, almost hot standby;
FLUSH TABLES;
lOCK TABLES
create a snapshot, release the lock, and then copy the data
of the third set of tools:
ibbackup: business tools
xtrabackup: open source tools
MYSQL backup tool Compare
MySQL backup and recovery series --MySQL

mysqldump: logical backup
the mysqldump (full backup) + log binary
full + incremental
backup of a single database or a single database table
the mysqldump the DB_NAME [TB1] [TB2]
the mysqldump --master-Data = {0 |. 1 | 2}
0: no the recording binary log files and path position
1: in a manner cHNAGE MASTER tO recording position to start directly from the server can be used to restore the
2: in a manner cHNAGE MASTER tO recording position, but the default is annotated;
--lock-All-Tables : lock all tables
--flush-logs: the flush execution log;
if the specified library table types are InnoDB, --single-transaction may be used to start hot backup;
backup plurality of libraries:
--all-Databases: Back up all libraries
--datebases DB_NAME, DB_NAME, ... backup designated library
--events event
--routines stored procedures, stored functions
--triggers trigger

FLUSH TABLES WITH READ LOCK; refresh the table and use a read lock
MySQL backup and recovery series --MySQL

Backup strategy: + full circumferential incremental daily
full backup: the mysqldump
incremental backup: backup binary log files (flush logs)
Binary Log:
SET = SQL_LOG_BIN. 1. 1 = 0 = OFF the ON

Guess you like

Origin blog.51cto.com/14087650/2426233