]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/bacula-dir.conf.in
Apply patch (with some difficulties) from Joao Henrique Freitas
[bacula/bacula] / bacula / src / dird / bacula-dir.conf.in
index b1505056e7f739dd14df4e6c54bac10e98ac8d4e..c39f672118fbe9176683783a93b55ed4ad808d80 100644 (file)
@@ -39,7 +39,7 @@ JobDefs {
 
 #
 # Define the main nightly save backup job
-#   By default, this job will back up to disk in /tmp
+#   By default, this job will back up to disk in @archivedir@
 Job {
   Name = "Client1"
   JobDefs = "DefaultJob"
@@ -61,7 +61,11 @@ Job {
   FileSet="Catalog"
   Schedule = "WeeklyCycleAfterBackup"
   # This creates an ASCII copy of the catalog
-  RunBeforeJob = "@scriptdir@/make_catalog_backup bacula bacula"
+  # WARNING!!! Passing the password via the command line is insecure.
+  # see comments in make_catalog_backup for details.
+  # Arguments to make_catalog_backup are:
+  #  make_catalog_backup <database-name> <user-name> <password> <host>
+  RunBeforeJob = "@scriptdir@/make_catalog_backup @db_name@ @db_user@"
   # This deletes the copy of the catalog
   RunAfterJob  = "@scriptdir@/delete_catalog_backup"
   Write Bootstrap = "@working_dir@/BackupCatalog.bsr"
@@ -80,7 +84,7 @@ Job {
   Storage = File                      
   Pool = Default
   Messages = Standard
-  Where = /tmp/bacula-restores
+  Where = @archivedir@/bacula-restores
 }
 
 
@@ -227,7 +231,9 @@ Storage {
 # Generic catalog service
 Catalog {
   Name = MyCatalog
-  dbname = bacula; user = bacula; password = ""
+# Uncomment the following line if you want the dbi driver
+# dbdriver = "dbi:mysql"; dbaddress = 127.0.0.1; dbport = 3306
+  dbname = @db_name@; user = @db_user@; password = ""
 }
 
 # Reasonable message delivery -- send most everything to email address
@@ -246,8 +252,8 @@ Messages {
 #  tell (most) people that its coming from an automated source.
 
 #
-  mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
-  operatorcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
+  mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
+  operatorcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
   mail = @job_email@ = all, !skipped            
   operator = @job_email@ = mount
   console = all, !skipped, !saved
@@ -264,7 +270,7 @@ Messages {
 # Message delivery for daemon messages (no job).
 Messages {
   Name = Daemon
-  mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
+  mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
   mail = @job_email@ = all, !skipped            
   console = all, !skipped, !saved
   append = "@working_dir@/log" = all, !skipped
@@ -282,6 +288,12 @@ Pool {
   Volume Retention = 365 days         # one year
 }
 
+# Scratch pool definition
+Pool {
+  Name = Scratch
+  Pool Type = Backup
+}
+
 #
 # Restricted console used by tray-monitor to get the status of the director
 #