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