1#
2# Copyright (C) 2000-2020 Kern Sibbald
3# License: BSD 2-Clause; see file LICENSE-FOSS
4#
5# Default Bacula Director Configuration file
6#
7#  The only thing that MUST be changed is to add one or more
8#   file or directory names in the Include directive of the
9#   FileSet resource.
10#
11#  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@
12#
13#  You might also want to change the default email address
14#   from root to your address.  See the "mail" and "operator"
15#   directives in the Messages resource.
16#
17
18Director {                            # define myself
19  Name = @director_name@
20  DIRport = @director_port@                # where we listen for UA connections
21  QueryFile = "@bin_dir@\\query.sql"
22  WorkingDirectory = "@working_dir@"
23  PidDirectory = "@working_dir@"
24  Maximum Concurrent Jobs = @director_maxjobs@
25  Password = "@director_password@"         # Console password
26  Messages = Daemon
27}
28
29JobDefs {
30  Name = "DefaultJob"
31  Type = Backup
32  Level = Incremental
33  Client = @client_name@
34  FileSet = "Test Set"
35  Schedule = "WeeklyCycle"
36  Storage = File
37  Messages = Standard
38  Pool = Default
39  Priority = 10
40}
41
42
43#
44# Define the main nightly save backup job
45#   By default, this job will back up to disk in C:/tmp
46Job {
47  Name = "Client1"
48  JobDefs = "DefaultJob"
49  Write Bootstrap = "@working_dir@\\Client1.bsr"
50}
51
52#Job {
53#  Name = "Client2"
54#  Client = @client_name@2
55#  JobDefs = "DefaultJob"
56#  Write Bootstrap = "@working_dir@\\Client2.bsr"
57#}
58
59# Backup the catalog database (after the nightly save)
60Job {
61  Name = "BackupCatalog"
62  JobDefs = "DefaultJob"
63  Level = Full
64  FileSet="Catalog"
65  Schedule = "WeeklyCycleAfterBackup"
66  # This creates an ASCII copy of the catalog
67  RunBeforeJob = "\"@bin_dir@\\make_catalog_backup\" bacula bacula"
68  # This deletes the copy of the catalog
69  RunAfterJob  = "\"@bin_dir@\\delete_catalog_backup\""
70  Write Bootstrap = "@working_dir@\\BackupCatalog.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#
78Job {
79  Name = "RestoreFiles"
80  Type = Restore
81  Client=@client_name@
82  FileSet="Test Set"
83  Storage = File
84  Pool = Default
85  Messages = Standard
86  Where = "C:\\tmp\\bacula-restores"
87}
88
89#
90# Note: Windows path separators do NOT work correctly in FileSets.
91#
92# List of files to be backed up
93FileSet {
94  Name = "Test Set"
95  Include {
96    Options {
97      signature = MD5
98      ignore case = yes
99    }
100#
101#  Put your list of files here, preceded by 'File =', one per line
102#    or include an external list with:
103#
104#    File = <file-name
105#
106#  Note: C:/ backs up everything on drive C.
107#    if you have other drives such as D:/
108#    you will probably want to add them too.
109#
110#  By default this is defined to point to the Bacula
111#    directory to give a reasonable FileSet to backup to
112#    disk storage during initial testing.
113#
114    File = "@BUILD_DIR@"
115  }
116
117#
118# If you backup the root directory, the following excluded
119#   files can be useful
120#
121  Exclude {
122    File = C:/Temp
123    File = C:/tmp
124  }
125}
126
127#
128# This is an example which will backup all the hard drives of a Windows System.
129#
130FileSet {
131  Name = "Windows Full Set"
132  Enable VSS = yes
133  Include {
134    Options {
135      Signature = MD5
136      Exclude = yes
137      IgnoreCase = yes
138      EnhancedWild = yes
139      DriveType = fixed
140
141      # Exclude directories full of lots and lots of useless little files
142      WildDir = "[A-Z]:/Documents and Settings/*/Cookies"
143      WildDir = "[A-Z]:/Documents and Settings/*/Recent"
144      WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/History"
145      WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temp"
146      WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temporary Internet Files"
147
148      # Exclude directories full of lots and lots of useless little files
149      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Cookies"
150      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Recent"
151      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/History"
152      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temp"
153      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temporary Internet Files"
154
155      # Exclude directories full of lots and lots of useless little files
156      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Cookies"
157      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Recent"
158      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/History"
159      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temp"
160      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temporary Internet Files"
161
162      # Some random bits of Windows we want to ignore
163      WildDir = "[A-Z]:/{WINNT,Windows}/Prefetch"
164      WildDir = "[A-Z]:/{WINNT,Windows}/msdownld.tmp"
165      WildDir = "[A-Z]:/{WINNT,Windows}/Internet Logs"
166      WildDir = "[A-Z]:/{WINNT,Windows}/$Nt*Uninstall*"
167      WildDir = "[A-Z]:/{WINNT,Windows}/Downloaded Installations"
168
169      # Temporary directories & files
170      WildDir = "[A-Z]:/{WINNT,Windows}/Temp"
171      WildDir = "[A-Z]:/Temp"
172      WildFile = "*.tmp"
173      WildDir = "[A-Z]:/tmp"
174
175      # Fast Find
176      WildFile = "[A-Z]:/ffastun*"
177
178      # System Restore
179      WildDir = "[A-Z]:/System Volume Information"
180
181      # Windows Update
182      WildDir = "[A-Z]:/WUTemp"
183
184      # Recycle bins
185      WildDir = "[A-Z]:/RECYCLE[DR]"
186
187      # Swap files
188      WildFile = "[A-Z]:/pagefile.sys"
189      WildFile = "[A-Z]:/hiberfil.sys"
190
191      # These are programs and are easier to reinstall than restore from
192      # backup
193      WildDir = "[A-Z]:/cygwin"
194      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java"
195      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java Web Start"
196      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/JavaSoft"
197      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Microsoft Office"
198    }
199
200    File = "C:/"
201    File = "D:/"
202    File = "E:/"
203    File = "F:/"
204    File = "G:/"
205    File = "H:/"
206    File = "I:/"
207    File = "J:/"
208    File = "K:/"
209    File = "L:/"
210    File = "M:/"
211    File = "N:/"
212    File = "O:/"
213    File = "P:/"
214    File = "Q:/"
215    File = "R:/"
216    File = "S:/"
217    File = "T:/"
218    File = "U:/"
219    File = "V:/"
220    File = "W:/"
221    File = "X:/"
222    File = "Y:/"
223    File = "Z:/"
224  }
225}
226
227#
228# When to do the backups, full backup on first sunday of the month,
229#  differential (i.e. incremental since full) every other sunday,
230#  and incremental backups other days
231Schedule {
232  Name = "WeeklyCycle"
233  Run = Full 1st sun at 23:05
234  Run = Differential 2nd-5th sun at 23:05
235  Run = Incremental mon-sat at 23:05
236}
237
238# This schedule does the catalog. It starts after the WeeklyCycle
239Schedule {
240  Name = "WeeklyCycleAfterBackup"
241  Run = Full sun-sat at 23:10
242}
243
244# This is the backup of the catalog
245FileSet {
246  Name = "Catalog"
247  Include {
248    Options {
249      signature = MD5
250    }
251    File = "@working_dir@\\bacula.sql"
252  }
253}
254
255# Client (File Services) to backup
256Client {
257  Name = @client_name@
258  Address = @client_address@
259  FDPort = @client_port@
260  Catalog = MyCatalog
261  Password = "@client_password@"      # password for FileDaemon
262  File Retention = 30 days            # 30 days
263  Job Retention = 6 months            # six months
264  AutoPrune = yes                     # Prune expired Jobs/Files
265}
266
267#
268# Second Client (File Services) to backup
269#  You should change Name, Address, and Password before using
270#
271#Client {
272#  Name = @client_name@2
273#  Address = @client_address@2
274#  FDPort = @client_port@
275#  Catalog = MyCatalog
276#  Password = "@client_password@2"     # password for FileDaemon 2
277#  File Retention = 30 days            # 30 days
278#  Job Retention = 6 months            # six months
279#  AutoPrune = yes                     # Prune expired Jobs/Files
280#}
281
282
283# Definition of file storage device
284Storage {
285  Name = File
286# Do not use "localhost" here
287  Address = @storage_address@                # N.B. Use a fully qualified name here
288  SDPort = @storage_port@
289  Password = "@storage_password@"
290  Device = FileStorage
291  Media Type = File
292}
293
294
295
296# Definition of DDS tape storage device
297#Storage {
298#  Name = DDS-4
299#  Do not use "localhost" here
300#  Address = @storage_address@                # N.B. Use a fully qualified name here
301#  SDPort = @storage_port@
302#  Password = "@storage_password@"          # password for Storage daemon
303#  Device = DDS-4                      # must be same as Device in Storage daemon
304#  Media Type = DDS-4                  # must be same as MediaType in Storage daemon
305#  Autochanger = yes                   # enable for autochanger device
306#}
307
308# Definition of 8mm tape storage device
309#Storage {
310#  Name = "8mmDrive"
311#  Do not use "localhost" here
312#  Address = @storage_address@                # N.B. Use a fully qualified name here
313#  SDPort = @storage_port@
314#  Password = "@storage_password@"
315#  Device = "Exabyte 8mm"
316#  MediaType = "8mm"
317#}
318
319
320# Generic catalog service
321Catalog {
322  Name = MyCatalog
323  dbname = bacula; user = bacula; password = ""
324}
325
326# Reasonable message delivery -- send most everything to email address
327#  and to the console
328Messages {
329  Name = Standard
330#
331# NOTE! If you send to two email or more email addresses, you will need
332#  to replace the %r in the from field (-f part) with a single valid
333#  email address in both the mailcommand and the operatorcommand.
334#
335  mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
336  operatorcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
337  mail = @job_email@ = all, !skipped
338  operator = @job_email@ = mount
339  console = all, !skipped, !saved
340#
341# WARNING! the following will create a file that you must cycle from
342#          time to time as it will grow indefinitely. However, it will
343#          also keep all your messages if they scroll off the console.
344#
345  append = "@working_dir@\\log" = all, !skipped
346}
347
348
349#
350# Message delivery for daemon messages (no job).
351Messages {
352  Name = Daemon
353  mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
354  mail = @job_email@ = all, !skipped
355  console = all, !skipped, !saved
356  append = "@working_dir@\\log" = all, !skipped
357}
358
359
360
361# Default pool definition
362Pool {
363  Name = Default
364  Pool Type = Backup
365  Recycle = yes                       # Bacula can automatically recycle Volumes
366  AutoPrune = yes                     # Prune expired volumes
367  Volume Retention = 365 days         # one year
368}
369
370# Scratch pool definition
371Pool {
372  Name = Scratch
373  Pool Type = Backup
374}
375
376#
377# Restricted console used by tray-monitor to get the status of the director
378#
379Console {
380  Name = @monitor_name@
381  Password = "@monitor_password@"
382  CommandACL = status, .status
383}
384