Merge pull request #811 from pashamesh/fix-mysqlbackup-globals-ignored
Fixed global parameters skipped
This commit is contained in:
commit
906f99e1c1
1 changed files with 3 additions and 3 deletions
|
@ -70,18 +70,18 @@ cleanup
|
||||||
<% if @file_per_database -%>
|
<% if @file_per_database -%>
|
||||||
mysql --defaults-file=$TMPFILE -s -r -N -e 'SHOW DATABASES' | while read dbname
|
mysql --defaults-file=$TMPFILE -s -r -N -e 'SHOW DATABASES' | while read dbname
|
||||||
do
|
do
|
||||||
mysqldump --defaults-file=$TMPFILE --opt --flush-logs --single-transaction \
|
mysqldump --defaults-extra-file=$TMPFILE --opt --flush-logs --single-transaction \
|
||||||
${ADDITIONAL_OPTIONS} \
|
${ADDITIONAL_OPTIONS} \
|
||||||
${dbname} <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %>
|
${dbname} <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %>
|
||||||
done
|
done
|
||||||
<% else -%>
|
<% else -%>
|
||||||
mysqldump --defaults-file=$TMPFILE --opt --flush-logs --single-transaction \
|
mysqldump --defaults-extra-file=$TMPFILE --opt --flush-logs --single-transaction \
|
||||||
${ADDITIONAL_OPTIONS} \
|
${ADDITIONAL_OPTIONS} \
|
||||||
--all-databases <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %>
|
--all-databases <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% else -%>
|
<% else -%>
|
||||||
<% @backupdatabases.each do |db| -%>
|
<% @backupdatabases.each do |db| -%>
|
||||||
mysqldump --defaults-file=$TMPFILE --opt --flush-logs --single-transaction \
|
mysqldump --defaults-extra-file=$TMPFILE --opt --flush-logs --single-transaction \
|
||||||
${ADDITIONAL_OPTIONS} \
|
${ADDITIONAL_OPTIONS} \
|
||||||
<%= db %><% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}<%= db %>_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %>
|
<%= db %><% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}<%= db %>_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
Loading…
Reference in a new issue