]> gerrit.simantics Code Review - simantics/platform.git/blob - releng/doc/dump-mysql-db.sh
Fix NPE in Export Core
[simantics/platform.git] / releng / doc / dump-mysql-db.sh
1 #!/bin/bash
2
3 major=$1
4 minor=$2
5 service=$3
6 wikidb=$4
7 wikidbusr=$5
8
9 srcdb=${wikidb}
10 srcdbusr=${wikidbusr}
11 tgtdb=${wikidb}_${major}_${minor}_${service}
12
13 echo "Dumping database ${srcdb} to ${tgtdb} as user ${srcdbusr}"
14 echo "Press enter to continue or C-c to cancel"
15 read foo
16
17 echo "Dumping $srcdb"
18 mysqldump -u ${srcdbusr} -p ${srcdb} > ${tgtdb}.dump