innobackupex version fix
Change-Id: I4149703da0328e527700410d3f052fcdb6920e6f
diff --git a/xtrabackup/files/innobackupex-client-restore.sh b/xtrabackup/files/innobackupex-client-restore.sh
index e8dd0f6..241706b 100644
--- a/xtrabackup/files/innobackupex-client-restore.sh
+++ b/xtrabackup/files/innobackupex-client-restore.sh
@@ -5,8 +5,6 @@
#
# usage example for incr backup restore: ./restore.sh /var/backups/mysql/xtrabackup/incr/2017-05-24_19-48-10/2017-05-24_19-55-35/
-INNOBACKUPEX=innobackupex-1.5.1
-INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
#TMPFILE="/var/log/backups/innobackupex-restore.$$.tmp"
TMPFILE="/var/log/backups/innobackupex-restore.log"
MYCNF=/etc/mysql/my.cnf
@@ -46,10 +44,6 @@
}
# Check options before proceeding
-if [ ! -x $INNOBACKUPEXFULL ]; then
- error "$INNOBACKUPEXFULL does not exist."
-fi
-
if [ -e $DBALREADYRESTORED ]; then
error "Databases already restored. If you want to restore again delete $DBALREADYRESTORED file and run the script again."
fi
@@ -188,13 +182,13 @@
echo
echo "Replay committed transactions on full backup"
- $INNOBACKUPEXFULL --defaults-file=$MYCNF --apply-log --redo-only --use-memory=$MEMORY $FULLBACKUP > $TMPFILE 2>&1
+ innobackupex --defaults-file=$MYCNF --apply-log --redo-only --use-memory=$MEMORY $FULLBACKUP > $TMPFILE 2>&1
check_innobackupex_error
# Apply incrementals to base backup
for i in `find $PARENT_DIR -mindepth 1 -maxdepth 1 -type d -printf "%P\n" | sort -n`; do
echo "Applying $i to full ..."
- $INNOBACKUPEXFULL --defaults-file=$MYCNF --apply-log --redo-only --use-memory=$MEMORY $FULLBACKUP --incremental-dir=$PARENT_DIR/$i > $TMPFILE 2>&1
+ innobackupex --defaults-file=$MYCNF --apply-log --redo-only --use-memory=$MEMORY $FULLBACKUP --incremental-dir=$PARENT_DIR/$i > $TMPFILE 2>&1
check_innobackupex_error
if [ $INCR = $i ]; then
@@ -207,12 +201,12 @@
fi
echo "Preparing ..."
-$INNOBACKUPEXFULL --defaults-file=$MYCNF --apply-log --use-memory=$MEMORY $FULLBACKUP > $TMPFILE 2>&1
+innobackupex --defaults-file=$MYCNF --apply-log --use-memory=$MEMORY $FULLBACKUP > $TMPFILE 2>&1
check_innobackupex_error
echo
echo "Restoring ..."
-$INNOBACKUPEXFULL --defaults-file=$MYCNF --copy-back $FULLBACKUP > $TMPFILE 2>&1
+innobackupex --defaults-file=$MYCNF --copy-back $FULLBACKUP > $TMPFILE 2>&1
check_innobackupex_error
chown -R mysql:mysql /var/lib/mysql
#rm -f $TMPFILE
diff --git a/xtrabackup/files/innobackupex-client-runner.sh b/xtrabackup/files/innobackupex-client-runner.sh
index 47e92aa..f8330b3 100644
--- a/xtrabackup/files/innobackupex-client-runner.sh
+++ b/xtrabackup/files/innobackupex-client-runner.sh
@@ -7,8 +7,6 @@
# Every time it runs will generate an incremental backup except for the first time (full backup).
# FULLBACKUPLIFE variable will define your full backups schedule.
-INNOBACKUPEX=innobackupex-1.5.1
-INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
USEROPTIONS="--user={{ client.database.user }} --password={{ client.database.password }}"
#TMPFILE="/var/log/backups/innobackupex-runner.$$.tmp"
LOGDIR=/var/log/backups
@@ -50,11 +48,7 @@
exit 1
}
-# Check options before proceeding
-if [ ! -x $INNOBACKUPEXFULL ]; then
- error "$INNOBACKUPEXFULL does not exist."
-fi
-
+# Check prerequisites before proceeding
if [ ! -d $BACKUPDIR ]; then
error "Backup destination folder: $BACKUPDIR does not exist."
fi
@@ -112,10 +106,10 @@
fi
echo "Running new incremental backup using $INCRBASEDIR as base."
- $INNOBACKUPEXFULL --defaults-file=$MYCNF $USEROPTIONS $compress $compression_threads --incremental $TMPINCRDIR --incremental-basedir $INCRBASEDIR > $TMPFILE 2>&1
+ innobackupex --defaults-file=$MYCNF $USEROPTIONS $compress $compression_threads --incremental $TMPINCRDIR --incremental-basedir $INCRBASEDIR > $TMPFILE 2>&1
else
echo "Running new full backup."
- $INNOBACKUPEXFULL --defaults-file=$MYCNF $USEROPTIONS $compress $compression_threads $FULLBACKUPDIR > $TMPFILE 2>&1
+ innobackupex --defaults-file=$MYCNF $USEROPTIONS $compress $compression_threads $FULLBACKUPDIR > $TMPFILE 2>&1
fi
if [ -z "`tail -1 $TMPFILE | grep 'completed OK!'`" ] ; then