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