Simple, but working o.k.
#!/bin/bash
BDIR="/home/backup/mysql"
#DATAPATH=`date +%m%d%Y%H%M%S`
# Run backup
/usr/bin/innobackupex --user=root --password=MEGASECUREPASSWORD --slave-info $BDIR
LASTBACKUP=`ls -1 -t $BDIR | head -n 1`
/usr/bin/innobackupex --user=root --password=MEGASECUREPASSWORD --apply-log $BDIR/$LASTBACKUP
BDIR="/home/backup/mysql"
#DATAPATH=`date +%m%d%Y%H%M%S`
# Run backup
/usr/bin/innobackupex --user=root --password=MEGASECUREPASSWORD --slave-info $BDIR
LASTBACKUP=`ls -1 -t $BDIR | head -n 1`
/usr/bin/innobackupex --user=root --password=MEGASECUREPASSWORD --apply-log $BDIR/$LASTBACKUP
0 Comments.