If mysqldump uses --defaults-extra-file mysql should use the same. Otherwise settings like different socket paths etc. will not work. Preferably this should be detected via test cases, as backups are quite important...
MySQL ecosystem has a lot of tools that use .my.cnf such as mysqldump or
mysqladmin. Generating all sections allows operator to use them under
root account without passing -p<password>
Prior to 136b1aa646 it was possible to
have an empty string as value of a my.cnf parameter, resulting in a line
with just the parameter name.
That commit re-enable that behavior that was removed by accident.
With the future parser and puppet 4, explicit undef seems to be converted to blank string for erb templates
This change allows you to continue to omit config options in the main my.cnf
Pass the backup username and password to mysql when running SHOW DATABASES in
mysqlbackup.sh if `file_per_database` is true and `backupdatabases` is empty.
Hardcoded path provided by puppet is now replaced by providing only the final directory as on
most systems includedir is provided by package and it's matter of user to provide it if he
wants to override it. This also allows disabling including at all.
mysql doesn't allow ssl=true/false in my.cnf if it hasn't been compiled
with ssl, therefor add a new parameter ssl-disable which makes sure the
template doesn't write anything with ssl to the config.
This script could be used to sync backups to a central server, or just
to create a file to let external scripts know that backups are
(sucessfully) done and can be picked up.
The postscript option (defaults to false) and can be either a string or
an array of strings. These strings will be directly put into the
mysqlbackup.sh and as such can either be shell commands, or externally
managed files.
Some MySQL options need to be passed several times. For example :
http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_replicate-do-db
This is currently impossible with the override_options. This patch allows to
pass array as value. Example :
override_options => {
'client' => {
'password' => 'xxx',
},
'mysqld' => {
'bind_address' => '0.0.0.0',
'replicate-do-db' => ['base1', 'base2', 'base3'],
},
}
Which will be evaluated into :
[client]
password = xxx
[mysqld]
bind_address = 0.0.0.0
replicate-do-db = base1
replicate-do-db = base2
replicate-do-db = base3
This initial round of work focuses on adding the concept of
mysql::globals to the module. This is a shared place to provide all the
data the module needs, and then clients, servers, and providers can all
rely on this information to set things up.
This is being primarily used at first to allow a default_options hash
that contains all the previous parameters and takes a overrides_options
that allows you to then further customize any of the options in my.cnf.
The following new `mysql` class replication parameters were added in 0.8.0, however the existing hard coded parameters were not removed from the my.conf.erb template:
- `expire_logs_days`
- `max_binlog_size`
* mysql::backup backuprotate parameter sets the number of backups to keep,
default is 30.
* Use bash in mysqlbackup.sh to get exit status of mysqldump when piped to
bzip2. Unfortunately there is no easy portable way to do that.
* Only delete old backups when current backup finished successfully.
* Try hard not to delete files that we didn't create (i.e. README or other
backups).