Commit graph

27 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
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
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
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
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
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
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
Ashley Penney
b00a6758a2 Simplify a few things. 2013-07-11 19:42:41 -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
Chris Rutter
6194354a7b use of variables w/ out a '@' has been deprecated, and as of 3.2.x Puppet warns about it 2013-05-24 10:01:52 -04:00
Hunter Haugen
d212c87f0a Tweak template spacing to pass spec tests with clean output 2012-09-26 13:41:00 -07:00
Justin Brown
af30a52182 Backup Compression Optional
Added a parameter to mysql::backup to make bzip2 compression
optional. Compression is enabled by default, so current behavior
is not affected.

Rationale:
We are storing our MySQL backups on a system with deduplication.
Compression and dedup do not play well together, so it's advantagous
to be able to disable it.
2012-09-26 13:40:59 -07:00
Michael Arnold
4158137278 Added mysql::backup class.
Installs a mysql backup script, cronjob, and priviledged backup user. 
Includes rspec tests and updated documentation.
2012-04-23 22:53:59 -07:00