#At file:///ext/mysql/bzr/mysql-5.1-meb-testing/ based on revid:rafal.somla@stripped
3454 Rafal Somla 2010-05-06
Adding restore part to the ibbackup example test.
@ mysql-test/include/have_meb.inc
Indenation.
@ mysql-test/suite/meb/examples/ibb_example.test
Adding the restore part to the ibbackup example.
modified:
mysql-test/include/have_meb.inc
mysql-test/suite/meb/examples/ibb_example.test
=== modified file 'mysql-test/include/have_meb.inc'
--- a/mysql-test/include/have_meb.inc 2010-05-05 15:04:57 +0000
+++ b/mysql-test/include/have_meb.inc 2010-05-06 11:31:14 +0000
@@ -6,7 +6,7 @@
--disable_query_log
if (`select '$IBBACKUP'='' OR '$INNOBACKUP'=''`)
{
---skip You must set IBBACKUP and INNOBACKUP variables to run this test.
+ --skip You must set IBBACKUP and INNOBACKUP variables to run this test.
}
--enable_query_log
=== modified file 'mysql-test/suite/meb/examples/ibb_example.test'
--- a/mysql-test/suite/meb/examples/ibb_example.test 2010-05-05 15:40:24 +0000
+++ b/mysql-test/suite/meb/examples/ibb_example.test 2010-05-06 11:31:14 +0000
@@ -14,14 +14,36 @@
--enable_query_log
--echo == Running ibbackup
---exec $IBBACKUP $SERVER_CNF $BACKUP_CNF
+--exec $IBBACKUP $SERVER_CNF $BACKUP_CNF 2>&1
--exec ls -l $BACKUP_DIR
--echo == Applying log
---exec $IBBACKUP --apply-log $BACKUP_CNF
+--exec $IBBACKUP --apply-log $BACKUP_CNF 2>&1
--exec ls -l $BACKUP_DIR
-# TODO: Add the restore part.
+--echo == Stopping server
+--source suite/meb/include/stop_mysqld.inc
+
+--echo == Putting restored data in server's data directory
+
+# First remove the old InnoDB files.
+--remove_files_wildcard $DATA_DIR ib*
+--exec ls -l $DATA_DIR
+
+# Now copy the restored files in their place.
+--perl
+ use lib "./lib"; # Access MTR perl modules
+ use My::File::Path 'copytree';
+ copytree($ENV{BACKUP_DIR},$ENV{DATA_DIR});
+EOF
+--exec ls -l $DATA_DIR
+
+--echo == Starting server again
+--source suite/meb/include/restart_mysqld.inc
+
+--echo == See that something have been restored
+SHOW DATABASES;
+SELECT count(*) FROM meb_extreme_db1.table1;
--echo == DONE ==
--source suite/meb/include/extreme_drop.inc
Attachment: [text/bzr-bundle] bzr/rafal.somla@sun.com-20100506113114-mpfb5ne71q1eewml.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (Rafal.Somla:3454) | Rafal Somla | 6 May |