]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/bacula-dir.conf.in
Backport from BEE
[bacula/bacula] / bacula / src / dird / bacula-dir.conf.in
1 #
2 # Default Bacula Director Configuration file
3 #
4 #  The only thing that MUST be changed is to add one or more
5 #   file or directory names in the Include directive of the
6 #   FileSet resource.
7 #
8 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@
9 #
10 #  You might also want to change the default email address
11 #   from root to your address.  See the "mail" and "operator"
12 #   directives in the Messages resource.
13 #
14
15 Director {                            # define myself
16   Name = @basename@-dir
17   DIRport = @dir_port@                # where we listen for UA connections
18   QueryFile = "@scriptdir@/query.sql"
19   WorkingDirectory = "@working_dir@"
20   PidDirectory = "@piddir@"
21   Maximum Concurrent Jobs = 20
22   Password = "@dir_password@"         # Console password
23   Messages = Daemon
24 }
25
26 JobDefs {
27   Name = "DefaultJob"
28   Type = Backup
29   Level = Incremental
30   Client = @basename@-fd
31   FileSet = "Full Set"
32   Schedule = "WeeklyCycle"
33   Storage = File1
34   Messages = Standard
35   Pool = File
36   SpoolAttributes = yes
37   Priority = 10
38   Write Bootstrap = "@working_dir@/%c.bsr"
39 }
40
41
42 #
43 # Define the main nightly save backup job
44 #   By default, this job will back up to disk in @archivedir@
45 Job {
46   Name = "BackupClient1"
47   JobDefs = "DefaultJob"
48 }
49
50 #Job {
51 #  Name = "BackupClient2"
52 #  Client = @basename@2-fd
53 #  JobDefs = "DefaultJob"
54 #}
55
56 #Job {
57 #  Name = "BackupClient1-to-Tape"
58 #  JobDefs = "DefaultJob"
59 #  Storage = LTO-4
60 #  Spool Data = yes    # Avoid shoe-shine
61 #  Pool = Default
62 #}
63
64 #}
65
66 # Backup the catalog database (after the nightly save)
67 Job {
68   Name = "BackupCatalog"
69   JobDefs = "DefaultJob"
70   Level = Full
71   FileSet="Catalog"
72   Schedule = "WeeklyCycleAfterBackup"
73   # This creates an ASCII copy of the catalog
74   # Arguments to make_catalog_backup.pl are:
75   #  make_catalog_backup.pl <catalog-name>
76   RunBeforeJob = "@scriptdir@/make_catalog_backup.pl MyCatalog"
77   # This deletes the copy of the catalog
78   RunAfterJob  = "@scriptdir@/delete_catalog_backup"
79   Write Bootstrap = "@working_dir@/%n.bsr"
80   Priority = 11                   # run after main backup
81 }
82
83 #
84 # Standard Restore template, to be changed by Console program
85 #  Only one such job is needed for all Jobs/Clients/Storage ...
86 #
87 Job {
88   Name = "RestoreFiles"
89   Type = Restore
90   Client=@basename@-fd
91   FileSet="Full Set"
92   Storage = File1
93   Pool = File
94   Messages = Standard
95   Where = @archivedir@/bacula-restores
96 }
97
98
99 # List of files to be backed up
100 FileSet {
101   Name = "Full Set"
102   Include {
103     Options {
104       signature = MD5
105     }
106 #
107 #  Put your list of files here, preceded by 'File =', one per line
108 #    or include an external list with:
109 #
110 #    File = <file-name
111 #
112 #  Note: / backs up everything on the root partition.
113 #    if you have other partitions such as /usr or /home
114 #    you will probably want to add them too.
115 #
116 #  By default this is defined to point to the Bacula binary
117 #    directory to give a reasonable FileSet to backup to
118 #    disk storage during initial testing.
119 #
120     File = @sbindir@
121   }
122
123 #
124 # If you backup the root directory, the following two excluded
125 #   files can be useful
126 #
127   Exclude {
128     File = @working_dir@
129     File = @archivedir@
130     File = /proc
131     File = /tmp
132     File = /sys
133     File = /.journal
134     File = /.fsck
135   }
136 }
137
138 #
139 # When to do the backups, full backup on first sunday of the month,
140 #  differential (i.e. incremental since full) every other sunday,
141 #  and incremental backups other days
142 Schedule {
143   Name = "WeeklyCycle"
144   Run = Full 1st sun at 23:05
145   Run = Differential 2nd-5th sun at 23:05
146   Run = Incremental mon-sat at 23:05
147 }
148
149 # This schedule does the catalog. It starts after the WeeklyCycle
150 Schedule {
151   Name = "WeeklyCycleAfterBackup"
152   Run = Full sun-sat at 23:10
153 }
154
155 # This is the backup of the catalog
156 FileSet {
157   Name = "Catalog"
158   Include {
159     Options {
160       signature = MD5
161     }
162     File = "@working_dir@/@db_name@.sql"
163   }
164 }
165
166 # Client (File Services) to backup
167 Client {
168   Name = @basename@-fd
169   Address = @hostname@
170   FDPort = @fd_port@
171   Catalog = MyCatalog
172   Password = "@fd_password@"          # password for FileDaemon
173   File Retention = 60 days            # 60 days
174   Job Retention = 6 months            # six months
175   AutoPrune = yes                     # Prune expired Jobs/Files
176 }
177
178 #
179 # Second Client (File Services) to backup
180 #  You should change Name, Address, and Password before using
181 #
182 #Client {
183 #  Name = @basename@2-fd
184 #  Address = @hostname@2
185 #  FDPort = @fd_port@
186 #  Catalog = MyCatalog
187 #  Password = "@fd_password@2"        # password for FileDaemon 2
188 #  File Retention = 60 days           # 60 days
189 #  Job Retention = 6 months           # six months
190 #  AutoPrune = yes                    # Prune expired Jobs/Files
191 #}
192
193
194 # Definition of file Virtual Autochanger device
195 Storage {
196   Name = File1
197 # Do not use "localhost" here
198   Address = @hostname@                # N.B. Use a fully qualified name here
199   SDPort = @sd_port@
200   Password = "@sd_password@"
201   Device = FileChgr1
202   Media Type = File1
203   Maximum Concurrent Jobs = 10        # run up to 10 jobs a the same time
204 }
205
206 # Definition of a second file Virtual Autochanger device
207 #   Possibly pointing to a different disk drive
208 Storage {
209   Name = File2
210 # Do not use "localhost" here
211   Address = @hostname@                # N.B. Use a fully qualified name here
212   SDPort = @sd_port@
213   Password = "@sd_password@"
214   Device = FileChgr2
215   Media Type = File2
216   Maximum Concurrent Jobs = 10        # run up to 10 jobs a the same time
217 }
218
219 # Definition of LTO-4 tape Autochanger device
220 #Storage {
221 #  Name = LTO-4
222 #  Do not use "localhost" here
223 #  Address = @hostname@               # N.B. Use a fully qualified name here
224 #  SDPort = @sd_port@
225 #  Password = "@sd_password@"         # password for Storage daemon
226 #  Device = LTO-4                     # must be same as Device in Storage daemon
227 #  Media Type = LTO-4                 # must be same as MediaType in Storage daemon
228 #  Maximum Concurrent Jobs = 10
229 #}
230
231 # Generic catalog service
232 Catalog {
233   Name = MyCatalog
234   dbname = "@db_name@"; dbuser = "@db_user@"; dbpassword = "@db_password@"
235 }
236
237 # Reasonable message delivery -- send most everything to email address
238 #  and to the console
239 Messages {
240   Name = Standard
241 #
242 # NOTE! If you send to two email or more email addresses, you will need
243 #  to replace the %r in the from field (-f part) with a single valid
244 #  email address in both the mailcommand and the operatorcommand.
245 #  What this does is, it sets the email address that emails would display
246 #  in the FROM field, which is by default the same email as they're being
247 #  sent to.  However, if you send email to more than one address, then
248 #  you'll have to set the FROM address manually, to a single address.
249 #  for example, a 'no-reply@mydomain.com', is better since that tends to
250 #  tell (most) people that its coming from an automated source.
251
252 #
253   mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
254   operatorcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
255   mail = @job_email@ = all, !skipped
256   operator = @job_email@ = mount
257   console = all, !skipped, !saved
258 #
259 # WARNING! the following will create a file that you must cycle from
260 #          time to time as it will grow indefinitely. However, it will
261 #          also keep all your messages if they scroll off the console.
262 #
263   append = "@logdir@/bacula.log" = all, !skipped
264   catalog = all
265 }
266
267
268 #
269 # Message delivery for daemon messages (no job).
270 Messages {
271   Name = Daemon
272   mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
273   mail = @job_email@ = all, !skipped
274   console = all, !skipped, !saved
275   append = "@logdir@/bacula.log" = all, !skipped
276 }
277
278 # Default pool definition
279 Pool {
280   Name = Default
281   Pool Type = Backup
282   Recycle = yes                       # Bacula can automatically recycle Volumes
283   AutoPrune = yes                     # Prune expired volumes
284   Volume Retention = 365 days         # one year
285   Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
286   Maximum Volumes = 100               # Limit number of Volumes in Pool
287 }
288
289 # File Pool definition
290 Pool {
291   Name = File
292   Pool Type = Backup
293   Recycle = yes                       # Bacula can automatically recycle Volumes
294   AutoPrune = yes                     # Prune expired volumes
295   Volume Retention = 365 days         # one year
296   Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
297   Maximum Volumes = 100               # Limit number of Volumes in Pool
298   Label Format = "Vol-"               # Auto label
299 }
300
301
302 # Scratch pool definition
303 Pool {
304   Name = Scratch
305   Pool Type = Backup
306 }
307
308 #
309 # Restricted console used by tray-monitor to get the status of the director
310 #
311 Console {
312   Name = @basename@-mon
313   Password = "@mon_dir_password@"
314   CommandACL = status, .status
315 }