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