File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 53
53
# @param maxallowedpacket
54
54
# Defines the maximum SQL statement size for the backup dump script. The default value is 1MB, as this is the default MySQL Server value.
55
55
# @param optional_args
56
- # Specifies an array of optional arguments which should be passed through to the backup tool. (Currently only supported by the xtrabackup provider .)
56
+ # Specifies an array of optional arguments which should be passed through to the backup tool. (Supported by the xtrabackup and mysqldump providers .)
57
57
#
58
58
class mysql::server::backup (
59
59
$backupuser = undef ,
Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ echo "[client]\npassword=$PASS\nuser=$USER\nmax_allowed_packet=$MAX_ALLOWED_PACK
28
28
echo -e "[client]\npassword=$PASS\nuser=$USER\nmax_allowed_packet=$MAX_ALLOWED_PACKET" > $TMPFILE
29
29
<%- end -%>
30
30
31
+ <% if @prescript -%>
32
+ <%- [ @prescript ] . flatten . compact . each do |script |%>
33
+ <%= script %>
34
+ <%- end -%>
35
+ <% end -%>
31
36
32
37
# Ensure backup directory exist.
33
38
mkdir -p $DIR
@@ -54,6 +59,12 @@ ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS --skip-routines"
54
59
<% end -%>
55
60
<% end -%>
56
61
62
+ <%- if @optional_args and @optional_args . is_a? ( Array ) -%>
63
+ <%- @optional_args . each do |arg | -%>
64
+ ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS <%= arg %> "
65
+ <%- end -%>
66
+ <%- end -%>
67
+
57
68
##### STOP CONFIG ####################################################
58
69
PATH=<%= @execpath %>
59
70
You can’t perform that action at this time.
0 commit comments