From 9f155a202d7b40a06d02ba92e5135dbd882f81c9 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 19 Apr 2013 05:31:56 +0200 Subject: [PATCH] Ajout : vm_remote : rule_mysql_backup . --- vm_remote | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vm_remote b/vm_remote index 64f57df..f735ba9 100755 --- a/vm_remote +++ b/vm_remote @@ -135,6 +135,19 @@ rule__runit_sv_configure () { # SYNTAX: $sv $configure_options . "$tool"/etc/sv/"$sv"/remote.sh || return 1 ) } +rule_mysql_backup () { + mkdir -p "$tool"/var/backup/mysql + rule ssh -l root ' + for db in $(sudo -u mysql mysql -u mysql --skip-column-names <<-EOF + SELECT schema_name + FROM information_schema.schemata + WHERE schema_name NOT IN ("information_schema", "performance_schema"); + EOF + ); do + $db + done + ' + } rule=${1:-help} ${1+shift} -- 2.20.1