]> gitweb.fluxo.info Git - puppet-backup.git/commitdiff
Rsync backup log files
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 17 Aug 2010 20:49:11 +0000 (17:49 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 17 Aug 2010 20:49:11 +0000 (17:49 -0300)
files/logrotate.d/backup [new file with mode: 0644]
manifests/init.pp

diff --git a/files/logrotate.d/backup b/files/logrotate.d/backup
new file mode 100644 (file)
index 0000000..4bdd64f
--- /dev/null
@@ -0,0 +1,6 @@
+/var/log/backup/*.log {
+        rotate 6
+        monthly
+        compress
+        missingok
+}
index 48fe1857589c4f131926f29ccb604c5357f0adb6..556b0c73102c5fa3271ec487b0d33e185bc308d8 100644 (file)
@@ -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,