#!/bin/bash
TARGETDIR=/BACKUP/mysql/fc_log
rm -fr ${TARGETDIR}/old
mv ${TARGETDIR}/lastest ${TARGETDIR}/old
/usr/bin/xtrabackup_55 --defaults-file=/etc/my.cnf --backup --host=127.0.0.1 --port=1233 --defaults-group=mysqld2 --datadir=/var/lib/mysql --target-dir=${TARGETDIR}/lastest
/usr/bin/rsync -avzu -e 'ssh -p 9922' /BACKUP/mysql/plot_main/lastest/* root@118.17.36.73:/var/lib/mysqlbak/${TIME} >/tmp/rsynclog 2>&1
Mysql压测工具mysqlslap 讲解
http://blog.csdn.net/heizistudio/article/details/9669029