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