mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
export.sh:
Automate snapshot creation process. Update "files internal to innobase" list.
This commit is contained in:
parent
9845358e36
commit
36a5c882d5
1 changed files with 30 additions and 7 deletions
37
export.sh
37
export.sh
|
@ -1,19 +1,29 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# export current working directory in a format suitable for sending to
|
||||
# MySQL as a snapshot.
|
||||
# export current working directory in a format suitable for sending to MySQL
|
||||
# as a snapshot. also generates the actual snapshot and sends it to MySQL.
|
||||
|
||||
set -eu
|
||||
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo "Usage: export.sh revision-number-of-last-snapshot"
|
||||
die () {
|
||||
echo $*
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# -ne 2 ] ; then
|
||||
die "Usage: export.sh revision-number-of-last-snapshot current-revision-number"
|
||||
fi
|
||||
|
||||
set +u
|
||||
if test -z $EDITOR; then
|
||||
die "\$EDITOR is not set"
|
||||
fi
|
||||
set -u
|
||||
|
||||
rm -rf to-mysql
|
||||
mkdir -p to-mysql/storage/
|
||||
svn log -v -r "$1:BASE" > to-mysql/log
|
||||
svn export . to-mysql/storage/innobase
|
||||
svn log -v -r "$(($1 + 1)):BASE" > to-mysql/log
|
||||
svn export -q . to-mysql/storage/innobase
|
||||
cd to-mysql
|
||||
|
||||
mkdir -p sql mysql-test/t mysql-test/r mysql-test/include
|
||||
|
@ -27,5 +37,18 @@ mv mysql-test/*.result ../../mysql-test/r
|
|||
mv mysql-test/*.inc ../../mysql-test/include
|
||||
rmdir mysql-test
|
||||
|
||||
rm setup.sh export.sh compile-innodb-debug
|
||||
rm setup.sh export.sh revert_gen.sh compile-innodb-debug compile-innodb
|
||||
|
||||
cd ../..
|
||||
$EDITOR log
|
||||
cd ..
|
||||
|
||||
fname="innodb-5.1-ss$2.tar.gz"
|
||||
|
||||
rm -f $fname
|
||||
tar czf $fname to-mysql
|
||||
scp $fname mysql:snapshots
|
||||
rm $fname
|
||||
rm -rf to-mysql
|
||||
|
||||
echo "Sent $fname to MySQL"
|
||||
|
|
Loading…
Add table
Reference in a new issue