module-puppetlabs-mysql/templates/xtrabackup.sh.erb
David Danzilio a7a5c66bc4 Add support for postscript for xtrabackup provider
This commit implements the 'postscript' functionality for the xtrabackup
provider. It also adds a 'prescript' option to be executed before a
backup.
2015-08-05 16:15:25 -04:00

21 lines
360 B
Text

<%- if @kernel == 'Linux' -%>
#!/bin/bash
<%- else -%>
#!/bin/sh
<%- end -%>
#
# A wrapper for Xtrabackup
#
<% if @prescript -%>
<%- [@prescript].flatten.compact.each do |script| %>
<%= script %>
<%- end -%>
<% end -%>
innobackupex "$@"
<% if @postscript -%>
<%- [@postscript].flatten.compact.each do |script| %>
<%= script %>
<%- end -%>
<% end -%>