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