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