[PATCH] Make bacula backup to /bacula/, include db1's db3 dumps.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 modules/bacula/files/fedora_delete_catalog_backup |    5 +++++
 modules/bacula/files/fedora_make_catalog_backup   |    3 +++
 modules/bacula/manifests/init.pp                  |   15 +++++++++++++++
 modules/bacula/templates/bacula-dir.conf.erb      |    7 ++++---
 4 files changed, 27 insertions(+), 3 deletions(-)
 create mode 100755 modules/bacula/files/fedora_delete_catalog_backup
 create mode 100755 modules/bacula/files/fedora_make_catalog_backup

diff --git a/modules/bacula/files/fedora_delete_catalog_backup b/modules/bacula/files/fedora_delete_catalog_backup
new file mode 100755
index 0000000..7f7a760
--- /dev/null
+++ b/modules/bacula/files/fedora_delete_catalog_backup
@@ -0,0 +1,5 @@
+#!/bin/sh
+#
+# This script deletes a catalog dump
+#
+rm -f /bacula/bacula.sql
diff --git a/modules/bacula/files/fedora_make_catalog_backup b/modules/bacula/files/fedora_make_catalog_backup
new file mode 100755
index 0000000..5a6d383
--- /dev/null
+++ b/modules/bacula/files/fedora_make_catalog_backup
@@ -0,0 +1,3 @@
+#!/bin/sh
+rm -f /bacula/bacula.sql
+/usr/bin/mysqldump -u bacula -f bacula > /bacula/bacula.sql
diff --git a/modules/bacula/manifests/init.pp b/modules/bacula/manifests/init.pp
index 526aba7..2729613 100644
--- a/modules/bacula/manifests/init.pp
+++ b/modules/bacula/manifests/init.pp
@@ -40,6 +40,21 @@ class bacula::director {
         notify => Service['bacula-dir'],
         require => Package['bacula-director-mysql']
     }
+
+    file { '/usr/local/bin/fedora_make_catalog_backup':
+        owner  => "root",
+        group  => "root",
+        mode   => 0755,
+        source => "puppet:///bacula/fedora_make_catalog_backup",
+    }
+
+    file { '/usr/local/bin/fedora_delete_catalog_backup':
+        owner  => "root",
+        group  => "root",
+        mode   => 0755,
+        source => "puppet:///bacula/fedora_delete_catalog_backup",
+    }
+
 }
 
 class bacula::bconsole {
diff --git a/modules/bacula/templates/bacula-dir.conf.erb b/modules/bacula/templates/bacula-dir.conf.erb
index 310a4ee..22a6ed3 100644
--- a/modules/bacula/templates/bacula-dir.conf.erb
+++ b/modules/bacula/templates/bacula-dir.conf.erb
@@ -316,9 +316,9 @@ Job {
   FileSet="Catalog"
   Schedule = "WeeklyCycleAfterBackup"
   # This creates an ASCII copy of the catalog
-  RunBeforeJob = "/usr/libexec/bacula/make_catalog_backup bacula bacula"
+  RunBeforeJob = "/usr/local/bin/fedora_make_catalog_backup"
   # This deletes the copy of the catalog
-  RunAfterJob  = "/usr/libexec/bacula/delete_catalog_backup"
+  RunAfterJob  = "/usr/local/bin/fedora_delete_catalog_backup"
   Write Bootstrap = "/var/spool/bacula/BackupCatalog.bsr"
   Priority = 11                   # run after main backup
 }
@@ -506,6 +506,7 @@ FileSet {
     File = /netapp/app
     File = /srv
     File = /backups
+    File = /var/lib/mysql/backups
   }
 
 #
@@ -565,7 +566,7 @@ FileSet {
     Options {
       signature = MD5
     }
-    File = /var/spool/bacula/bacula.sql
+    File = /bacula/bacula.sql
   }
 }
 
-- 
1.5.5.6

Attachment: pgpHaGASQHAjP.pgp
Description: PGP signature

_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux