From b93dc21e850e1914a7377378604acf9ca8a14713 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 17 Aug 2010 17:49:11 -0300 Subject: Rsync backup log files --- files/logrotate.d/backup | 6 ++++++ manifests/init.pp | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 files/logrotate.d/backup diff --git a/files/logrotate.d/backup b/files/logrotate.d/backup new file mode 100644 index 0000000..4bdd64f --- /dev/null +++ b/files/logrotate.d/backup @@ -0,0 +1,6 @@ +/var/log/backup/*.log { + rotate 6 + monthly + compress + missingok +} diff --git a/manifests/init.pp b/manifests/init.pp index 48fe185..556b0c7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -64,6 +64,21 @@ class backup { mode => 0755, } + file { "/var/log/backup": + ensure => directory, + owner => root, + group => root, + mode => 0755, + } + + file { "/etc/logrotate.d/backup": + ensure => present, + owner => root, + group => root, + mode => 0644, + source => "puppet://$server/modules/backup/logrotate.d/backup", + } + # rdiff-check script file { "/usr/local/sbin/rdiff-check": content => template('backup/rdiff-check.sh.erb'), @@ -128,6 +143,7 @@ class backup { keepweekly => '4', keepmonthly => '3', format => 'long', + log => "/var/log/backup/rsync-$title.$domain.log", # [source] include => $backup_include_encrypted, exclude => $backup_exclude_encrypted, -- cgit v1.2.3