X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=vm_remote;h=f735ba9d479f5d9e44d700c390808f1d9933c19b;hp=64f57dfbe3e4e0bfe09a65a663a8378706c53fe2;hb=9f155a202d7b40a06d02ba92e5135dbd882f81c9;hpb=5682b99b1785d7a53ded1f3d0d1e0ab938f1efc6 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}