1#
2# This disk-only setup stores all data into @archivedir@
3#
4# The preconfigured backup scheme is as follows:
5#
6#   Full Backups are done on first Saturday at 21:00              (#04)
7#   Full Backups are written into the "Full" Pool                 (#05)
8#   Full Backups are kept for 365 Days                            (#06)
9#
10#   Differential Backups are done on 2nd to 5th Saturday at 21:00 (#07)
11#   Differential Backups are written into the "Differential" Pool (#08)
12#   Differential Backups are kept for 90 Days                     (#09)
13#
14#   Incremental Backups are done monday to friday at 21:00        (#10)
15#   Incremental Backups are written into the "Incremental" Pool   (#11)
16#   Incremental Backups are kept for 30 Days                      (#12)
17#
18#   What you also have to do is to change the default fileset     (#13)
19#   to either one of the demo filesets given or create our own fileset.
20#
21#  For Bareos release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@
22#
23Director {                            # define myself
24  Name = @basename@-dir
25  QueryFile = "@scriptdir@/query.sql"
26  Maximum Concurrent Jobs = 10
27  Password = "@dir_password@"         # Console password
28  Messages = Standard
29  Auditing = yes
30
31  # remove comment in next line to load dynamic backends from specified directory
32  # Backend Directory = @backenddir@
33
34  # remove comment from "Plugin Directory" to load plugins from specified directory.
35  # if "Plugin Names" is defined, only the specified plugins will be loaded,
36  # otherwise all director plugins (*-dir.so) from the "Plugin Directory".
37  #
38  # Plugin Directory = @plugindir@
39  # Plugin Names = ""
40}
41
42JobDefs {
43  Name = "DefaultJob"
44  Type = Backup
45  Level = Incremental
46  Client = @basename@-fd
47  FileSet = "SelfTest"
48  Storage = File
49  Messages = Standard
50  Pool = Incremental
51  Priority = 10
52  Write Bootstrap = "@working_dir@/%c.bsr"
53  Full Backup Pool = Full                  # write Full Backups into "Full" Pool         (#05)
54  Differential Backup Pool = Differential  # write Diff Backups into "Differential" Pool (#08)
55  Incremental Backup Pool = Incremental    # write Incr Backups into "Incremental" Pool  (#11)
56}
57
58#
59# Define the main nightly save backup job
60#   By default, this job will back up to disk in @archivedir@
61Job {
62  Name = "BackupClient1"
63  JobDefs = "DefaultJob"
64}
65
66Job {
67  Name = "BackupClient1FileList"
68  JobDefs = "DefaultJob"
69  FileSet = "FS_TESTJOB1"
70}
71
72#
73# Backup the catalog database (after the nightly save)
74#
75Job {
76  Name = "BackupCatalog"
77  JobDefs = "DefaultJob"
78  Level = Full
79  FileSet="Catalog"
80
81  # This creates an ASCII copy of the catalog
82  # Arguments to make_catalog_backup.pl are:
83  #  make_catalog_backup.pl <catalog-name>
84  RunBeforeJob = "@scriptdir@/make_catalog_backup.pl MyCatalog"
85
86  # This deletes the copy of the catalog
87  RunAfterJob  = "@scriptdir@/delete_catalog_backup"
88
89  # This sends the bootstrap via mail for disaster recovery.
90  # Should be sent to another system, please change recipient accordingly
91  Write Bootstrap = "|@bindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" @job_email@" # (#01)
92  Priority = 11                   # run after main backup
93}
94
95#
96# Standard Restore template, to be changed by Console program
97#  Only one such job is needed for all Jobs/Clients/Storage ...
98#
99Job {
100  Name = "RestoreFiles"
101  Type = Restore
102  Client=@basename@-fd
103  FileSet = "Linux All"
104  Storage = File
105  Pool = Incremental
106  Messages = Standard
107  Where = /tmp/bareos-restores
108}
109
110FileSet {
111  Name = "Linux All"
112  Include {
113    Options {
114      Signature = MD5 # calculate md5 checksum per file
115      One FS = No     # change into other filessytems
116      FS Type = ext2  # filesystems of given types will be backed up
117      FS Type = ext3  # others will be ignored
118      FS Type = ext4
119      FS Type = xfs
120      FS Type = zfs
121      FS Type = reiserfs
122      FS Type = jfs
123      FS Type = btrfs
124    }
125    File = /
126  }
127  # Things that usually have to be excluded
128  # You have to exclude @archivedir@
129  # on your bareos server
130  Exclude {
131    File = @working_dir@
132    File = @archivedir@
133    File = /proc
134    File = /tmp
135    File = /.journal
136    File = /.fsck
137  }
138}
139
140FileSet {
141 Name = FS_TESTJOB1
142 Include {
143   Options {
144    Signature = MD5
145   }
146   File=<@tmpdir@/file-list
147 }
148}
149
150FileSet {
151  Name = "SelfTest"
152  Include {
153    Options {
154      Signature = MD5
155    }
156    File = "@builddir@"
157  }
158}
159
160
161# This is the backup of the catalog
162FileSet {
163  Name = "Catalog"
164  Include {
165    Options {
166      signature = MD5
167    }
168    File = "@working_dir@/@db_name@.sql" # database dump
169    File = "@confdir@"                   # configuration
170  }
171}
172
173# Client (File Services) to backup
174Client {
175  Name = @basename@-fd
176  Address = @hostname@
177  Password = "@fd_password@"          # password for FileDaemon
178}
179
180#
181# Definition of file storage device
182#
183Storage {
184  Name = File
185# Do not use "localhost" here
186  Address = @hostname@                # N.B. Use a fully qualified name here
187  Password = "@sd_password@"
188  Device = FileStorage
189  Media Type = File
190}
191
192#
193# Generic catalog service
194#
195Catalog {
196  Name = MyCatalog
197  dbdriver = "@db_type@"
198  dbname = "@db_name@"
199  dbuser = "@db_user@"
200  dbpassword = "@db_password@"
201}
202
203#
204# Reasonable message delivery -- send most everything to email address and to the console
205#
206Messages {
207  Name = Standard
208  console = all, !skipped, !saved, !audit
209  catalog = all, !audit
210}
211
212#
213# Full Pool definition
214#
215Pool {
216  Name = Full
217  Pool Type = Backup
218  Recycle = yes                       # Bareos can automatically recycle Volumes
219  AutoPrune = yes                     # Prune expired volumes
220  Volume Retention = 365 days         # How long should the Full Backups be kept? (#06)
221  Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
222  Maximum Volumes = 100               # Limit number of Volumes in Pool
223  Label Format = "Full-"              # Volumes will be labeled "Full-<volume-id>"
224}
225
226#
227# Differential Pool definition
228#
229Pool {
230  Name = Differential
231  Pool Type = Backup
232  Recycle = yes                       # Bareos can automatically recycle Volumes
233  AutoPrune = yes                     # Prune expired volumes
234  Volume Retention = 90 days          # How long should the Differential Backups be kept? (#09)
235  Maximum Volume Bytes = 10G          # Limit Volume size to something reasonable
236  Maximum Volumes = 100               # Limit number of Volumes in Pool
237  Label Format = "Differential-"      # Volumes will be labeled "Differential-<volume-id>"
238}
239
240#
241# Incremental Pool definition
242#
243Pool {
244  Name = Incremental
245  Pool Type = Backup
246  Recycle = yes                       # Bareos can automatically recycle Volumes
247  AutoPrune = yes                     # Prune expired volumes
248  Volume Retention = 30 days          # How long should the Incremental Backups be kept?  (#12)
249  Maximum Volume Bytes = 1G           # Limit Volume size to something reasonable
250  Maximum Volumes = 100               # Limit number of Volumes in Pool
251  Label Format = "Incremental-"       # Volumes will be labeled "Incremental-<volume-id>"
252}
253
254#
255# Scratch pool definition
256#
257Pool {
258  Name = Scratch
259  Pool Type = Scratch
260}
261
262#
263# Restricted console used by tray-monitor to get the status of the director
264#
265Console {
266  Name = @basename@-mon
267  Password = "@mon_dir_password@"
268  CommandACL = status, .status
269  JobACL = *all*
270}
271