~stewart/percona-xtrabackup/test-combinations

« back to all changes in this revision

Viewing changes to test/t/server_version.sh

  • Committer: Alexey Kopytov
  • Date: 2013-05-17 16:13:00 UTC
  • mfrom: (603.2.8 xtrabackup-2.1.2)
  • Revision ID: akopytov@gmail.com-20130517161300-33xuaf82smu5n876
MergedĀ lp:~percona-core/percona-xtrabackup/release-2.1.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#########################################################################
 
2
# Test server version auto-detection
 
3
#########################################################################
 
4
 
 
5
. inc/common.sh
 
6
 
 
7
# This test can only work when the xtrabackup binary autodetected by
 
8
# innobackupex matches the binary built for this configuration, i.e. with
 
9
# XB_BUILD=(xtradb51|xtradb55|xtradb56|innodb56)
 
10
 
 
11
case "$XB_BUILD" in
 
12
    "xtradb51" | "xtradb55" | "xtradb56" | "innodb56")
 
13
        ;;
 
14
    *)
 
15
        echo "Requires (xtradb51|xtradb55|xtradb56|innodb56) \
 
16
build configuration" >> $SKIPPED_REASON
 
17
        exit $SKIPPED_EXIT_CODE
 
18
        ;;
 
19
esac
 
20
 
 
21
start_server
 
22
 
 
23
# Remove the explicit --ibbackup option from IB_ARGS
 
24
IB_ARGS="--defaults-file=$MYSQLD_VARDIR/my.cnf"
 
25
 
 
26
backup_dir=$topdir/backup
 
27
innobackupex --no-timestamp $backup_dir
 
28
vlog "Backup created in directory $backup_dir"
 
29
 
 
30
stop_server
 
31
# Remove datadir
 
32
rm -r $mysql_datadir
 
33
# Restore sakila
 
34
vlog "Applying log"
 
35
vlog "###########"
 
36
vlog "# PREPARE #"
 
37
vlog "###########"
 
38
innobackupex --apply-log $backup_dir
 
39
vlog "Restoring MySQL datadir"
 
40
mkdir -p $mysql_datadir
 
41
vlog "###########"
 
42
vlog "# RESTORE #"
 
43
vlog "###########"
 
44
innobackupex --copy-back $backup_dir
 
45
 
 
46
start_server