适合多引擎混合(例如:myisam与innodb混合)的备份命令如下:
mysqldump -A -R --triggers --master-data=2 --single-transaction |gzip >/opt/alL_$(date +%F).sql.gz
------ 使用mysqldump+binlog日志,故障模拟恢复
mysqldump -A -R --triggers --master-data=2 --single-transaction |gzip >/backup/alL_$(date +%F).sql.gz
head -30 all_2017-12-25.sql |grep "MASTER_LOG_POS="
-- CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000002', MASTER_LOG_POS=120;
mysqldump -A -R --triggers --single-transaction --master-data=2 -uroot -poldboy123|gzip >/backup/all_1225.sql.gz
-- Position to start replication or point-in-time recovery from --
-- CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000002', MASTER_LOG_POS=120;