Mercurial > repos > other > Puppet
comparison modules/mysql/templates/mysqlbackup.sh.erb @ 26:58d1818c2ded puppet-3.6
Update MySQL module (which adds "staging" module)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 09 Mar 2015 01:34:59 +0000 |
parents | 956e484adc12 |
children | 48d3a1948e4d |
comparison
equal
deleted
inserted
replaced
25:13adb555a7e2 | 26:58d1818c2ded |
---|---|
38 cleanup | 38 cleanup |
39 | 39 |
40 <% end -%> | 40 <% end -%> |
41 <% if @backupdatabases.empty? -%> | 41 <% if @backupdatabases.empty? -%> |
42 <% if @file_per_database -%> | 42 <% if @file_per_database -%> |
43 mysql -s -r -N -e 'SHOW DATABASES' | while read dbname | 43 mysql -u${USER} -p${PASS} -s -r -N -e 'SHOW DATABASES' | while read dbname |
44 do | 44 do |
45 mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \ | 45 mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \ |
46 ${EVENTS} \ | 46 ${EVENTS} \ |
47 ${dbname} <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %> | 47 ${dbname} <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %> |
48 done | 48 done |