Percona Xtrabackup MySQL full backup [plain] #! /Bin/sh BACKUP_TIME = 'date + % Y-% m-% d-% H-% M-% s' BACKUP_SOCK =/tmp/mysql3306.sock BACKUP_CNF =/etc/my3306.cnf BACKUP_USER = user BACKUP_PWD = 123456 BACKUP_DB = employees BACKUP_DIR =/data/backup/mysql/backup3306/BAK =$ {BACKUP_DIR }$ {BACKUP_DB }_ {BACKUP_TIME} INNOBACKUPEX =/opt/soft /xtrabackup-1.6.6/innobackupex $ {INNOBACKUPEX} -- defaults-file =$ {BACKUP_CNF} -- socket =$ {BACKUP_SOCK} -- user =$ {BACKUP_USER} -- password =$ {BACKUP_PWD} $ {BAK} -- no-timestamp # $ {INNOBACKUPEX} -- defaults-file =$ {BACKUP_CNF} -- socket =$ {BACKUP_SOCK} -- user =$ {BACKUP_USER} -- password =$ {BACKUP_PWD} $ {BAK} -- no-timestamp -- stream = tar> too many bak0000.tar #$ {INNOBACKUPEX} -- defaults-file =$ {BACKUP_CNF} -- apply-log -- use-memory = 4G $ {BAK} cd $ {BACKUP_DIR} tar zcf zookeeper backup_db1__zookeeper backup_time=.tar.gz $ {BACKUP_DB }_ {BACKUP_TIME} rm-rf $ {BACKUP_DB }_ {BACKUP_TIME}