#!/bin/sh -ex ( PATH=$PATH:/usr/local/mysql/bin:/opt/mysql/meb-3.5/bin/ BASE=$HOME/bug59623 mkdir -p $BASE/full $BASE/incr # Create a test database mysql -uroot <&1 | tee full.txt FULLDIR=`awk '/^mysqlbackup: Created backup directory/ { print $5 }' < full.txt | sed "s/'//g"` FULLLSN=`awk '/^ibbackup: Scanned log up to lsn / { print $7 }' < full.txt | sed 's/[^0-9]*//g'` rm -f $BASE/full/latest ln -s $FULLDIR $BASE/full/latest # Drop our test database mysql -uroot <&1 | tee incr.txt INCRDIR=`awk '/^mysqlbackup: Created backup directory/ { print $5 }' < incr.txt | sed "s/'//g"` rm -f $BASE/incr/latest ln -s $INCRDIR $BASE/incr/latest # Apply the logs to the full backup mysqlbackup --user=root --ibbackup=/opt/mysql/meb-3.5/bin/ibbackup \ --apply-log --uncompress /etc/my.cnf $FULLDIR # Apply the logs to the incremental backup #gdb --args \ mysqlbackup --user=root --ibbackup=/opt/mysql/meb-3.5/bin/ibbackup \ --apply-log --uncompress --incremental $INCRDIR/backup-my.cnf $FULLDIR/backup-my.cnf ) 2>&1 | tee $0.log