Commit graph

86 commits

Author SHA1 Message Date
TP Honey
ce892fb01f Merge pull request #856 from cfasnacht/ticket/6404-new_maxallowedpacket_parameter
add new backup dump parameter maxallowedpacket
2016-06-22 19:51:06 +01:00
Christian Fasnacht
e733df7388 add new backup dump parameter maxallowedpacket 2016-06-21 15:44:59 +02:00
Martin Mörner
6cac0384ad Fix global parameter usage in backup script
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...
2016-05-20 10:11:25 +02:00
Pasha MESH
8a38fe9bd0 Fixed global parameters skipped
Fixed problem with ignoring parameters from global configs
2016-03-17 19:32:39 +03:00
Onur Cem Celebi
1bd7b7be83 Ensure backup directory exist 2016-03-14 16:44:43 +01:00
Sergii Golovatiuk
4faa3f12ee Generate .my.cnf for all sections
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>
2016-02-18 11:48:16 +01:00
Julien Pivotto
e30e0bc958 Re-Add the ability to set a empty string as option parameter
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.
2016-01-08 14:00:31 +01:00
Jesse Lovelace
01494814ee Use temp cnf file instead of env variable which creates acceptance test failures. 2015-11-13 10:07:46 -06:00
abednarik
055b450d73 (MODULES-2605) Use MYSQL_PWD to avoid mysqldump warnings.
Instead of using password as a command arguments, we are setting MYSQL_ENV variable. See https://dev.mysql.com/doc/refman/5.1/en/password-security-user.html
2015-11-06 15:28:56 -03:00
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
Steven C. Saliman
ec14b87a81 Added options for including/excluding triggers and routines, and fixed a permission problem that was preventing triggers from being backed up 2015-04-30 08:01:06 -06:00
Frank Wall
a2faed23ac fix FreeBSD support for backups 2015-03-31 12:58:49 +02:00
Marc Remy
18229c4d02 Cosmetic: add comment managed by puppet 2015-03-17 15:58:37 +01:00
Daniël van Eeden
58508b772a Use backup providers
Add MySQL Enterprise Backup and Percona XtraBackup
2015-02-11 22:27:35 +01:00
Thomas Mueller
5d732bda6c (maint) add statement "MANAGED BY PUPPET" to my.cnf config file template and remove unused my.conf.cnf.erb template 2014-11-05 10:13:39 +01:00
Chris Edester
fa968542e0 future parser converts explicit undef to empty string
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
2014-09-15 13:10:17 -04:00
Nicholas Hinds
462dbf7a1c (MODULES-1287) Pass the backup credentials to 'SHOW DATABASES'
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.
2014-08-24 15:44:47 +12:00
Lukas Bezdicka
26204437ef Prametrize !includedir
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.
2014-06-04 14:07:49 +02:00
Igor Galić
b763006ab6 Merge pull request #495 from mauerj/master
Add quotes to backup password to be able to use more complex passwords.
2014-04-16 12:36:02 +02:00
jmauer
056407f158 Add Quotes to backup password to be able to use more complex passwords. 2014-04-11 15:55:39 +02:00
Ashley Penney
71d1f24bd9 Merge pull request #457 from igalic/independent-backup
mysqlbackup.sh should be able to find mysql
2014-04-10 13:46:19 -04:00
Sergio Oliveira
3d4a153797 [BUG] [Critical] Removing extra space after slash
This extra space was breaking the backup script when running with
`backupdatabases`
2014-03-10 08:22:15 -03:00
Robin Gloster
e4d63f7dc6 fix mysql not starting if ssl is not disabled 2014-03-06 14:03:13 +01:00
Robin Gloster
abcea00dcb handle mysql compiled without ssl
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.
2014-02-28 21:42:41 +01:00
Igor Galić
d2b24e40d3 mysqlbackup.sh should be able to find mysql
anywhere. This should enable use to use mysql::server::backup
idependantly, even if mysql is preinstalled, and preinstalled in non
standard locations
2014-02-20 17:17:41 +01:00
Igor Galić
63e0da0b71 option to specify a script that runs after backups
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.
2014-02-06 16:44:07 +01:00
John Bond
10f346eaca Add logic to ignore mysql.events 2014-01-30 12:31:21 +01:00
Jim Radford
56e81a38c8 Allow override_options to set an option to undef to completely remove it
allowing reverting to mysql's default value.

