7390450969
Also, seperate out the buildsource defined resource from init.pp Change-Id: I9fe46ad31943f667ebe8bb6b01a2007e0b3cf022 Reviewed-on: https://review.openstack.org/15061 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com> Approved: Monty Taylor <mordred@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
32 lines
731 B
Puppet
32 lines
731 B
Puppet
# == Class: etherpad_lite::backup
|
|
#
|
|
class etherpad_lite::backup (
|
|
$minute = '0',
|
|
$hour = '0',
|
|
$day = '*',
|
|
$dest = "${etherpad_lite::base_log_dir}/${etherpad_lite::ep_user}/db.sql.gz",
|
|
$rotation = 'daily',
|
|
$num_backups = '30'
|
|
) {
|
|
|
|
cron { 'eplitedbbackup':
|
|
ensure => present,
|
|
command => "/usr/bin/mysqldump --defaults-file=/etc/mysql/debian.cnf --opt etherpad-lite | gzip -9 > ${dest}",
|
|
minute => $minute,
|
|
hour => $hour,
|
|
weekday => $day,
|
|
require => Package['mysql-server'],
|
|
}
|
|
|
|
include logrotate
|
|
logrotate::file { 'eplitedb':
|
|
log => $dest,
|
|
options => [
|
|
'nocompress',
|
|
"rotate ${num_backups}",
|
|
$rotation,
|
|
],
|
|
require => Cron['eplitedbbackup'],
|
|
}
|
|
}
|