exclude the performance_schema
authorHeiko Schlittermann (JUMPER) <hs@schlittermann.de>
Thu, 23 Jan 2014 14:43:50 +0100
changeset 15 0d0715b661f7
parent 14 bbacf6d77c19
child 16 19bb271f9339
child 17 f6a45bd7986f
exclude the performance_schema
mydump
--- a/mydump	Thu Jan 23 13:00:40 2014 +0100
+++ b/mydump	Thu Jan 23 14:43:50 2014 +0100
@@ -1,4 +1,5 @@
 #! /bin/bash
+# (c) 2014 Heiko Schlittermann <hs@schlittermann.de>
 
 DIR=~backup/mysql
 
@@ -21,8 +22,8 @@
 mysql --skip-column-names --batch -e 'show databases' | while read db
 do
 	# skip lost+found and other
-	[[ "$db" =~ '+' ]] && continue
-	[[ "$db" =~ 'information_schema' ]] && continue
+	[[ $db =~ '+' ]] && continue
+	[[ $db =~ (performance|information)_schema ]] && continue
 
 	# dump the rest
 	out=$DIR/$db.sql.xz