|
1 | 1 | # See README.me for usage.
|
2 | 2 | class mysql::backup::xtrabackup (
|
3 |
| - $backupuser = '', |
4 |
| - $backuppassword = '', |
5 |
| - $backupdir = '', |
6 |
| - $maxallowedpacket = '1M', |
7 |
| - $backupmethod = 'mysqldump', |
8 |
| - $backupdirmode = '0700', |
9 |
| - $backupdirowner = 'root', |
10 |
| - $backupdirgroup = $mysql::params::root_group, |
11 |
| - $backupcompress = true, |
12 |
| - $backuprotate = 30, |
13 |
| - $ignore_events = true, |
14 |
| - $delete_before_dump = false, |
15 |
| - $backupdatabases = [], |
16 |
| - $file_per_database = false, |
17 |
| - $include_triggers = true, |
18 |
| - $include_routines = false, |
19 |
| - $ensure = 'present', |
20 |
| - $time = ['23', '5'], |
21 |
| - $prescript = false, |
22 |
| - $postscript = false, |
23 |
| - $execpath = '/usr/bin:/usr/sbin:/bin:/sbin', |
| 3 | + $xtrabackup_package_name = $mysql::params::xtrabackup_package_name, |
| 4 | + $backupuser = '', |
| 5 | + $backuppassword = '', |
| 6 | + $backupdir = '', |
| 7 | + $maxallowedpacket = '1M', |
| 8 | + $backupmethod = 'mysqldump', |
| 9 | + $backupdirmode = '0700', |
| 10 | + $backupdirowner = 'root', |
| 11 | + $backupdirgroup = $mysql::params::root_group, |
| 12 | + $backupcompress = true, |
| 13 | + $backuprotate = 30, |
| 14 | + $ignore_events = true, |
| 15 | + $delete_before_dump = false, |
| 16 | + $backupdatabases = [], |
| 17 | + $file_per_database = false, |
| 18 | + $include_triggers = true, |
| 19 | + $include_routines = false, |
| 20 | + $ensure = 'present', |
| 21 | + $time = ['23', '5'], |
| 22 | + $prescript = false, |
| 23 | + $postscript = false, |
| 24 | + $execpath = '/usr/bin:/usr/sbin:/bin:/sbin', |
24 | 25 | ) inherits mysql::params {
|
25 | 26 |
|
26 |
| - package{ 'percona-xtrabackup': |
| 27 | + package{ $xtrabackup_package_name: |
27 | 28 | ensure => $ensure,
|
28 | 29 | }
|
29 | 30 |
|
|
34 | 35 | hour => $time[0],
|
35 | 36 | minute => $time[1],
|
36 | 37 | weekday => '0',
|
37 |
| - require => Package['percona-xtrabackup'], |
| 38 | + require => Package[$xtrabackup_package_name], |
38 | 39 | }
|
39 | 40 |
|
40 | 41 | cron { 'xtrabackup-daily':
|
|
44 | 45 | hour => $time[0],
|
45 | 46 | minute => $time[1],
|
46 | 47 | weekday => '1-6',
|
47 |
| - require => Package['percona-xtrabackup'], |
| 48 | + require => Package[$xtrabackup_package_name], |
48 | 49 | }
|
49 | 50 |
|
50 | 51 | file { 'mysqlbackupdir':
|
|
0 commit comments