remove non-standard From header from Bacula emails
[mirror/dsa-puppet.git] / modules / bacula / templates / bacula-dir.conf.erb
1 ##
2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 ##
5 ##
6 #  For Bacula release 5.0.1 (24 February 2010) -- debian 5.0.4
7
8 ########################################################################
9 # Bacula Director itself                                               #
10 ########################################################################
11
12 Director {
13   Name = <%= @director_name %>
14   Description = <%= @hostname %> - <%= @domain %> Bacula Director
15   QueryFile = "/etc/bacula/scripts/query.sql"
16   WorkingDirectory = "/var/lib/bacula"
17   PidDirectory = "/run/bacula"
18   Maximum Concurrent Jobs = 20
19   Password = "<%= @director_secret %>"
20   Messages = Daemon
21   DirAddresses = {
22      # Always have localhost in, then the configured IP
23      ip = { addr = 127.0.0.1; port = <%= @port_dir %> }
24      ip = { addr = <%= @director_address %>; port = <%= @port_dir %> }
25   }
26
27   TLS Enable = yes
28   TLS Require = yes
29   TLS Verify Peer = yes
30   TLS Allowed CN = "clientcerts/<%= @director_address %>"
31   <%= scope['bacula::bacula_tls_ca_certificate_file'] %>
32   <%= scope['bacula::bacula_tls_server_certificate'] %>
33   <%= scope['bacula::bacula_tls_server_key'] %>
34
35   Heartbeat Interval = 60
36 }
37
38 ########################################################################
39 # Standard Fileset                                                     #
40 ########################################################################
41 FileSet {
42   Name = "Standard Set"
43   Ignore FileSet Changes = yes
44   Include {
45     Options {
46       signature = SHA1
47       compression = GZIP9
48       aclsupport = yes
49       xattrsupport = yes
50     }
51     Options {
52       wild = "/swapfile*"
53       exclude = yes
54     }
55     File = "\\|/usr/local/sbin/bacula-backup-dirs"
56     # Dont backup directories that contain .nobackup files
57     Exclude Dir Containing = .nobackup
58   }
59
60   Exclude {
61     File = /.fsck
62     File = /.journal
63     File = /dev
64     File = /home/buildd/build-trees
65     File = /lib/init/rw
66     File = /nonexistant
67     File = /proc
68     File = /srv/chroot
69     File = /sys
70     File = /tmp
71     File = /srv/apache-cache/mod_cache_disk
72     File = /var/cache/apache2/mod_cache_disk
73     File = /var/cache/apt
74     File = /var/lib/apt
75     File = /var/lib/bacula
76     File = /var/lib/munin-async
77     File = /var/lock
78     File = /var/log/samhain
79     File = /var/run
80     File = "\\|bash -c 'grep -s -v ^# /etc/bacula/local-exclude || true'"
81   }
82 }
83
84
85 ########################################################################
86 # Generic catalog service                                              #
87 ########################################################################
88 Catalog {
89   Name = MyCatalog
90   dbname = <%= @db_name %>;
91   dbport = <%= @db_port %>;
92   dbaddress = "<%= @db_address %>";
93 <% if @db_sslca %>
94   dbsslmode = verify-ca;
95   dbsslca = "<%= @db_sslca %>";
96 <% end %>
97   dbuser = "<%= @db_user %>";
98   dbpassword = "<%= @db_password %>"
99 }
100
101 ########################################################################
102 # Message delivery                                                     #
103 ########################################################################
104 Messages {
105   Name = <%= @messages_name %>
106   mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"%r\" -s \"Bacula: %t %e of %c %l\" %r"
107   operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"%r\" -s \"Bacula: Intervention needed for %j\" %r"
108 <% if @email_all %>
109   mail = <%= @email_all %> = all
110 <% end %>
111 <% if @email_error != @email_all %>
112   mail on error = <%= @email_error %> = all
113 <% end %>
114   operator = <%= @email_operator %> = mount
115   console = all, !skipped, !saved
116   syslog = all
117   append = "/var/lib/bacula/log" = all
118   catalog = all
119 }
120
121 # Message delivery for daemon messages (no job).
122 Messages {
123   Name = Daemon
124   mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"%r\" -s \"Bacula daemon message\" %r"
125   mail = <%= @email_daemon %> = all
126   console = all, !skipped, !saved
127   syslog = all
128   append = "/var/lib/bacula/log" = all
129 }
130
131 ########################################################################
132 # Jobdefinitions with defaults and stuff                               #
133 ########################################################################
134 JobDefs {
135   Name = "Standardbackup"
136   Type = Backup
137   Level = Incremental
138   FileSet = "Standard Set"
139   Accurate = yes
140   Messages = <%= @messages_name %>
141   Max Full Interval = 50 days
142   Priority = 10
143   Write Bootstrap = "/var/lib/bacula/%c.bsr"
144   Maximum Concurrent Jobs = 20
145   Client Run After Job = "/usr/local/sbin/postbaculajob -c \"%c\" -d \"%d\" -i \"%i\" -l \"%l\" -n \"%n\" -o /var/log/bacula/client-after.state"
146 }
147
148 ########################################################################
149 # Standard Restore template, to be changed by Console program          #
150 #  Only one such job is needed for all Jobs/Clients/Storage ...        #
151 ########################################################################
152 Job {
153   Name = "RestoreFiles"
154   Type = Restore
155   FileSet = "Standard Set"
156   Client = <%= @some_client_name%>
157   Pool = <%= @some_pool_name %>
158   Messages = <%= @messages_name %>
159   Where = /var/tmp/bacula-restores
160 }
161
162
163 # Scratch pool definition
164 Pool {
165   Name = Scratch
166   Pool Type = Backup
167 }
168
169 ########################################################################
170 # And now include all the generated configs                            #
171 ########################################################################
172 @|"sh -c 'for f in /etc/bacula/conf.d/*.conf ; do echo @${f} ; done'"