fix FreeBSD support for backups
This commit is contained in:
parent
5de035c60d
commit
a2faed23ac
4 changed files with 10 additions and 4 deletions
|
@ -5,7 +5,7 @@ class mysql::backup::mysqlbackup (
|
||||||
$backupdir,
|
$backupdir,
|
||||||
$backupdirmode = '0700',
|
$backupdirmode = '0700',
|
||||||
$backupdirowner = 'root',
|
$backupdirowner = 'root',
|
||||||
$backupdirgroup = 'root',
|
$backupdirgroup = $mysql::params::root_group,
|
||||||
$backupcompress = true,
|
$backupcompress = true,
|
||||||
$backuprotate = 30,
|
$backuprotate = 30,
|
||||||
$ignore_events = true,
|
$ignore_events = true,
|
||||||
|
|
|
@ -5,7 +5,7 @@ class mysql::backup::mysqldump (
|
||||||
$backupdir,
|
$backupdir,
|
||||||
$backupdirmode = '0700',
|
$backupdirmode = '0700',
|
||||||
$backupdirowner = 'root',
|
$backupdirowner = 'root',
|
||||||
$backupdirgroup = 'root',
|
$backupdirgroup = $mysql::params::root_group,
|
||||||
$backupcompress = true,
|
$backupcompress = true,
|
||||||
$backuprotate = 30,
|
$backuprotate = 30,
|
||||||
$ignore_events = true,
|
$ignore_events = true,
|
||||||
|
@ -47,7 +47,7 @@ class mysql::backup::mysqldump (
|
||||||
path => '/usr/local/sbin/mysqlbackup.sh',
|
path => '/usr/local/sbin/mysqlbackup.sh',
|
||||||
mode => '0700',
|
mode => '0700',
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => $mysql::params::root_group,
|
||||||
content => template('mysql/mysqlbackup.sh.erb'),
|
content => template('mysql/mysqlbackup.sh.erb'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ class mysql::backup::xtrabackup (
|
||||||
$backupmethod = 'mysqldump',
|
$backupmethod = 'mysqldump',
|
||||||
$backupdirmode = '0700',
|
$backupdirmode = '0700',
|
||||||
$backupdirowner = 'root',
|
$backupdirowner = 'root',
|
||||||
$backupdirgroup = 'root',
|
$backupdirgroup = $mysql::params::root_group,
|
||||||
$backupcompress = true,
|
$backupcompress = true,
|
||||||
$backuprotate = 30,
|
$backuprotate = 30,
|
||||||
$ignore_events = true,
|
$ignore_events = true,
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
|
<%- if @kernel == 'Linux' -%>
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
<%- else -%>
|
||||||
|
#!/bin/sh
|
||||||
|
<%- end -%>
|
||||||
#
|
#
|
||||||
# MySQL Backup Script
|
# MySQL Backup Script
|
||||||
# Dumps mysql databases to a file for another backup tool to pick up.
|
# Dumps mysql databases to a file for another backup tool to pick up.
|
||||||
|
@ -27,7 +31,9 @@ PATH=<%= @execpath %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%- if @kernel == 'Linux' -%>
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
<%- end -%>
|
||||||
|
|
||||||
cleanup()
|
cleanup()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue