mysql5.7 centos7 xtrabackup步骤
mysql5.7 centos7 xtrabackup步骤 wget https://downloads.percona.com/downloads/Percona-XtraBackup-2.4/Percona-XtraBackup-2.4.28/binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.28-1.el7.x86_64.rpm yum install cmake gcc gcc-c++ libaio libaio-devel automake autoconf bzr yum -y install perl perl-devel libaio libaio-devel perl-Time-HiRes perl-DBD-MySQL perl-Digest-MD5 yum -y install libev
脚本
#!/bin/bash TODAY=`date +%Y%m%d` last_week=`date --date="$d3-7 day" +%Y-%m-%d` #cd /home/bak cd /airflow/mysqlbak #nohup innobackupex --defaults-file=/data/mysql_3306_bi/my.cnf --user=root --password=*** /home/bak 2>&1 & nohup innobackupex --defaults-file=/etc/my.cnf --user=root --password="0" /airflow/mysqlbak 2>&1 & mv nohup.out ${TODAY}.out rm -rf /home/bak/${last_week}*
0 2 * * * source /etc/profile ; /bin/bash -x /root/scripts/bak.sh >> /tmp/bak.log