-
Notifications
You must be signed in to change notification settings - Fork 0
/
bacula-dir.conf
411 lines (381 loc) · 12.2 KB
/
bacula-dir.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
#
# Default Bacula Director Configuration file
#
# The only thing that MUST be changed is to add one or more
# file or directory names in the Include directive of the
# FileSet resource.
#
# For Bacula release 9.4.4 (28 May 2019) -- redhat Enterprise release
#
# You might also want to change the default email address
# from root to your address. See the "mail" and "operator"
# directives in the Messages resource.
#
# Copyright (C) 2000-2017 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS
#
# Defintions:
# 01 = Backup Full
# 02 = Backup Differential
# 03 = Backup Incremental
Director {
Name = bacula-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/opt/bacula/scripts/query.sql"
WorkingDirectory = "/opt/bacula/working"
PidDirectory = "/opt/bacula/working"
Maximum Concurrent Jobs = 20
Password = "75rfxeAId8Hxtmtm9Mn7EC/Bvr9Ykol+lylKPz7sF68Q" # Console password
Messages = Daemon
StatisticsRetention = 5y
}
# Restricted console used by tray-monitor to get the status of the director
Console {
Name = bacula-mon
Password = "UCyA6l1ABzL2osyuKyCNGNGPl2HQT/Fat+P3pZcfsKlP"
CommandACL = status, .status
}
### job
Job {
Name = "Job-baculac-fd"
Client = "Client-baculac-fd"
Storage = "AC-File11"
FileSet = "FS-default"
Schedule = "Schedule-WeeklyCycle"
Type = "Backup"
Pool = "Pool-01-File11"
FullBackupPool = "Pool-01-File11"
DifferentialBackupPool = "Pool-02-File11"
IncrementalBackupPool = "Pool-03-File11"
Max Full Interval = 31 days
WriteBootstrap = "/opt/bacula/working/%n_%c.bsr" # It's a good idea if this be a remote mount point
SpoolAttributes = "yes"
Accurate = "yes"
Priority = "10"
Enabled = "yes"
Messages = "Standard"
}
Job {
Name = "Job-BackupCatalog"
Client = "Client-bacula"
Storage = "AC-01-FileGr1-Dev1"
FileSet = "FS-catalog"
Type = "Backup"
Schedule = "Schedule-WeeklyCycleAfterBackup"
Pool = "Pool-01-File11"
FullBackupPool = "Pool-01-File11"
RunScript {
RunsWhen = Before
RunsOnClient = No
# Console = "prune expired all jobs yes" # It'll Prune all volumes expired
# Console = "prune expired all files yes" # It'll Prune all volumes expired
# Console = "prune expired all volume yes" # It'll Prune all volumes expired
# This creates an ASCII copy of the catalog
# Arguments to make_catalog_backup.pl are:
# make_catalog_backup.pl <catalog-name>
Command = "/opt/bacula/scripts/make_catalog_backup.pl Catalog-default bacula 1"
}
# This deletes the copy of the catalog
RunScript {
RunsWhen = After
RunsOnClient = No
Command = "/opt/bacula/scripts/delete_catalog_backup"
# Console = "purge volume action=all allpools storage=File"
}
WriteBootstrap = "/opt/bacula/working/%n_%c.bsr" # It's a good idea if this be a remote mount point
SpoolAttributes = "yes"
Accurate = "yes"
Priority = 11 # run after main backup
Enabled = "yes"
Messages = "Standard"
}
Job {
Name = "Job-bacula-Verify"
Client = "Client-bacula-Verify"
Storage = "AC-01-FileGr1-Dev1"
FileSet = "FS-verify"
Type = "Verify"
Schedule = "Schedule-VerifyCycle"
Pool = "Pool-01-File11"
FullBackupPool = "Pool-01-File11"
Accurate = "yes"
Priority = "10"
Enabled = "yes"
Messages = "Standard"
}
# Standard Restore template, to be changed by Console program
# Only one such job is needed for all Jobs/Clients/Storage ...
Job {
Name = "Job-RestoreFiles"
Client = "Client-baculac-fd"
Storage = "Restore-AC-FileGr1"
FileSet = "FS-default" # The FileSet directives are not used by Restore Jobs, but must not be removed
Type = "Restore"
Pool = "Pool-01-File11" # The FileSet directives are not used by Restore Jobs, but must not be removed
Where = "/tmp/bacula-restores"
Messages = "Standard"
}
### fileset
# List of files to be backed up
# df -l | grep "^/dev/sd[ab]" | grep -v ".*/tmp" | awk '{print $6}'
FileSet {
Name = "FS-default"
Include {
Options {
signature = "MD5"
compression = "GZIP"
}
File = "/etc"
File = "/opt/bacula/etc"
File = "/opt/bacula/plugins"
File = "/opt/bacula/scripts"
File = "/boot"
}
Exclude {
File = "/tmp"
File = "/proc"
File = "/tmp"
File = "/sys"
File = "/.journal"
File = "/.fsck"
}
}
# This is the backup of the catalog
FileSet {
Name = "FS-catalog"
Include {
Options {
signature = "MD5"
compression = "GZIP"
}
File = "/opt/bacula/working/bacula.sql"
File = "/opt/bacula/etc"
}
Exclude {
}
}
FileSet {
Name = "FS-verify"
Include {
Options {
verify = "pins1"
signature = "SHA1"
}
File = "/boot"
File = "/bin"
File = "/sbin"
File = "/usr/bin"
File = "/lib"
File = "/etc/sysconfig"
File = "/etc/ssh"
File = "/etc/security"
File = "/etc/exports"
File = "/etc/rc.d/init.d"
File = "/etc/sysctl.conf"
File = "/etc/services"
File = "/etc/xinetd.d"
File = "/etc/hosts.allow"
File = "/etc/hosts.deny"
File = "/etc/hosts"
File = "/etc/pam.d"
File = "/etc/resolv.conf"
}
Exclude {
}
}
### schedule
# When to do the backups, full backup on first sunday of the month,
# differential (i.e. incremental since full) every other sunday,
# and incremental backups other days
Schedule {
Name = "Schedule-WeeklyCycle"
Run = Level = Full Pool = Pool-01-File11 1st sun at 18:20
# Run = Level = Differential Pool = Pool-02-File11 2nd-5th sun at 18:52
Run = Level = Incremental Pool = Pool-03-File11 mon-sat at 18:20
}
# This schedule does the catalog. It starts after the Schedule-WeeklyCycle
Schedule {
Name = "Schedule-WeeklyCycleAfterBackup"
Run = Level = Full Pool = Pool-01-File11 sun-sat at 18:21
}
Schedule {
Name = "Schedule-VerifyCycle"
Run = Level = Catalog sun-sat at 18:22
}
### client
Client {
Name = "Client-baculac-fd"
Address = "192.168.56.58"
FDPort = "9102"
Password = "0il/RiL+dpjxD8tigziSEF4u3eH9tiU7uDbEruUzAcSF"
Catalog = "Catalog-default"
File Retention = 400 days
Job Retention = 450 days
AutoPrune = "yes"
}
Client {
Name = "Client-bacula"
Address = "192.168.56.57"
FDPort = "9102"
Password = "0il/RiL+dpjxD8tigziSEF4u3eH9tiU7uDbEruUzAcSF"
Catalog = "Catalog-default"
File Retention = 400 days
Job Retention = 450 days
AutoPrune = "yes"
}
Client {
Name = "Client-bacula-Verify"
Address = "192.168.56.57"
Catalog = "Catalog-verify"
Password = "0il/RiL+dpjxD8tigziSEF4u3eH9tiU7uDbEruUzAcSF"
File Retention = 400 days
Job Retention = 450 days
AutoPrune = "yes"
}
### catalog
# Generic catalog service
Catalog {
Name = "Catalog-default"
dbname = "bacula"; dbuser = "bacula"; dbpassword = "1"
}
Catalog {
Name = "Catalog-verify"
dbname = "bacula"; dbuser = "bacula"; dbpassword = "1"
}
### storage
# Definition of file Virtual Autochanger device
Autochanger {
Name = "AC-File11"
Address = "192.168.56.57"
SDPort = "9103"
Password = "tgw7QKL+Tc/4rts0PCt+keic7sF6F1BrjYpO2fmj962z"
Device = "AC-FileGr1"
Media Type = "File11"
Maximum Concurrent Jobs = "10"
}
Storage {
Name = "AC-01-FileGr1-Dev1"
Address = "192.168.56.57"
SDPort = "9103"
Password = "tgw7QKL+Tc/4rts0PCt+keic7sF6F1BrjYpO2fmj962z"
Device = "AC-01-FileGr1-Dev1"
Media Type = "File11"
Maximum Concurrent Jobs = "5"
Autochanger = "AC-File11"
}
Storage {
Name = "AC-02-FileGr1-Dev2"
Address = "192.168.56.57"
SDPort = "9103"
Password = "tgw7QKL+Tc/4rts0PCt+keic7sF6F1BrjYpO2fmj962z"
Device = "AC-02-FileGr1-Dev2"
Media Type = "File11"
Maximum Concurrent Jobs = "5"
Autochanger = "AC-File11"
}
Storage {
Name = "AC-03-FileGr1-Dev3"
Address = "192.168.56.57"
SDPort = "9103"
Password = "tgw7QKL+Tc/4rts0PCt+keic7sF6F1BrjYpO2fmj962z"
Device = "AC-03-FileGr1-Dev3"
Media Type = "File11"
Maximum Concurrent Jobs = "5"
Autochanger = "AC-File11"
}
Storage {
Name = "Restore-AC-FileGr1"
Address = "192.168.56.57"
SDPort = "9103"
Password = "tgw7QKL+Tc/4rts0PCt+keic7sF6F1BrjYpO2fmj962z"
Device = "Restore-AC-FileGr1"
Media Type = "File11"
Autochanger = "AC-File11"
}
### pool
# Full
Pool {
Name = "Pool-01-File11"
Storage = "AC-01-FileGr1-Dev1"
Pool Type = "Backup"
Label Format = "Label-Pool-01-File11-"
Volume Retention = 395 days # 1 year + 30 days extra
Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
Maximum Volumes = "24" # Limit number of Volumes in Pool. The Job of this Pool will performed only a time by month, so the double is more than sufficient.
Maximum Volume Jobs = "2" # One file for each backup. It is dependently how much client you have, in this case we have 2 clients
Recycle = "yes" # Bacula can automatically recycle Volumes
AutoPrune = "yes" # Prune expired volumes
Action On Purge = "Truncate"
}
# Differential
Pool {
Name = "Pool-02-File11"
Storage = "AC-02-FileGr1-Dev2"
Pool Type = "Backup"
Label Format = "Label-Pool-02-File11-"
Volume Retention = 395 days # 1 year + 30 days extra
Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
Maximum Volumes = "500" # Limit number of Volumes in Pool
Maximum Volume Jobs = "2" # One file for each backup. It is dependently how much client you have, in this case we have 2 clients
Recycle = "yes" # Bacula can automatically recycle Volumes
AutoPrune = "yes" # Prune expired volumes
Action On Purge = "Truncate"
}
# Incremental
Pool {
Name = "Pool-03-File11"
Storage = "AC-03-FileGr1-Dev3"
Pool Type = "Backup"
Label Format = "Label-Pool-03-File11-"
Volume Retention = 395 days # 1 year + 30 days extra
Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
Maximum Volumes = "80" # Limit number of Volumes in Pool. As this the Job of this Pool will use the same volume by a week, it will be 1 volume by week, 5 volumes in a month, 60 volumes in a year, so 80 is sufficient.
Maximum Volume Jobs = "12" # Change the file after a week. It is dependently how much client you have, in this case we have 2 clients
Recycle = "yes" # Bacula can automatically recycle Volumes
AutoPrune = "yes" # Prune expired volumes
Action On Purge = "Truncate"
}
# Scratch pool definition
Pool {
Name = "Scratch"
Pool Type = "Backup"
Label Format = "Local-"
}
### messages
# Reasonable message delivery -- send most everything to email address
# and to the console
Messages {
Name = "Standard"
#
# NOTE! If you send to two email or more email addresses, you will need
# to replace the %r in the from field (-f part) with a single valid
# email address in both the mailcommand and the operatorcommand.
# What this does is, it sets the email address that emails would display
# in the FROM field, which is by default the same email as they're being
# sent to. However, if you send email to more than one address, then
# you'll have to set the FROM address manually, to a single address.
# for example, a '[email protected]', is better since that tends to
# tell (most) people that its coming from an automated source.
#
mailcommand = "/opt/bacula/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/opt/bacula/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
mail = root@localhost = all, !skipped
operator = root@localhost = mount
console = all, !skipped, !saved
#
# WARNING! the following will create a file that you must cycle from
# time to time as it will grow indefinitely. However, it will
# also keep all your messages if they scroll off the console.
#
append = "/opt/bacula/log/bacula.log" = all, !skipped
catalog = "all"
}
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/opt/bacula/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = root@localhost = all, !skipped
console = all, !skipped, !saved
append = "/opt/bacula/log/bacula.log" = all, !skipped
}
#@|"find /etc/bacula/conf.d -name '*.conf' -type f -exec echo @{} \;"