Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ Defines the maximum SQL statement size for the backup dump script. The default v

##### `optional_args`

Specifies an array of optional arguments which should be passed through to the backup tool. (Currently only supported by the xtrabackup provider.)
Specifies an array of optional arguments which should be passed through to the backup tool. (Supported by the xtrabackup and mysqldump providers.)

#### mysql::server::monitor

Expand Down
11 changes: 11 additions & 0 deletions templates/mysqlbackup.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ echo "[client]\npassword=$PASS\nuser=$USER\nmax_allowed_packet=$MAX_ALLOWED_PACK
echo -e "[client]\npassword=$PASS\nuser=$USER\nmax_allowed_packet=$MAX_ALLOWED_PACKET" > $TMPFILE
<%- end -%>

<% if @prescript -%>
<%- [@prescript].flatten.compact.each do |script|%>
<%= script %>
<%- end -%>
<% end -%>

# Ensure backup directory exist.
mkdir -p $DIR
Expand All @@ -54,6 +59,12 @@ ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS --skip-routines"
<% end -%>
<% end -%>

<%- if @optional_args and @optional_args.is_a?(Array) -%>
<%- @optional_args.each do |arg| -%>
ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS <%= arg %>"
<%- end -%>
<%- end -%>

##### STOP CONFIG ####################################################
PATH=<%= @execpath %>

Expand Down