
This patch add task for backing up pacemaker configuration and makes existing mysql backup task a bit more configurable. Change-Id: I67b1991daf617093ec59efea5062157d59106bd4
6 lines
641 B
Django/Jinja
6 lines
641 B
Django/Jinja
#!/bin/bash
|
|
|
|
mysql -uroot -p{{ mysql_root_password }} -s -N -e "select distinct table_schema from information_schema.tables where engine='innodb' and table_schema != 'mysql';" | xargs mysqldump -uroot -p{{ mysql_root_password }} --single-transaction --databases > {{ backup_tmp_dir }}/mysql/openstack-backup-mysql.sql
|
|
|
|
mysql -uroot -p{{ mysql_root_password }} -s -N -e "SELECT CONCAT('\"SHOW GRANTS FOR ''',user,'''@''',host,''';\"') FROM mysql.user where (length(user) > 0 and user NOT LIKE 'root')" | xargs -n1 mysql -uroot -p{{ mysql_root_password }} -s -N -e | sed 's/$/;/' > {{ backup_tmp_dir }}/mysql/openstack-backup-mysql-grants.sql
|