1.全备
mysqldump -u root -padmin --single-transaction --events --triggers --routines --all-databases > all-databases-`date +%F`.sql2.全备还原source all-databases-`date +%F`.sql3.分库备mysqldump -u root -padmin --single-transaction --events --triggers --routines --databases test > test-database-`date +%F`4.分库还原source test-database-`date +%F`.sql5.分表备mysqldump -u root -padmin --single-transaction --events --triggers --routines test a > test-a-`date +%F`.sql6.分表还原source test-a-`date +%F`.sql