A机:
全备
innobackupex --defaults-file=/etc/my.cnf --no-timestamp --user=root --password=google123 /backup/full
增量
innobackupex --defaults-file=/etc/my.cnf --no-timestamp --user=root --password=google123 --incremental --incremental-basedir=/backup/full /backup/inc1
B机:
还原:
innobackupex /backup/full --apply-log
innobackupex /backup/full --incremental --incremental-dir=/backup/inc1 --apply-log
/etc/init.d/mysql stop
rm -rf /usr/local/mysql/data/ib*
cp -r test_innodb/ /usr/local/mysql/data/
cp -r ib* /usr/local/mysql/data/
chown -R mysql /usr/local/mysql/data
chgrp -R mysql /usr/local/mysql/.
/etc/init.d/mysql start
阅读(787) | 评论(0) | 转发(0) |