/
bareos-dir.conf.in
330 lines (302 loc) · 9.55 KB
/
bareos-dir.conf.in
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
#
# Default Bareos Director configuration file for disk-only backup
# (C) 2013 Bareos GmbH & Co.KG
#
# Each configuration item has a reference number that shows
# where this property can be changed in the configuration file.
# Search for the number to find the correct line.
#
# You have to configure the following accoring to your environment:
#
# (#01)Email Address for bareos disaster recovery.
# Specify a mailaddress outside of your backupserver.
# There will be one mail per day.
#
# (#02)Email Address for bareos reports. (Mail Command)
# This mail address will recieve a report about each backup job.
# It will be sent after the backupjob is complete.
# Has to be configured twice ("Standard" and "Daemon" Message Ressources)
#
# (#03)Email Address for bareos operator. (Operator Command)
# This mail address will recieve a mail immediately when the
# bareos system needs an operator intervention.
# May be the same address as in (#02)
#
#
# This disk-only setup stores all data into @archivedir@
#
# The preconfigured backup scheme is as follows:
#
# Full Backups are done on first Saturday at 21:00 (#04)
# Full Backups are written into the "Full" Pool (#05)
# Full Backups are kept for 365 Days (#06)
#
# Differential Backups are done on 2nd to 5th Saturday at 21:00 (#07)
# Differential Backups are written into the "Differential" Pool (#08)
# Differential Backups are kept for 90 Days (#09)
#
# Incremental Backups are done monday to friday at 21:00 (#10)
# Incremental Backups are written into the "Incremental" Pool (#11)
# Incremental Backups are kept for 30 Days (#12)
#
# What you also have to do is to change the default fileset (#13)
# to either one of the demo filesets given or create our own fileset.
#
#
#
# For Bareos release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@
#
#
Director { # define myself
Name = @basename@-dir
QueryFile = "@scriptdir@/query.sql"
Maximum Concurrent Jobs = 10
Password = "@dir_password@" # Console password
Messages = Daemon
# remove comment in next line to load plugins from specified directory
# Plugin Directory = @plugindir@
}
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = @basename@-fd
FileSet = "SelfTest" # selftest fileset (#13)
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = Incremental
Priority = 10
Write Bootstrap = "@working_dir@/%c.bsr"
Full Backup Pool = Full # write Full Backups into "Full" Pool (#05)
Differential Backup Pool = Differential # write Diff Backups into "Differential" Pool (#08)
Incremental Backup Pool = Incremental # write Incr Backups into "Incremental" Pool (#11)
}
#
# Define the main nightly save backup job
# By default, this job will back up to disk in @archivedir@
Job {
Name = "BackupClient1"
JobDefs = "DefaultJob"
}
#
# Backup the catalog database (after the nightly save)
#
Job {
Name = "BackupCatalog"
JobDefs = "DefaultJob"
Level = Full
FileSet="Catalog"
Schedule = "WeeklyCycleAfterBackup"
# This creates an ASCII copy of the catalog
# Arguments to make_catalog_backup.pl are:
# make_catalog_backup.pl <catalog-name>
RunBeforeJob = "@scriptdir@/make_catalog_backup.pl MyCatalog"
# This deletes the copy of the catalog
RunAfterJob = "@scriptdir@/delete_catalog_backup"
# This sends the bootstrap via mail for disaster recovery.
# Should be sent to another system, please change recipient accordingly
Write Bootstrap = "|@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" @job_email@" # (#01)
Priority = 11 # run after main backup
}
#
# Standard Restore template, to be changed by Console program
# Only one such job is needed for all Jobs/Clients/Storage ...
#
Job {
Name = "RestoreFiles"
Type = Restore
Client=@basename@-fd
FileSet = "Linux All"
Storage = File
Pool = Incremental
Messages = Standard
Where = /tmp/bareos-restores
}
FileSet {
Name = "Windows All Drives"
Enable VSS = yes
Include {
Options {
Signature = MD5
Drive Type = fixed
IgnoreCase = yes
WildFile = "[A-Z]:/pagefile.sys"
WildDir = "[A-Z]:/RECYCLER"
WildDir = "[A-Z]:/$RECYCLE.BIN"
WildDir = "[A-Z]:/System Volume Information"
Exclude = yes
}
File = /
}
}
FileSet {
Name = "Linux All"
Include {
Options {
Signature = MD5 # calculate md5 checksum per file
One FS = No # change into other filessytems
FS Type = ext2 # filesystems of given types will be backed up
FS Type = ext3 # others will be ignored
FS Type = ext4
FS Type = xfs
FS Type = reiserfs
FS Type = jfs
FS Type = btrfs
}
File = /
}
# Things that usually have to be excluded
# You have to exclude @archivedir@
# on your bareos server
Exclude {
File = @working_dir@
File = @archivedir@
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}
# fileset just to backup some files for selftest
FileSet {
Name = "SelfTest"
Include {
Options {
Signature = MD5 # calculate md5 checksum per file
}
File = @sbindir@
}
}
Schedule {
Name = "WeeklyCycle"
Run = Full 1st sat at 21:00 # (#04)
Run = Differential 2nd-5th sat at 21:00 # (#07)
Run = Incremental mon-fri at 21:00 # (#10)
}
# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full mon-fri at 21:10
}
# This is the backup of the catalog
FileSet {
Name = "Catalog"
Include {
Options {
signature = MD5
}
File = "@working_dir@/@db_name@.sql" # database dump
File = "@sysconfdir@" # configuration
}
}
# Client (File Services) to backup
Client {
Name = @basename@-fd
Address = @hostname@
Password = "@fd_password@" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = no # Prune expired Jobs/Files
}
#
# Definition of file storage device
#
Storage {
Name = File
# Do not use "localhost" here
Address = @hostname@ # N.B. Use a fully qualified name here
Password = "@sd_password@"
Device = FileStorage
Media Type = File
}
#
# Generic catalog service
#
Catalog {
Name = MyCatalog
# Uncomment the following lines if you want the dbi driver
@uncomment_dbi@ dbdriver = "dbi:@DEFAULT_DB_TYPE@"; dbaddress = 127.0.0.1; dbport = @db_port@
#dbdriver = "@DEFAULT_DB_TYPE@"
dbdriver = "XXX_REPLACE_WITH_DATABASE_DRIVER_XXX"
dbname = "@db_name@"
dbuser = "@db_user@"
dbpassword = "@db_password@"
}
#
# Reasonable message delivery -- send most everything to email address and to the console
#
Messages {
Name = Standard
mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r"
operatorcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r"
mail = @job_email@ = all, !skipped # (#02)
operator = @job_email@ = mount # (#03)
console = all, !skipped, !saved
append = "@logdir@/bareos.log" = all, !skipped
catalog = all
}
#
# Message delivery for daemon messages (no job).
#
Messages {
Name = Daemon
mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r"
mail = @job_email@ = all, !skipped # (#02)
console = all, !skipped, !saved
append = "@logdir@/bareos.log" = all, !skipped
}
#
# Full Pool definition
#
Pool {
Name = Full
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # How long should the Full Backups be kept? (#06)
Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
Label Format = "Full-" # Volumes will be labeled "Full-<volume-id>"
}
#
# Differential Pool definition
#
Pool {
Name = Differential
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 90 days # How long should the Differential Backups be kept? (#09)
Maximum Volume Bytes = 10G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
Label Format = "Differential-" # Volumes will be labeled "Differential-<volume-id>"
}
#
# Incremental Pool definition
#
Pool {
Name = Incremental
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 30 days # How long should the Incremental Backups be kept? (#12)
Maximum Volume Bytes = 1G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
Label Format = "Incremental-" # Volumes will be labeled "Incremental-<volume-id>"
}
#
# Scratch pool definition
#
Pool {
Name = Scratch
Pool Type = Backup
}
#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = @basename@-mon
Password = "@mon_dir_password@"
CommandACL = status, .status
}