File tree 3 files changed +11
-5
lines changed
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ Compatibility mode may fail. It may eat your MySQL server. PLEASE test it before
45
45
###Beginning with MySQL
46
46
47
47
If you just want a server installed with the default options you can run
48
- ` include '::mysql::server' ` .
48
+ ` include '::mysql::server' ` .
49
49
50
50
If you need to customize options, such as the root
51
51
password or ` /etc/my.cnf ` settings, then you must also pass in an override hash:
@@ -216,7 +216,7 @@ The provider to use to manage the service.
216
216
217
217
#####` users `
218
218
219
- Optional hash of users to create, which are passed to [ mysql_user] ( #mysql_user ) .
219
+ Optional hash of users to create, which are passed to [ mysql_user] ( #mysql_user ) .
220
220
221
221
``` puppet
222
222
$users = {
@@ -233,7 +233,7 @@ $users = {
233
233
234
234
#####` grants `
235
235
236
- Optional hash of grants, which are passed to [ mysql_grant] ( #mysql_grant ) .
236
+ Optional hash of grants, which are passed to [ mysql_grant] ( #mysql_grant ) .
237
237
238
238
``` puppet
239
239
$grants = {
@@ -305,6 +305,11 @@ Boolean to determine if you should cleanup before backing up or after.
305
305
306
306
Array of databases to specifically back up.
307
307
308
+ #####` excludedatabases `
309
+
310
+ Array of databases to exclude from backups. Thus only works when
311
+ ` file_per_database ` is true.
312
+
308
313
#####` file_per_database `
309
314
310
315
Whether a separate file be used per database.
Original file line number Diff line number Diff line change 11
11
$ignore_events = true ,
12
12
$delete_before_dump = false ,
13
13
$backupdatabases = [],
14
+ $excludedatabases = [],
14
15
$file_per_database = false ,
15
16
$ensure = ' present' ,
16
17
$time = [' 23' , ' 5' ],
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ cleanup
40
40
< % end -%>
41
41
< % if @backupdatabases.empty? -%>
42
42
< % if @file_per_database -%>
43
- mysql -s -r -N -e ' SHOW DATABASES' | while read dbname
43
+ mysql -s -r -N -e ' SHOW DATABASES' < % if ! @excludedatabases.empty ? % > | grep -v ' ^\(<% @excludedatabases.join( ' | ' ) %>)$ ' < % end % > | while read dbname
44
44
do
45
45
mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \
46
46
${EVENTS} \
@@ -53,7 +53,7 @@ mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \
53
53
< % end -%>
54
54
< % else -%>
55
55
< % @backupdatabases.each do | db| -%>
56
- mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \
56
+ mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \
57
57
${EVENTS} \
58
58
< %= db %><% if @backupcompress %> | bzcat -zc < % end %>> ${DIR} /${PREFIX} < %= db %> _` date +%Y%m%d-%H%M%S` .sql< % if @backupcompress %> .bz2< % end %>
59
59
< % end -%>
You can’t perform that action at this time.
0 commit comments