Note that previously a value of :undef would have led to a nonsensical
my.cnf file.
2014-01-23 17:34:27 -08:00
Jim Radford
136b1aa646 Allow options with values of false to override things that mysql default to true
instead of being elided, leaving the default.
2014-01-23 16:53:57 -08:00
Jim Radford
08e8477e96 Noop indent and cleanup the my.cnf template 2014-01-23 16:17:51 -08:00
Guillaume Coré
dae8018520 Support multiple lines of the same option
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
2013-12-18 16:00:12 -05:00
James Glenn
fc14afe4c0 Some options can not take a argument. Gets rid of the '= true' when an option is set to true. See Issues #338 and #363 2013-11-06 14:21:22 -06:00
Thomas Kenny
52083e6c6a Updated my.cnf template to support items with no values 2013-10-09 07:42:16 -07:00
Ashley Penney
0e7e415029 Use mysql::server::root_password instead of @options. 2013-09-27 10:31:59 -04:00
Ashley Penney
b81f64c8ab Rework templates to rely on the new hash and become vastly less complex. 2013-09-13 13:14:48 -04:00
Ashley Penney
e3843ceb6f Refactor to use mysql::globals.
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.
2013-09-09 11:34:39 -04:00
Trey Dockendorf
627699fc49 Add option to mysql::backup to set the backup script to perform a mysqldump on each database to its own file 2013-08-27 15:15:29 -05:00
Casey Feskens
ad479e6a81 Changed backupdatabases default from false to [] 2013-08-15 06:04:14 -07:00
Casey Feskens
359d88175c Added support to back up specified databases only with 'mysqlbackup'
parameter.  Each database is backed up separately to a named file.
2013-08-13 14:44:41 -07:00
Vincent Janelle
afb8561372 Fixing puppetlabs-mysql PR 174 spec tests 2013-07-16 15:01:58 -07:00
ThinkBriK
4edf5d48ec Update my.cnf.pass.erb 2013-07-16 15:00:53 -07:00
Matthew Haughton
6bd91d04c1 Remove redundant my.cnf parameters
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`
2013-07-15 16:18:12 -04:00
Ashley Penney
b00a6758a2 Simplify a few things. 2013-07-11 19:42:41 -04:00
Ashley Penney
926e94a4cb Merge pull request #170 from omalashenko/master
Harden mysqlbackup.sh script
2013-07-09 16:06:55 -07:00
Daniel De Marco
e12eb0e19f add ft_min_word_len and ft_max_word_len config options 2013-07-04 21:33:53 -04:00
Oleg Malashenko
d7460d4b02 backup: configurable cleanup sequence
$delete_before_dump controls whether old backups to be removed before
creating new one.
2013-07-05 11:27:29 +10:00
Oleg Malashenko
9e2540f4fc Harden mysqlbackup.sh script
* 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).
2013-07-05 11:27:29 +10:00
Lebedev Vadim
9d69afcae7 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql
Conflicts:
	manifests/config.pp
	spec/classes/mysql_config_spec.rb
2013-07-02 22:11:19 +04:00
Lebedev Vadim
ead86b5a3f Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql
Conflicts:
	manifests/config.pp
2013-07-02 21:26:43 +04:00
Martin Hellmich
3089d3a59b add a maximum connection parameter and set the default to 1000
Conflicts:
	manifests/config.pp
	templates/my.cnf.erb
2013-06-28 10:15:58 +02:00