|
3 | 3 | #
|
4 | 4 | # @example Create a basic MySQL backup:
|
5 | 5 | # class { 'mysql::server':
|
6 |
| -# root_password => 'password' |
| 6 | +# root_password => 'password' |
7 | 7 | # }
|
8 | 8 | # class { 'mysql::server::backup':
|
9 |
| -# backupuser => 'myuser', |
10 |
| -# backuppassword => 'mypassword', |
11 |
| -# backupdir => '/tmp/backups', |
| 9 | +# backupuser => 'myuser', |
| 10 | +# backuppassword => 'mypassword', |
| 11 | +# backupdir => '/tmp/backups', |
| 12 | +# } |
| 13 | +# |
| 14 | +# @example Create a basic MySQL backup using mariabackup: |
| 15 | +# class { 'mysql::server': |
| 16 | +# root_password => 'password' |
12 | 17 | # }
|
13 | 18 | # class { 'mysql::server::backup':
|
14 |
| -# backupmethod => 'mariabackup', |
15 |
| -# provider => 'xtrabackup', |
16 |
| -# backupdir => '/tmp/backups', |
| 19 | +# backupmethod => 'mariabackup', |
| 20 | +# backupmethod_package => 'mariadb-backup' |
| 21 | +# provider => 'xtrabackup', |
| 22 | +# backupdir => '/tmp/backups', |
17 | 23 | # }
|
18 | 24 | #
|
19 | 25 | # @param backupuser
|
|
60 | 66 | # @param execpath
|
61 | 67 | # Allows you to set a custom PATH should your MySQL installation be non-standard places. Defaults to `/usr/bin:/usr/sbin:/bin:/sbin`.
|
62 | 68 | # @param provider
|
63 |
| -# Sets the server backup implementation. Valid values are: |
| 69 | +# Sets the server backup implementation. Valid values are: xtrabackup, mysqldump, mysqlbackup |
64 | 70 | # @param maxallowedpacket
|
65 | 71 | # Defines the maximum SQL statement size for the backup dump script. The default value is 1MB, as this is the default MySQL Server value.
|
66 | 72 | # @param optional_args
|
|
72 | 78 | # on the target system. Packages for it are NOT automatically installed.
|
73 | 79 | # @param compression_extension
|
74 | 80 | # Configure the file extension for the compressed backup (when using the mysqldump provider)
|
| 81 | +# @param backupmethod_package |
| 82 | +# The package which provides the binary specified by the backupmethod parameter. |
75 | 83 | class mysql::server::backup (
|
76 | 84 | $backupuser = undef,
|
77 | 85 | Optional[Variant[String, Sensitive[String]]] $backuppassword = undef,
|
|
100 | 108 | $incremental_backups = true,
|
101 | 109 | $install_cron = true,
|
102 | 110 | $compression_command = undef,
|
103 |
| - $compression_extension = undef |
| 111 | + $compression_extension = undef, |
| 112 | + $backupmethod_package = $mysql::params::xtrabackup_package_name, |
104 | 113 | ) inherits mysql::params {
|
105 | 114 | if $prescript and $provider =~ /(mysqldump|mysqlbackup)/ {
|
106 | 115 | warning("The 'prescript' option is not currently implemented for the ${provider} backup provider.")
|
|
135 | 144 | 'install_cron' => $install_cron,
|
136 | 145 | 'compression_command' => $compression_command,
|
137 | 146 | 'compression_extension' => $compression_extension,
|
| 147 | + 'backupmethod_package' => $backupmethod_package, |
138 | 148 | }
|
139 | 149 | })
|
140 | 150 | }
|
0 commit comments