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