Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions manifests/backup/xtrabackup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
Optional[String[1]] $compression_command = undef,
Optional[String[1]] $compression_extension = undef,
String[1] $backupmethod_package = $mysql::params::xtrabackup_package_name,
Array[String] $excludedatabases = [],
Array[String] $excludedatabases = [],
Boolean $is_mysql_v8 = false,
) inherits mysql::params {
stdlib::ensure_packages($backupmethod_package)

Expand All @@ -50,7 +51,7 @@
require => Class['mysql::server::root_password'],
}
# Percona XtraBackup needs additional grants/privileges to work with MySQL 8
if versioncmp($facts['mysql_version'], '8') >= 0 and !(/(?i:mariadb)/ in $facts['mysqld_version']) {
if ($is_mysql_v8 or versioncmp($facts['mysql_version'], '8') >= 0) and !(/(?i:mariadb)/ in $facts['mysqld_version']) {
if ($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['major'], '11') >= 0) or
($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '22.04') >= 0) {
mysql_grant { "${backupuser}@localhost/*.*":
Expand Down