+#!/bin/sh -eu
+tool=$(readlink -e "${0%/*}/..")
+. "$tool"/remote/lib.sh
+
+mkdir -p "$tool"/var/backup/mysql
+"$tool"/remote/ssh -l backup '
+ for db in $(sudo -u backup mysql -u backup --skip-column-names <<-EOF
+ SELECT schema_name
+ FROM information_schema.schemata
+ WHERE schema_name NOT IN ("information_schema", "performance_schema");
+ EOF
+ ); do
+ echo $db
+ done
+ '