]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/main/fileset.tex
41175e86562a4e34321669c0ea2205f43456873b
[bacula/docs] / docs / manuals / en / main / fileset.tex
1 -%
2 %%
3
4 \section{The FileSet Resource}
5 \label{FileSetResource}
6 \index[general]{Resource!FileSet}
7 \index[general]{FileSet Resource}
8
9 The FileSet resource defines what files are to be included or excluded in a
10 backup job.  A {\bf FileSet} resource is required for each backup Job.  It
11 consists of a list of files or directories to be included, a list of files
12 or directories to be excluded and the various backup options such as
13 compression, encryption, and signatures that are to be applied to each
14 file.
15
16 Any change to the list of the included files will cause Bacula to
17 automatically create a new FileSet (defined by the name and an MD5 checksum
18 of the Include/Exclude contents).  Each time a new FileSet is created,
19 Bacula will ensure that the next backup is always a Full save.
20
21 Bacula is designed to handle most character sets of the world,
22 US ASCII, German, French, Chinese, ...  However, it does this by
23 encoding everything in UTF-8, and it expects all configuration files
24 (including those read on Win32 machines) to be in UTF-8 format.
25 UTF-8 is typically the default on Linux machines, but not on all
26 Unix machines, nor on Windows, so you must take some care to ensure
27 that your locale is set properly before starting Bacula.  
28 On most modern Win32 machines, you can edit the conf files with {\bf
29 notebook} and choose output encoding UTF-8.
30
31 To ensure that Bacula configuration files can be correctly read including
32 foreign characters the {\bf LANG} environment variable
33 must end in {\bf .UTF-8}. A full example is {\bf en\_US.UTF-8}. The
34 exact syntax may vary a bit from OS to OS, and exactly how you define
35 it will also vary.
36
37 Bacula assumes that all filenames are in UTF-8 format on Linux and
38 Unix machines. On Win32 they are in Unicode (UTF-16), and will
39 be automatically converted to UTF-8 format.
40
41
42 \begin{description}
43
44 \item [FileSet]
45 \index[dir]{FileSet}
46 \index[dir]{Directive!FileSet}
47 Start of the FileSet resource. One {\bf FileSet}  resource must be
48 defined for each Backup job.
49
50 \item [Name = \lt{}name\gt{}]
51 \index[dir]{Name}
52 \index[dir]{Directive!Name}
53    The name of the FileSet resource.  This directive is required. 
54
55 \item [Ignore FileSet Changes = \lt{}yes\vb{}no\gt{}]
56 \index[dir]{Ignore FileSet Changes}
57 \index[dir]{Directive!Ignore FileSet Changes}
58    Normally, if you modify the FileSet Include or Exclude lists,
59    the next backup will be forced to a Full so that Bacula can
60    guarantee that any additions or deletions are properly saved.
61
62    We strongly recommend against setting this directive to yes, 
63    since doing so may cause you to have an incomplete set of backups.
64
65    If this directive is set to {\bf yes}, any changes you make to the
66    FileSet Include or Exclude lists, will not force a Full during 
67    subsequent backups.
68
69    The default is {\bf no}, in which case, if you change the Include or
70    Exclude, Bacula will force a Full backup to ensure that everything is
71    properly backed up.
72
73 \item [Enable VSS = \lt{}yes\vb{}no\gt{}]
74 \index[dir]{Enable VSS}
75 \index[dir]{Directive!Enable VSS}
76   If this directive is set to {\bf yes} the File daemon will be notified
77   that the user wants to use a Volume Shadow Copy Service (VSS) backup
78   for this job. The default is {\bf yes}. This directive is effective
79   only for VSS enabled Win32 File daemons. It permits a consistent copy
80   of open files to be made for cooperating writer applications, and for
81   applications that are not VSS away, Bacula can at least copy open files.
82   The Volume Shadow Copy will only be done on Windows drives where the
83   drive (e.g. C:, D:, ...) is explicitly mentioned in a {\bf File}
84   directive.
85   For more information, please see the
86   \ilink{Windows}{VSS} chapter of this manual.
87
88
89 \item [Include \{ Options \{\lt{}file-options\gt{}\} ...;
90    \lt{}file-list\gt{} \} ]
91 \index[dir]{Include \{ [ Options \{\lt{}file-options\gt{}\} ...]
92    \lt{}file-list\gt{} \}  }
93 \index[dir]{Directive!Include}
94
95 \item [Options \{ \lt{}file-options\gt{} \} ]
96 \index[dir]{Options  \{ \lt{}file-options\gt{} \}  }
97
98 \item [Exclude \{ \lt{}file-list\gt{} \}]
99 \index[dir]{Exclude \{ \lt{}file-list\gt{} \} }
100 \index[dir]{Directive!Exclude}
101
102
103 \end{description}
104
105 The Include resource must contain a list of directories and/or files to be
106 processed in the backup job.  Normally, all files found in all
107 subdirectories of any directory in the Include File list will be backed up.
108 Note, see below for the definition of \lt{}file-list\gt{}.
109 The Include resource may also contain one or more Options resources that
110 specify options such as compression to be applied to all or any subset of
111 the files found when processing the file-list for backup. Please see
112 below for more details concerning Options resources.
113
114 There can be any number of {\bf Include} resources within the FileSet, each
115 having its own list of directories or files to be backed up and the backup
116 options defined by one or more Options resources.  The {\bf file-list}
117 consists of one file or directory name per line.  Directory names should be
118 specified without a trailing slash with Unix path notation.
119
120 Windows users, please take note to specify directories (even c:/...) in
121 Unix path notation. If you use Windows conventions, you will most likely
122 not be able to restore your files due to the fact that the Windows
123 path separator was defined as an escape character long before Windows
124 existed, and Bacula adheres to that convention (i.e. \\  means the next character
125 appears as itself).
126
127 You should always specify a full path for every directory and file that you
128 list in the FileSet.  In addition, on Windows machines, you should {\bf
129 always} prefix the directory or filename with the drive specification
130 (e.g.  {\bf c:/xxx}) using Unix directory name separators
131 (forward slash).  The drive letter itself can be upper or lower case (e.g.
132 c:/xxx or C:/xxx).
133
134 Bacula's default for processing directories is to recursively descend in
135 the directory saving all files and subdirectories.  Bacula will not by
136 default cross filesystems (or mount points in Unix parlance).  This means
137 that if you specify the root partition (e.g.  {\bf /}), Bacula will save
138 only the root partition and not any of the other mounted filesystems.
139 Similarly on Windows systems, you must explicitly specify each of the
140 drives you want saved (e.g.
141 {\bf c:/} and {\bf d:/} ...). In addition, at least for Windows systems, you
142 will most likely want to enclose each specification within double quotes
143 particularly if the directory (or file) name contains spaces. The {\bf df}
144 command on Unix systems will show you which mount points you must specify to
145 save everything. See below for an example. 
146
147 Take special care not to include a directory twice or Bacula will backup
148 the same files two times wasting a lot of space on your archive device.
149 Including a directory twice is very easy to do.  For example:
150
151 \footnotesize
152 \begin{verbatim}
153   Include {
154     Options { compression=GZIP }
155     File = /
156     File = /usr
157   }
158 \end{verbatim}
159 \normalsize
160
161 on a Unix system where /usr is a subdirectory (rather than a mounted
162 filesystem) will cause /usr to be backed up twice.
163
164 Please take note of the following items in the FileSet syntax: 
165
166 \begin{enumerate}
167 \item There is no equal sign (=) after the Include and before the opening
168    brace (\{). The same is true for the Exclude. 
169 \item Each directory (or filename) to be included or excluded is preceded by a {\bf File
170    =}.  Previously they were simply listed on separate lines. 
171 \item The options that previously appeared on the Include line now must be
172    specified within their own Options resource.
173 \item The Exclude resource does not accept Options. 
174 \item When using wild-cards or regular expressions, directory names are
175    always terminated with a slash (/) and filenames have no trailing slash.
176 \end{enumerate}
177
178 The Options resource is optional, but when specified, it will contain a
179 list of {\bf keyword=value} options to be applied to the file-list.
180 See below for the definition of file-list.    
181 Multiple Options resources may be specified one after another.  As the
182 files are found in the specified directories, the Options will applied to
183 the filenames to determine if and how the file should be backed up.  The
184 wildcard and regular expression pattern matching parts of the
185 Options resources are checked in the order they are specified in the
186 FileSet until the first one that matches. Once one matches, the
187 compression and other flags within the Options specification will
188 apply to the pattern matched.
189
190 A key point is that in the absence of an Option or no other Option is
191 matched, every file is accepted for backing up. This means that if
192 you want to exclude something, you must explicitly specify an Option
193 with an {\bf exclude = yes} and some pattern matching.
194
195 Once Bacula determines that the Options resource matches the file under
196 consideration, that file will be saved without looking at any other Options
197 resources that may be present.  This means that any wild cards must appear
198 before an Options resource without wild cards.
199
200 If for some reason, Bacula checks all the Options resources to a file under
201 consideration for backup, but there are no matches (generally because of wild
202 cards that don't match), Bacula as a default will then backup the file.  This
203 is quite logical if you consider the case of no Options clause is specified,
204 where you want everything to be backed up, and it is important to keep in mind
205 when excluding as mentioned above.
206
207 However, one additional point is that in the case that no match was found,
208 Bacula will use the options found in the last Options resource.  As a
209 consequence, if you want a particular set of "default" options, you should put
210 them in an Options resource after any other Options.
211
212 It is a good idea to put all your wild-card and regex expressions inside
213 double quotes to prevent conf file scanning problems.
214
215 This is perhaps a bit overwhelming, so there are a number of examples included 
216 below to illustrate how this works.
217
218 You find yourself using a lot of Regex statements, which will cost quite a lot
219 of CPU time, we recommend you simplify them if you can, or better yet
220 convert them to Wild statements which are much more efficient.
221
222 The directives within an Options resource may be one of the following: 
223
224 \begin{description}
225
226 \item [compression=GZIP]
227 \index[dir]{compression}
228 \index[dir]{Directive!compression}
229    All files saved will be software compressed using the GNU ZIP
230    compression format.  The compression is done on a file by file basis by
231    the File daemon.  If there is a problem reading the tape in a single
232    record of a file, it will at most affect that file and none of the other
233    files on the tape.  Normally this option is {\bf not} needed if you have
234    a modern tape drive as the drive will do its own compression.  In fact,
235    if you specify software compression at the same time you have hardware
236    compression turned on, your files may actually take more space on the
237    volume.
238
239    Software compression is very important if you are writing your Volumes
240    to a file, and it can also be helpful if you have a fast computer but a
241    slow network, otherwise it is generally better to rely your tape drive's
242    hardware compression.  As noted above, it is not generally a good idea
243    to do both software and hardware compression.
244
245    Specifying {\bf GZIP} uses the default compression level 6 (i.e.  {\bf
246    GZIP} is identical to {\bf GZIP6}).  If you want a different compression
247    level (1 through 9), you can specify it by appending the level number
248    with no intervening spaces to {\bf GZIP}.  Thus {\bf compression=GZIP1}
249    would give minimum compression but the fastest algorithm, and {\bf
250    compression=GZIP9} would give the highest level of compression, but
251    requires more computation.  According to the GZIP documentation,
252    compression levels greater than six generally give very little extra
253    compression and are rather CPU intensive.
254
255    You can overwrite this option per Storage resource with
256    \ilink{AllowCompression}{AllowCompression} option.
257
258 \item [compression=LZO]
259 \index[dir]{compression}
260 \index[dir]{Directive!compression}
261    All files saved will be software compressed using the LZO
262    compression format. The compression is done on a file by file basis by
263    the File daemon. Everything else about GZIP is true for LZO.
264
265    LZO provides much faster compression and decompression speed but lower
266    compression ratio than GZIP. If your CPU is fast enough you should be able
267    to compress your data without making the backup duration longer.
268
269    Note that bacula only use one compression level LZO1X-1 specified by LZO.
270
271    You can overwrite this option per Storage resource with
272    \ilink{AllowCompression}{AllowCompression} option.
273
274 \item [signature=SHA1]
275 \index[dir]{signature}
276 \index[dir]{SHA1}
277 \index[dir]{Directive!signature}
278    An SHA1 signature will be computed for all The SHA1 algorithm is
279    purported to be some what slower than the MD5 algorithm, but at the same
280    time is significantly better from a cryptographic point of view (i.e.
281    much fewer collisions, much lower probability of being hacked.) It adds
282    four more bytes than the MD5 signature.  We strongly recommend that
283    either this option or MD5 be specified as a default for all files.
284    Note, only one of the two options MD5 or SHA1 can be computed for any
285    file.
286
287 \item [signature=MD5]
288 \index[dir]{signature}
289 \index[dir]{MD5}
290 \index[dir]{Directive!signature}
291    An MD5 signature will be computed for all files saved.  Adding this
292    option generates about 5\% extra overhead for each file saved.  In
293    addition to the additional CPU time, the MD5 signature adds 16 more
294    bytes per file to your catalog.  We strongly recommend that this option
295    or the SHA1 option be specified as a default for all files.
296
297
298 \item[basejob=\lt{}options\gt{}] 
299 \index[dir]{basejob}
300 \index[dir]{Directive!basejob}
301
302 The options letters specified are used when running a {\bf Backup Level=Full}
303 with BaseJobs. The options letters are the same as in the \textbf{verify=}
304 options below.
305
306 \item[accurate=\lt{}options\gt{}] \index[dir]{accurate}
307   \index[dir]{Directive!accurate} The options letters specified are used when
308   running a {\bf Backup Level=Incremental/Differential} in Accurate mode. The
309   options letters are the same as in the \textbf{verify=} directive below. 
310
311 \item [verify=\lt{}options\gt{}]
312 \index[dir]{verify}
313 \index[dir]{Directive!verify}
314    The options letters specified are used  when running a {\bf Verify
315    Level=Catalog} as well as the  {\bf DiskToCatalog} level job. The options
316    letters may be any  combination of the following:  
317
318       \begin{description}
319
320       \item {\bf i}
321       compare the inodes  
322
323       \item {\bf p}
324       compare the permission bits  
325
326       \item {\bf n}
327       compare the number of links  
328
329       \item {\bf u}
330       compare the user id  
331
332       \item {\bf g}
333       compare the group id  
334
335       \item {\bf s}
336       compare the size  
337
338       \item {\bf a}
339       compare the access time  
340
341       \item {\bf m}
342       compare the modification time (st\_mtime)  
343
344       \item {\bf c}
345       compare the change time (st\_ctime)  
346
347       \item {\bf d}
348       report file size decreases  
349
350       \item {\bf 5}
351       compare the MD5 signature  
352
353       \item {\bf 1}
354       compare the SHA1 signature  
355
356       \item {\bf A}
357       Only for Accurate option, it allows to always backup the file
358
359       \end{description}
360
361    A useful set of general options on the {\bf Level=Catalog}  or {\bf
362    Level=DiskToCatalog}  verify is {\bf pins5} i.e. compare permission bits,
363    inodes, number  of links, size, and MD5 changes. 
364
365 \item [onefs=yes\vb{}no]
366 \index[dir]{onefs}
367 \index[dir]{Directive!onefs}
368    If set to {\bf yes} (the default), {\bf Bacula} will remain on a single
369    file system.  That is it will not backup file systems that are mounted
370    on a subdirectory.  If you are using a *nix system, you may not even be
371    aware that there are several different filesystems as they are often
372    automatically mounted by the OS (e.g.  /dev, /net, /sys, /proc, ...).
373    Bacula will inform you when it decides not to
374    traverse into another filesystem.  This can be very useful if you forgot
375    to backup a particular partition.  An example of the informational
376    message in the job report is:
377
378 \footnotesize
379 \begin{verbatim}
380 rufus-fd: /misc is a different filesystem. Will not descend from / into /misc
381 rufus-fd: /net is a different filesystem. Will not descend from / into /net
382 rufus-fd: /var/lib/nfs/rpc_pipefs is a different filesystem. Will not descend from /var/lib/nfs into /var/lib/nfs/rpc_pipefs
383 rufus-fd: /selinux is a different filesystem. Will not descend from / into /selinux
384 rufus-fd: /sys is a different filesystem. Will not descend from / into /sys
385 rufus-fd: /dev is a different filesystem. Will not descend from / into /dev
386 rufus-fd: /home is a different filesystem. Will not descend from / into /home
387 \end{verbatim}
388 \normalsize
389
390    Note: in older versions of Bacula, the above message was of the form: 
391
392 \footnotesize
393 \begin{verbatim}
394 Filesystem change prohibited. Will not descend into /misc
395 \end{verbatim}
396 \normalsize
397
398    If you wish to backup multiple filesystems, you can  explicitly
399    list each filesystem you want saved.  Otherwise, if you set the onefs option
400    to {\bf no}, Bacula will backup  all mounted file systems (i.e. traverse mount
401    points) that  are found within the {\bf FileSet}. Thus if  you have NFS or
402    Samba file systems mounted on a directory listed  in your FileSet, they will
403    also be backed up. Normally, it is  preferable to set {\bf onefs=yes} and to
404    explicitly name  each filesystem you want backed up. Explicitly naming  the
405    filesystems you want backed up avoids the possibility  of getting into a
406    infinite loop recursing filesystems.  Another possibility is to 
407    use {\bf onefs=no} and to set {\bf fstype=ext2, ...}.             
408    See the example below for more details. 
409
410    If you think that Bacula should be backing up a particular directory
411    and it is not, and you have {\bf onefs=no} set, before you complain,
412    please do:
413
414 \footnotesize
415 \begin{verbatim}
416   stat /
417   stat <filesystem>
418 \end{verbatim}
419 \normalsize
420
421 where you replace {\bf filesystem} with the one in question.  If the 
422 {\bf Device:} number is different for / and for your filesystem, then they
423 are on different filesystems.  E.g.
424 \footnotesize
425 \begin{verbatim}
426 stat /
427   File: `/'
428   Size: 4096            Blocks: 16         IO Block: 4096   directory
429 Device: 302h/770d       Inode: 2           Links: 26
430 Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
431 Access: 2005-11-10 12:28:01.000000000 +0100
432 Modify: 2005-09-27 17:52:32.000000000 +0200
433 Change: 2005-09-27 17:52:32.000000000 +0200
434
435 stat /net
436   File: `/home'
437   Size: 4096            Blocks: 16         IO Block: 4096   directory
438 Device: 308h/776d       Inode: 2           Links: 7
439 Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
440 Access: 2005-11-10 12:28:02.000000000 +0100
441 Modify: 2005-11-06 12:36:48.000000000 +0100
442 Change: 2005-11-06 12:36:48.000000000 +0100
443 \end{verbatim}
444 \normalsize
445
446    Also be aware that even if you include {\bf /home} in your list
447    of files to backup, as you most likely should, you will get the
448    informational message that  "/home is a different filesystem" when 
449    Bacula is processing the {\bf /} directory.  This message does not
450    indicate an error. This message means that while examining the 
451    {\bf File =} referred to in the second part of the message, Bacula will 
452    not descend into the directory mentioned in the first part of the message.
453    However, it is possible that the separate filesystem will be backed up 
454    despite the message. For example, consider the following FileSet:
455
456 \footnotesize
457 \begin{verbatim}
458   File = /
459   File = /var
460 \end{verbatim}
461 \normalsize
462
463    where {\bf /var} is a separate filesystem.  In this example, you will get a
464    message saying that Bacula will not decend from {\bf /} into {\bf /var}.  But 
465    it is important to realise that Bacula will descend into {\bf /var} from the 
466    second File directive shown above.  In effect, the warning is bogus,
467    but it is supplied to alert you to possible omissions from your FileSet. In 
468    this example, {\bf /var} will be backed up.  If you changed the FileSet such 
469    that it did not specify {\bf /var}, then {\bf /var} will not be backed up.
470
471    
472 \item [honor nodump flag=\lt{}yes\vb{}no\gt{}]
473 \index[dir]{honornodumpflag}
474 \index[dir]{Directive!honornodumpflag}
475         If your file system supports the {\bf nodump} flag (e. g. most
476         BSD-derived systems) Bacula will honor the setting of the flag
477         when this option is set to {\bf yes}. Files having this flag set
478         will not be included in the backup and will not show up in the
479         catalog. For directories with the {\bf nodump} flag set recursion
480         is turned off and the directory will be listed in the catalog.
481         If the {\bf honor nodump flag} option is not defined
482         or set to {\bf no} every file and directory will be eligible for
483         backup.
484
485
486 \label{portable}
487 \item [portable=yes\vb{}no]
488 \index[dir]{portable}
489 \index[dir]{Directive!portable}
490    If set to {\bf yes} (default is {\bf no}), the Bacula File daemon will
491    backup Win32 files in a portable format, but not all Win32 file
492    attributes will be saved and restored.  By default, this option is set
493    to {\bf no}, which means that on Win32 systems, the data will be backed
494    up using Windows BackupRead  API calls and all the security and
495    ownership attributes will be properly backed up (and restored).  However
496    this format is not portable to other systems -- e.g.  Unix, and
497    very old  Win95/98/Me systems.
498    When backing up Unix systems, this option is ignored, and unless you
499    have a specific need to have portable backups, we recommend accept the
500    default ({\bf no}) so that the maximum information concerning your 
501    Windows files is saved.
502
503 \item [recurse=yes\vb{}no]
504 \index[dir]{recurse}
505 \index[dir]{Directive!recurse}
506    If set to {\bf yes} (the default), Bacula will recurse (or descend) into
507    all subdirectories found unless the directory is explicitly excluded
508    using an {\bf exclude} definition.  If you set {\bf recurse=no}, Bacula
509    will save the subdirectory entries, but not descend into the
510    subdirectories, and thus will not save the files or directories
511    contained in the subdirectories.  Normally, you will want the default
512    ({\bf yes}).
513
514 \item [sparse=yes\vb{}no]
515 \index[dir]{sparse}
516 \index[dir]{Directive!sparse}
517    Enable special code that checks for sparse files such as created by
518    ndbm.  The default is {\bf no}, so no checks are made for sparse files.
519    You may specify {\bf sparse=yes} even on files that are not sparse file.
520    No harm will be done, but there will be a small additional overhead to
521    check for buffers of all zero, and if there is a 32K block of all zeros
522    (see below), that block will become a hole in the file, which 
523    may not be desirable if the original file was not a sparse file.
524
525    {\bf Restrictions:} Bacula reads files in 32K buffers.  If the whole
526    buffer is zero, it will be treated as a sparse block and not written to
527    tape.  However, if any part of the buffer is non-zero, the whole buffer
528    will be written to tape, possibly including some disk sectors (generally
529    4098 bytes) that are all zero.  As a consequence, Bacula's detection of
530    sparse blocks is in 32K increments rather than the system block size.
531    If anyone considers this to be a real problem, please send in a request
532    for change with the reason.
533
534    If you are not familiar with sparse files, an example is say a file
535    where you wrote 512 bytes at address zero, then 512 bytes at address 1
536    million.  The operating system will allocate only two blocks, and the
537    empty space or hole will have nothing allocated.  However, when you read
538    the sparse file and read the addresses where nothing was written, the OS
539    will return all zeros as if the space were allocated, and if you backup
540    such a file, a lot of space will be used to write zeros to the volume.
541    Worse yet, when you restore the file, all the previously empty space
542    will now be allocated using much more disk space.  By turning on the
543    {\bf sparse} option, Bacula will specifically look for empty space in
544    the file, and any empty space will not be written to the Volume, nor
545    will it be restored.  The price to pay for this is that Bacula must
546    search each block it reads before writing it.  On a slow system, this
547    may be important.  If you suspect you have sparse files, you should
548    benchmark the difference or set sparse for only those files that are
549    really sparse.
550
551    You probably should not use this option on files or raw disk devices
552    that are not really sparse files (i.e. have holes in them).
553
554 \label{readfifo}
555 \item [readfifo=yes\vb{}no]
556 \index[dir]{readfifo}
557 \index[dir]{Directive!readfifo}
558    If enabled, tells the Client to read the data on a backup and write the
559    data on a restore to any FIFO (pipe) that is explicitly mentioned in the
560    FileSet.  In this case, you must have a program already running that
561    writes into the FIFO for a backup or reads from the FIFO on a restore.
562    This can be accomplished with the {\bf RunBeforeJob} directive.  If this
563    is not the case, Bacula will hang indefinitely on reading/writing the
564    FIFO. When this is not enabled (default), the Client simply saves the
565    directory entry for the FIFO.
566
567    Unfortunately, when Bacula runs a RunBeforeJob, it waits until that
568    script terminates, and if the script accesses the FIFO to write   
569    into the it, the Bacula job will block and everything will stall.
570    However, Vladimir Stavrinov as supplied tip that allows this feature   
571    to work correctly.  He simply adds the following to the beginning
572    of the RunBeforeJob script:
573
574 \begin{verbatim}
575    exec > /dev/null
576 \end{verbatim}
577
578 \item [noatime=yes\vb{}no]
579 \index[dir]{noatime}
580 \index[dir]{Directive!noatime}
581    If enabled, and if your Operating System supports the O\_NOATIME file
582    open flag, Bacula will open all files to be backed up with this option.
583    It makes it possible to read a file without updating the inode atime
584    (and also without the inode ctime update which happens if you try to set
585    the atime back to its previous value).  It also prevents a race
586    condition when two programs are reading the same file, but only one does
587    not want to change the atime.  It's most useful for backup programs and
588    file integrity checkers (and bacula can fit on both categories).
589
590    This option is particularly useful for sites where users are sensitive
591    to their MailBox file access time.  It replaces both the {\bf keepatime}
592    option without the inconveniences of that option (see below).
593
594    If your Operating System does not support this option, it will be
595    silently ignored by Bacula.
596
597
598 \item [mtimeonly=yes\vb{}no]
599 \index[dir]{mtimeonly}
600 \index[dir]{Directive!mtimeonly}
601    If enabled, tells the Client that the selection of files during
602    Incremental and Differential backups should based only on the st\_mtime
603    value in the stat() packet.  The default is {\bf no} which means that
604    the selection of files to be backed up will be based on both the
605    st\_mtime and the st\_ctime values.  In general, it is not recommended
606    to use this option.
607
608 \item [keepatime=yes\vb{}no]
609 \index[dir]{keepatime}
610 \index[dir]{Directive!keepatime}
611    The default is {\bf no}.  When enabled, Bacula will reset the st\_atime
612    (access time) field of files that it backs up to their value prior to
613    the backup.  This option is not generally recommended as there are very
614    few programs that use st\_atime, and the backup overhead is increased
615    because of the additional system call necessary to reset the times.
616    However, for some files, such as mailboxes, when Bacula backs up the
617    file, the user will notice that someone (Bacula) has accessed the
618    file. In this, case keepatime can be useful.
619    (I'm not sure this works on Win32).
620
621    Note, if you use this feature, when Bacula resets the access time, the
622    change time (st\_ctime) will automatically be modified by the system,
623    so on the next incremental job, the file will be backed up even if
624    it has not changed. As a consequence, you will probably also want
625    to use {\bf mtimeonly = yes} as well as keepatime (thanks to
626    Rudolf Cejka for this tip).
627
628 \item [checkfilechanges=yes\vb{}no]
629 \index[dir]{checkfilechanges}
630 \index[dir]{Directive!checkfilechanges}
631    On versions 2.0.4 or greater, 
632    if enabled, the Client will check size, age of each file after 
633    their backup to see if they have changed during backup. If time 
634    or size mismatch, an error will raise.
635
636 \begin{verbatim}
637  zog-fd: Client1.2007-03-31_09.46.21 Error: /tmp/test mtime changed during backup.
638 \end{verbatim}
639
640    In general, it is recommended to use this option.
641
642 \item [hardlinks=yes\vb{}no]
643 \index[dir]{hardlinks}
644 \index[dir]{Directive!hardlinks}
645    When enabled (default), this directive will cause hard links to be 
646    backed up. However, the File daemon keeps track of hard linked files and
647    will backup the data only once. The process of keeping track of the 
648    hard links can be quite expensive if you have lots of them (tens of
649    thousands or more). This doesn't occur on normal Unix systems, but if
650    you use a program like BackupPC, it can create hundreds of thousands, or
651    even millions of hard links. Backups become very long and the File daemon
652    will consume a lot of CPU power checking hard links.  In such a case,
653    set {\bf hardlinks=no} and hard links will not be backed up.  Note, using
654    this option will most likely backup more data and on a restore the file
655    system will not be restored identically to the original.
656
657 \item [wild=\lt{}string\gt{}]
658 \index[dir]{wild}
659 \index[dir]{Directive!wild}
660    Specifies a wild-card string to be applied to the filenames and
661    directory names.  Note, if {\bf Exclude} is not enabled, the wild-card
662    will select which files are to be included.  If {\bf Exclude=yes} is
663    specified, the wild-card will select which files are to be excluded.
664    Multiple wild-card directives may be specified, and they will be applied
665    in turn until the first one that matches.  Note, if you exclude a
666    directory, no files or directories below it will be matched.
667
668    You may want to test your expressions prior to running your
669    backup by using the bwild program. Please see the
670    \ilink{Utilities}{bwild} chapter of this manual for
671    more. You can also test your full FileSet definition by using
672    the \ilink{estimate}{estimate} command in the Console        
673    chapter of this manual.
674    It is recommended to enclose the string in double quotes.
675
676 \item [wilddir=\lt{}string\gt{}]
677 \index[dir]{wilddir}
678 \index[dir]{Directive!wilddir}
679    Specifies a wild-card string to be applied to directory names only.  No
680    filenames will be matched by this directive.  Note, if {\bf Exclude} is
681    not enabled, the wild-card will select directories to be
682    included.  If {\bf Exclude=yes} is specified, the wild-card will select
683    which directories are to be excluded.  Multiple wild-card directives may be
684    specified, and they will be applied in turn until the first one that
685    matches.  Note, if you exclude a directory, no files or directories
686    below it will be matched.
687
688    It is recommended to enclose the string in double quotes.
689
690    You may want to test your expressions prior to running your
691    backup by using the bwild program. Please see the
692    \ilink{Utilities}{bwild} chapter of this manual for
693    more. You can also test your full FileSet definition by using
694    the \ilink{estimate}{estimate} command in the Console        
695    chapter of this manual.
696    An example of excluding with the WildDir option on Win32 machines is    
697    presented below.
698
699 \item [wildfile=\lt{}string\gt{}]
700 \index[dir]{wildfile}
701 \index[dir]{Directive!wildfile}
702    Specifies a wild-card string to be applied to non-directories. That
703    is no directory entries will be matched by this directive.
704    However, note that the match is done against the full path and filename,
705    so your wild-card string must take into account that filenames
706    are preceded by the full path.
707    If {\bf Exclude}
708    is not enabled, the wild-card will select which files are to be
709    included.  If {\bf Exclude=yes} is specified, the wild-card will select
710    which files are to be excluded.  Multiple wild-card directives may be
711    specified, and they will be applied in turn until the first one that
712    matches.
713
714    It is recommended to enclose the string in double quotes.
715
716    You may want to test your expressions prior to running your
717    backup by using the bwild program. Please see the
718    \ilink{Utilities}{bwild} chapter of this manual for
719    more. You can also test your full FileSet definition by using
720    the \ilink{estimate}{estimate} command in the Console        
721    chapter of this manual.
722    An example of excluding with the WildFile option on Win32 machines is    
723    presented below.
724
725
726 \item [regex=\lt{}string\gt{}]
727 \index[dir]{regex}
728 \index[dir]{Directive!regex}
729    Specifies a POSIX extended regular expression to be applied to the
730    filenames and directory names, which include the full path.  If {\bf
731    Exclude} is not enabled, the regex will select which files are to be
732    included.  If {\bf Exclude=yes} is specified, the regex will select
733    which files are to be excluded.  Multiple regex directives may be
734    specified within an Options resource, and they will be applied in turn
735    until the first one that matches.  Note, if you exclude a directory, no
736    files or directories below it will be matched.
737
738    It is recommended to enclose the string in double quotes.
739
740    The regex libraries differ from one operating system to
741    another, and in addition, regular expressions are complicated,
742    so you may want to test your expressions prior to running your
743    backup by using the bregex program. Please see the
744    \ilink{Utilities}{bwild} chapter of this manual for
745    more. You can also test your full FileSet definition by using
746    the \ilink{estimate}{estimate} command in the Console        
747    chapter of this manual.
748
749    You find yourself using a lot of Regex statements, which will cost quite a lot
750    of CPU time, we recommend you simplify them if you can, or better yet
751    convert them to Wild statements which are much more efficient.
752
753
754 \item [regexfile=\lt{}string\gt{}]
755 \index[dir]{regexfile}
756 \index[dir]{Directive!regexfile}
757    Specifies a POSIX extended regular expression to be applied to
758    non-directories. No directories will be matched by this directive.  
759    However, note that the match is done against the full path and
760    filename, so your regex string must take into account that filenames
761    are preceded by the full path.
762    If {\bf Exclude} is not enabled, the regex will select which files are
763    to be included.  If {\bf Exclude=yes} is specified, the regex will
764    select which files are to be excluded.  Multiple regex directives may be
765    specified, and they will be applied in turn until the first one that
766    matches.
767
768    It is recommended to enclose the string in double quotes.
769
770    The regex libraries differ from one operating system to
771    another, and in addition, regular expressions are complicated,
772    so you may want to test your expressions prior to running your
773    backup by using the bregex program. Please see the
774    \ilink{Utilities}{bregex} chapter of this manual for
775    more.
776
777
778 \item [regexdir=\lt{}string\gt{}]
779 \index[dir]{regexdir}
780 \index[dir]{Directive!regexdir}
781    Specifies a POSIX extended regular expression to be applied to directory
782    names only.  No filenames will be matched by this directive.  Note, if
783    {\bf Exclude} is not enabled, the regex will select directories
784    files are to be included.  If {\bf Exclude=yes} is specified, the
785    regex will select which files are to be excluded.  Multiple
786    regex directives may be specified, and they will be applied in turn
787    until the first one that matches.  Note, if you exclude a directory, no
788    files or directories below it will be matched.
789
790    It is recommended to enclose the string in double quotes.
791
792    The regex libraries differ from one operating system to
793    another, and in addition, regular expressions are complicated,
794    so you may want to test your expressions prior to running your
795    backup by using the bregex program. Please see the
796    \ilink{Utilities}{bregex} chapter of this manual for
797    more.
798
799
800 \item [exclude=yes\vb{}no]
801 \index[dir]{exclude}
802 \index[dir]{Directive!exclude}
803    The default is {\bf no}.  When enabled, any files matched within the
804    Options will be excluded from the backup.
805
806 \label{ACLSupport}
807 \item [aclsupport=yes\vb{}no]
808 \index[dir]{aclsupport}
809 \index[dir]{Directive!aclsupport}
810    The default is {\bf no}.  If this option is set to yes, and you have the
811    POSIX {\bf libacl} installed on your Linux system, Bacula will backup the
812    file and directory Unix Access Control Lists (ACL) as defined in IEEE Std
813    1003.1e draft 17 and "POSIX.1e" (abandoned).  This feature is
814    available on Unix systems only and requires the Linux ACL library. Bacula is
815    automatically compiled with ACL support if the {\bf libacl} library is
816    installed on your Linux system (shown in config.out).  While restoring the
817    files Bacula will try to restore the ACLs, if there is no ACL support
818    available on the system, Bacula restores the files and directories but
819    not the ACL information.  Please note, if you backup an EXT3 or XFS
820    filesystem with ACLs, then you restore them to a different filesystem
821    (perhaps reiserfs) that does not have ACLs, the ACLs will be ignored.
822
823    For other operating systems there is support for either POSIX ACLs or
824    the more extensible NFSv4 ACLs.
825
826    The ACL stream format between Operation Systems is \textbf{not}
827    compatible so for example an ACL saved on Linux cannot be restored on
828    Solaris.
829
830    The following Operating Systems are currently supported:
831
832    \begin{enumerate}
833    \item AIX (pre-5.3 (POSIX) and post 5.3 (POSIX and NFSv4) ACLs)
834    \item Darwin
835    \item FreeBSD (POSIX and NFSv4/ZFS ACLs)
836    \item HPUX
837    \item IRIX
838    \item Linux
839    \item Solaris (POSIX and NFSv4/ZFS ACLs)
840    \item Tru64
841    \end{enumerate}
842
843 \label{XattrSupport}
844 \item [xattrsupport=yes\vb{}no]
845 \index[dir]{xattrsupport}
846 \index[dir]{Directive!xattrsupport}
847    The default is {\bf no}.  If this option is set to yes, and your
848    operating system support either so called Extended Attributes or
849    Extensible Attributes Bacula will backup the file and directory
850    XATTR data. This feature is available on UNIX only and depends on
851    support of some specific library calls in libc.
852
853    The XATTR stream format between Operating Systems is {\bf not}
854    compatible so an XATTR saved on Linux cannot for example be restored
855    on Solaris.
856
857    On some operating systems ACLs are also stored as Extended Attributes
858    (Linux, Darwin, FreeBSD) Bacula checks if you have the aclsupport
859    option enabled and if so will not save the same info when saving
860    extended attribute information. Thus ACLs are only saved once.
861
862    The following Operating Systems are currently supported:
863
864    \begin{enumerate}
865    \item AIX (Extended Attributes)
866    \item Darwin (Extended Attributes)
867    \item FreeBSD (Extended Attributes)
868    \item IRIX (Extended Attributes)
869    \item Linux (Extended Attributes)
870    \item NetBSD (Extended Attributes)
871    \item Solaris (Extended Attributes and Extensible Attributes)
872    \item Tru64 (Extended Attributes)
873    \end{enumerate}
874
875 \item [ignore case=yes\vb{}no]
876 \index[dir]{ignore case}
877 \index[dir]{Directive!ignore case}
878    The default is {\bf no}.  On Windows systems, you will almost surely
879    want to set this to {\bf yes}.  When this directive is set to {\bf yes}
880    all the case of character will be ignored in wild-card and regex
881    comparisons.  That is an uppercase A will match a lowercase a.
882
883 \item [fstype=filesystem-type]
884 \index[dir]{fstype}
885 \index[dir]{Directive!fstype}
886    This option allows you to select files and directories by the
887    filesystem type.  The permitted filesystem-type names are:
888
889    ext2, jfs, ntfs, proc, reiserfs, xfs, usbdevfs, sysfs, smbfs,
890    iso9660.
891
892    You may have multiple Fstype directives, and thus permit matching
893    of multiple filesystem types within a single Options resource.  If
894    the type specified on the fstype directive does not match the
895    filesystem for a particular directive, that directory will not be
896    backed up.  This directive can be used to prevent backing up
897    non-local filesystems. Normally, when you use this directive, you
898    would also set {\bf onefs=no} so that Bacula will traverse filesystems.
899
900    This option is not implemented in Win32 systems.
901
902 \item [DriveType=Windows-drive-type]
903 \index[dir]{DriveType}
904 \index[dir]{Directive!DriveType}
905    This option is effective only on Windows machines and is
906    somewhat similar to the Unix/Linux {\bf fstype} described
907    above, except that it allows you to select what Windows
908    drive types you want to allow.  By default all drive
909    types are accepted.
910
911    The permitted drivetype names are:
912
913    removable, fixed, remote, cdrom, ramdisk
914
915    You may have multiple Driveype directives, and thus permit matching
916    of multiple drive types within a single Options resource.  If
917    the type specified on the drivetype directive does not match the
918    filesystem for a particular directive, that directory will not be
919    backed up.  This directive can be used to prevent backing up
920    non-local filesystems. Normally, when you use this directive, you
921    would also set {\bf onefs=no} so that Bacula will traverse filesystems.
922
923    This option is not implemented in Unix/Linux systems.
924
925
926 \item [hfsplussupport=yes\vb{}no]
927 \index[dir]{hfsplussupport}
928 \index[dir]{Directive!hfsplussupport}
929    This option allows you to turn on support for Mac OSX HFS plus 
930    finder information.
931
932 \item [strippath=\lt{}integer\gt{}]
933 \index[dir]{strippath}
934 \index[dir]{Directive!strippath}
935    This option will cause {\bf integer} paths to be stripped from
936    the front of the full path/filename being backed up. This can
937    be useful if you are migrating data from another vendor or if
938    you have taken a snapshot into some subdirectory.  This directive
939    can cause your filenames to be overlayed with regular backup data,
940    so should be used only by experts and with great care.
941 \end{description}
942
943 {\bf \lt{}file-list\gt{}} is a list of directory and/or filename names
944 specified with a {\bf File =} directive. To include names containing spaces,
945 enclose the name between double-quotes. Wild-cards are not interpreted
946 in file-lists. They can only be specified in Options resources.
947
948 There are a number of special cases when specifying directories and files in a
949 {\bf file-list}. They are: 
950
951 \begin{itemize}
952 \item Any name preceded by an at-sign (@) is assumed to be the  name of a
953    file, which contains a list of files each preceded by a "File =".  The
954    named file is read once when the configuration file is parsed during the
955    Director startup.  Note, that the file is read on the Director's machine
956    and not on the Client's.  In fact, the @filename can appear anywhere
957    within the conf file where a token would be read, and the contents of
958    the named file will be logically inserted in the place of the @filename.
959    What must be in the file depends on the location the @filename is
960    specified in the conf file.  For example:
961
962 \footnotesize
963 \begin{verbatim}
964 Include {
965   Options { compression=GZIP }
966   @/home/files/my-files
967 }
968 \end{verbatim}
969 \normalsize
970
971 \item Any name beginning with a vertical bar (\vb) is  assumed to be the name of
972    a program.  This program will be executed on the Director's machine at
973    the time the Job starts (not when the Director reads the configuration
974    file), and any output from that program will be assumed to be a list of
975    files or directories, one per line, to be included. Before submitting the 
976    specified command bacula will performe 
977    \ilink{character substitution}{character substitution}.
978
979    This allows you to have a job that, for example, includes all the local
980    partitions even if you change the partitioning by adding a disk.  The
981    examples below show you how to do this.  However, please note two
982    things: \\
983    1.  if you want the local filesystems, you probably should be
984    using the new {\bf fstype} directive, which was added in version 1.36.3 
985    and set {\bf onefs=no}.
986    \\
987
988    2.  the exact syntax of the command needed in the examples below is very
989    system dependent.  For example, on recent Linux systems, you may need to
990    add the -P option, on FreeBSD systems, the options will be different as
991    well.
992
993    In general, you will need to prefix your command or commands with a {\bf
994    sh -c} so that they are invoked by a shell.  This will not be the case
995    if you are invoking a script as in the second example below.  Also, you
996    must take care to escape (precede with a \textbackslash{}) wild-cards,
997    shell character, and to ensure that any spaces in your command are
998    escaped as well.  If you use a single quotes (') within a double quote
999    ("), Bacula will treat everything between the single quotes as one field
1000    so it will not be necessary to escape the spaces.  In general, getting
1001    all the quotes and escapes correct is a real pain as you can see by the
1002    next example.  As a consequence, it is often easier to put everything in
1003    a file and simply use the file name within Bacula.  In that case the
1004    {\bf sh -c} will not be necessary providing the first line of the file
1005    is {\bf \#!/bin/sh}.
1006
1007    As an  example: 
1008
1009 \footnotesize
1010 \begin{verbatim}
1011  
1012 Include {
1013    Options { signature = SHA1 }
1014    File = "|sh -c 'df -l | grep \"^/dev/hd[ab]\" | grep -v \".*/tmp\" \
1015       | awk \"{print \\$6}\"'"
1016 }
1017 \end{verbatim}
1018 \normalsize
1019
1020    will produce a list of all the local partitions on a Red Hat Linux system.
1021    Note, the above line was split, but should normally  be written on one line. 
1022    Quoting is a real problem because you must quote for Bacula  which consists of
1023    preceding every \textbackslash{} and every " with a \textbackslash{}, and 
1024    you must also quote for the shell command. In the end, it is probably  easier
1025    just to execute a small file with: 
1026
1027
1028 \footnotesize
1029 \begin{verbatim}
1030 Include {
1031   Options {
1032     signature=MD5
1033   }
1034   File = "|my_partitions"
1035 }
1036 \end{verbatim}
1037 \normalsize
1038
1039    where my\_partitions has: 
1040
1041 \footnotesize
1042 \begin{verbatim}
1043 #!/bin/sh
1044 df -l | grep "^/dev/hd[ab]" | grep -v ".*/tmp" \
1045       | awk "{print \$6}"
1046 \end{verbatim}
1047 \normalsize
1048
1049    If the vertical bar (\verb+|+) in front of my\_partitions is preceded by a
1050    backslash as in \textbackslash{}\verb+|+, the program will be executed on the
1051    Client's machine instead of on the Director's machine.
1052    Please note that if the filename is given within quotes, you
1053    will need to use two slashes.  An example, provided by John Donagher,
1054    that backs up all the local UFS partitions on a remote system is:
1055
1056 \footnotesize
1057 \begin{verbatim}
1058 FileSet {
1059   Name = "All local partitions"
1060   Include {
1061     Options { signature=SHA1; onefs=yes; }
1062     File = "\\|bash -c \"df -klF ufs | tail +2 | awk '{print \$6}'\""
1063   }
1064 }
1065 \end{verbatim}
1066 \normalsize
1067
1068    The above requires two backslash characters after the double quote (one
1069    preserves  the next one). If you are a Linux user, just change the {\bf ufs}
1070    to  {\bf ext3} (or your preferred filesystem type), and you will be in 
1071    business.  
1072
1073    If you know what filesystems you have mounted on your system, e.g. 
1074    for Red Hat Linux normally only ext2 and ext3, you can backup
1075    all local filesystems using something like:
1076
1077 \footnotesize
1078 \begin{verbatim}
1079  
1080 Include {
1081    Options { signature = SHA1; onfs=no; fstype=ext2 }
1082    File = /
1083 }
1084 \end{verbatim}
1085 \normalsize
1086
1087
1088 \item Any file-list item preceded by a less-than sign (\lt{})  will be taken
1089    to be a file. This file will be read on the Director's machine (see
1090    below for doing it on the Client machine) at the time
1091    the Job starts, and the  data will be assumed to be a list of directories or
1092    files,  one per line, to be included. The names should start in  column 1 and
1093    should not be quoted even if they contain  spaces. This feature allows you to
1094    modify the external  file and change what will be saved without stopping and 
1095    restarting Bacula as would be necessary if using the @  modifier noted above.
1096    For example: 
1097
1098 \footnotesize
1099 \begin{verbatim}
1100 Include {
1101   Options { signature = SHA1 }
1102   File = "</home/files/local-filelist"
1103 }
1104 \end{verbatim}
1105 \normalsize
1106
1107    If you precede the less-than sign (\lt{}) with a backslash as in
1108    \textbackslash{}\lt{}, the file-list will be read on the Client machine
1109    instead of on the Director's machine.  Please note that if the filename
1110    is given within quotes, you will need to use two slashes.
1111
1112 \footnotesize
1113 \begin{verbatim}
1114 Include {
1115   Options { signature = SHA1 }
1116   File = "\\</home/xxx/filelist-on-client"
1117 }
1118 \end{verbatim}
1119 \normalsize
1120
1121 \item If you explicitly specify a block device such as {\bf /dev/hda1},  then
1122    Bacula (starting with version 1.28) will assume that this  is a raw partition
1123    to be backed up. In this case, you are strongly  urged to specify a {\bf
1124    sparse=yes} include option, otherwise, you  will save the whole partition
1125    rather than just the actual data that  the partition contains. For example: 
1126
1127 \footnotesize
1128 \begin{verbatim}
1129 Include {
1130   Options { signature=MD5; sparse=yes }
1131   File = /dev/hd6
1132 }
1133 \end{verbatim}
1134 \normalsize
1135
1136    will backup the data in device /dev/hd6. Note, the {bf /dev/hd6} must be
1137    the raw partition itself. Bacula will not back it up as a raw device if
1138    you specify a symbolic link to a raw device such as my be created by the
1139    LVM Snapshot utilities.
1140
1141    Ludovic Strappazon has pointed out that this feature can be  used to backup a
1142    full Microsoft Windows disk. Simply boot into  the system using a Linux Rescue
1143    disk, then load a statically  linked Bacula as described in the 
1144    \ilink{ Disaster Recovery Using Bacula}{RescueChapter} chapter of
1145    this manual. Then  save the whole disk partition. In the case of a disaster,
1146    you  can then restore the desired partition by again booting with  the rescue
1147    disk and doing a restore of the partition. 
1148    \item If you explicitly specify a FIFO device name (created with mkfifo),  and
1149    you add the option {\bf readfifo=yes} as an option, Bacula  will read the FIFO
1150    and back its data up to the Volume. For  example: 
1151
1152 \footnotesize
1153 \begin{verbatim}
1154 Include {
1155   Options {
1156     signature=SHA1
1157     readfifo=yes
1158   }
1159   File = /home/abc/fifo
1160 }
1161 \end{verbatim}
1162 \normalsize
1163
1164    if {\bf /home/abc/fifo} is a fifo device, Bacula will open the fifo,
1165    read it, and store all data thus obtained on the Volume.  Please note,
1166    you must have a process on the system that is writing into the fifo, or
1167    Bacula will hang, and after one minute of waiting, Bacula will give up
1168    and go on to the next file.  The data read can be anything since Bacula
1169    treats it as a stream.
1170
1171    This feature can be an excellent way to do a "hot" backup of a very
1172    large database.  You can use the {\bf RunBeforeJob} to create the fifo
1173    and to start a program that dynamically reads your database and writes
1174    it to the fifo.  Bacula will then write it to the Volume.  Be sure to
1175    read the \ilink{readfifo section}{readfifo} that gives a
1176    tip to ensure that the RunBeforeJob does not block Bacula.
1177
1178    During the restore operation, the inverse is true, after Bacula creates
1179    the fifo if there was any data stored with it (no need to explicitly
1180    list it or add any options), that data will be written back to the fifo.
1181    As a consequence, if any such FIFOs exist in the fileset to be restored,
1182    you must ensure that there is a reader program or Bacula will block, and
1183    after one minute, Bacula will time out the write to the fifo and move on
1184    to the next file.
1185
1186 \item A file-list may not contain wild-cards. Use directives in the
1187    Options resource if you wish to specify wild-cards or regular expression
1188    matching.
1189
1190 \item
1191 \index[general]{IgnoreDir}
1192 The {\bf ExcludeDirContaining = \lt{}filename\gt{}} is a directive that
1193 can be added to the Include section of the FileSet resource.  If the specified
1194 filename ({\bf filename-string}) is found on the Client in any directory to be
1195 backed up, the whole directory will be ignored (not backed up).  For example:
1196
1197 \begin{verbatim}
1198   # List of files to be backed up
1199   FileSet {
1200     Name = "MyFileSet"
1201     Include {
1202       Options {
1203         signature = MD5
1204       }
1205       File = /home
1206       Exclude Dir Containing = .excludeme
1207     }
1208   }
1209 \end{verbatim}
1210
1211 But in /home, there may be hundreds of directories of users and some
1212 people want to indicate that they don't want to have certain
1213 directories backed up. For example, with the above FileSet, if
1214 the user or sysadmin creates a file named {\bf .excludeme} in 
1215 specific directories, such as
1216
1217 \begin{verbatim}
1218    /home/user/www/cache/.excludeme
1219    /home/user/temp/.excludeme
1220 \end{verbatim}
1221
1222 then Bacula will not backup the two directories named:
1223
1224 \begin{verbatim}
1225    /home/user/www/cache
1226    /home/user/temp
1227 \end{verbatim}
1228
1229 NOTE: subdirectories will not be backed up.  That is, the directive
1230 applies to the two directories in question and any children (be they
1231 files, directories, etc).
1232
1233 \end{itemize}
1234
1235 \section{FileSet Examples}
1236 \index[general]{Examples!FileSet }
1237 \index[general]{FileSet Examples}
1238
1239 The following is an example of a valid FileSet resource definition.  Note,
1240 the first Include pulls in the contents of the file {\bf /etc/backup.list}
1241 when Bacula is started (i.e.  the @), and that file must have each filename
1242 to be backed up preceded by a {\bf File =} and on a separate line.
1243
1244 \footnotesize
1245 \begin{verbatim}
1246 FileSet {
1247   Name = "Full Set"
1248   Include {
1249     Options {
1250       Compression=GZIP
1251       signature=SHA1
1252       Sparse = yes
1253     }
1254     @/etc/backup.list
1255   }
1256   Include {
1257      Options {
1258         wildfile = "*.o"
1259         wildfile = "*.exe"
1260         Exclude = yes
1261      }
1262      File = /root/myfile
1263      File = /usr/lib/another_file
1264   }
1265 }
1266 \end{verbatim}
1267 \normalsize
1268
1269 In the above example, all the files contained in /etc/backup.list will
1270 be compressed with GZIP compression, an SHA1 signature will be computed on the
1271 file's contents (its data), and sparse file handling will apply. 
1272
1273 The two directories /root/myfile and /usr/lib/another\_file will also be saved
1274 without any options, but all files in those directories with the extensions
1275 {\bf .o} and {\bf .exe} will be excluded. 
1276
1277 Let's say that you now want to exclude the directory /tmp. The simplest way
1278 to do so is to add an exclude directive that lists /tmp.  The example
1279 above would then become:
1280
1281 \footnotesize 
1282 \begin{verbatim}
1283 FileSet {
1284   Name = "Full Set"
1285   Include {
1286     Options {
1287       Compression=GZIP
1288       signature=SHA1
1289       Sparse = yes
1290     }
1291     @/etc/backup.list
1292   }
1293   Include {
1294      Options {
1295         wildfile = "*.o"
1296         wildfile = "*.exe"
1297         Exclude = yes
1298      }
1299      File = /root/myfile
1300      File = /usr/lib/another_file
1301   }
1302   Exclude {
1303      File = /tmp                          # don't add trailing /
1304   }
1305 }
1306 \end{verbatim}
1307 \normalsize
1308
1309
1310 You can add wild-cards to the File directives listed in the Exclude
1311 directory, but you need to take care because if you exclude a directory,
1312 it and all files and directories below it will also be excluded.
1313
1314 Now lets take a slight variation on the above and suppose
1315 you want to save all your whole filesystem except {\bf /tmp}. 
1316 The problem that comes up is that Bacula will not normally
1317 cross from one filesystem to another.
1318 Doing a {\bf df} command, you get the following output: 
1319
1320 \footnotesize
1321 \begin{verbatim}
1322 [kern@rufus k]$ df
1323 Filesystem      1k-blocks      Used Available Use% Mounted on
1324 /dev/hda5         5044156    439232   4348692  10% /
1325 /dev/hda1           62193      4935     54047   9% /boot
1326 /dev/hda9        20161172   5524660  13612372  29% /home
1327 /dev/hda2           62217      6843     52161  12% /rescue
1328 /dev/hda8         5044156     42548   4745376   1% /tmp
1329 /dev/hda6         5044156   2613132   2174792  55% /usr
1330 none               127708         0    127708   0% /dev/shm
1331 //minimatou/c$   14099200   9895424   4203776  71% /mnt/mmatou
1332 lmatou:/          1554264    215884   1258056  15% /mnt/matou
1333 lmatou:/home      2478140   1589952    760072  68% /mnt/matou/home
1334 lmatou:/usr       1981000   1199960    678628  64% /mnt/matou/usr
1335 lpmatou:/          995116    484112    459596  52% /mnt/pmatou
1336 lpmatou:/home    19222656   2787880  15458228  16% /mnt/pmatou/home
1337 lpmatou:/usr      2478140   2038764    311260  87% /mnt/pmatou/usr
1338 deuter:/          4806936     97684   4465064   3% /mnt/deuter
1339 deuter:/home      4806904    280100   4282620   7% /mnt/deuter/home
1340 deuter:/files    44133352  27652876  14238608  67% /mnt/deuter/files
1341 \end{verbatim}
1342 \normalsize
1343
1344 And we see that there are a number of separate filesystems (/ /boot
1345 /home /rescue /tmp and /usr not to mention mounted systems).
1346 If you specify only {\bf /} in your Include list, Bacula will only save the
1347 Filesystem {\bf /dev/hda5}. To save all filesystems except {\bf /tmp} with
1348 out including any of the Samba or NFS mounted systems, and explicitly
1349 excluding a /tmp, /proc, .journal, and .autofsck, which you will not want to
1350 be saved and restored, you can use the following: 
1351
1352 \footnotesize
1353 \begin{verbatim}
1354 FileSet {
1355   Name = Include_example
1356   Include {
1357     Options {
1358        wilddir = /proc
1359        wilddir = /tmp
1360        wildfile = "/.journal"
1361        wildfile = "/.autofsck"
1362        exclude = yes
1363     }
1364     File = /
1365     File = /boot
1366     File = /home
1367     File = /rescue
1368     File = /usr
1369   }
1370 }
1371 \end{verbatim}
1372 \normalsize
1373
1374 Since /tmp is on its own filesystem and it was not explicitly named in the
1375 Include list, it is not really needed in the exclude list. It is better to
1376 list it in the Exclude list for clarity, and in case the disks are changed so
1377 that it is no longer in its own partition. 
1378
1379 Now, lets assume you only want to backup .Z and .gz files and nothing 
1380 else. This is a bit trickier because Bacula by default will select 
1381 everything to backup, so we must exclude everything but .Z and .gz files.
1382 If we take the first example above and make the obvious modifications
1383 to it, we might come up with a FileSet that looks like this:
1384
1385 \footnotesize 
1386 \begin{verbatim}
1387 FileSet {
1388   Name = "Full Set"
1389   Include {                    !!!!!!!!!!!!
1390      Options {                    This
1391         wildfile = "*.Z"          example
1392         wildfile = "*.gz"         doesn't
1393                                   work
1394      }                          !!!!!!!!!!!!
1395      File = /myfile
1396   }
1397 }
1398 \end{verbatim}
1399 \normalsize
1400
1401 The *.Z and *.gz files will indeed be backed up, but all other files
1402 that are not matched by the Options directives will automatically
1403 be backed up too (i.e. that is the default rule).
1404
1405 To accomplish what we want, we must explicitly exclude all other files.
1406 We do this with the following:
1407
1408 \footnotesize
1409 \begin{verbatim}
1410 FileSet {
1411   Name = "Full Set"
1412   Include {
1413      Options {
1414         wildfile = "*.Z"
1415         wildfile = "*.gz"
1416      }
1417      Options {
1418         Exclude = yes
1419         RegexFile = ".*"
1420      }
1421      File = /myfile
1422   }
1423 }
1424 \end{verbatim}
1425 \normalsize
1426
1427 The "trick" here was to add a RegexFile expression that matches
1428 all files. It does not match directory names, so all directories in
1429 /myfile will be backed up (the directory entry) and any *.Z and *.gz
1430 files contained in them. If you know that certain directories do
1431 not contain any *.Z or *.gz files and you do not want the directory
1432 entries backed up, you will need to explicitly exclude those directories.
1433 Backing up a directory entries is not very expensive.
1434
1435 Bacula uses the system regex library and some of them are
1436 different on different OSes. The above has been reported not to work
1437 on FreeBSD. This can be tested by using the {\bf estimate job=job-name
1438 listing} command in the console and adapting the RegexFile expression
1439 appropriately. In a future version of Bacula, we will supply our own
1440 Regex code to avoid such system dependencies.
1441
1442 Please be aware that allowing Bacula to traverse or change file systems can be
1443 {\bf very} dangerous. For example, with the following: 
1444
1445 \footnotesize
1446 \begin{verbatim}
1447 FileSet {
1448   Name = "Bad example"
1449   Include {
1450     Options { onefs=no }
1451     File = /mnt/matou
1452   }
1453 }
1454 \end{verbatim}
1455 \normalsize
1456
1457 you will be backing up an NFS mounted partition ({\bf /mnt/matou}), and since
1458 {\bf onefs} is set to {\bf no}, Bacula will traverse file systems. Now if {\bf
1459 /mnt/matou} has the current machine's file systems mounted, as is often the
1460 case, you will get yourself into a recursive loop and the backup will never
1461 end. 
1462
1463 As a final example, let's say that you have only one or two 
1464 subdirectories of /home that you want to backup.  For example,
1465 you want to backup only subdirectories beginning with the letter
1466 a and the letter b -- i.e. /home/a* and /home/b*.  Now, you might first
1467 try:
1468 \footnotesize
1469 \begin{verbatim}
1470 FileSet {
1471   Name = "Full Set"
1472   Include {
1473      Options {
1474         wilddir = "/home/a*"
1475         wilddir = "/home/b*"
1476      }
1477      File = /home
1478   }
1479 }
1480 \end{verbatim}
1481 \normalsize
1482
1483 The problem is that the above will include everything in /home.  To get
1484 things to work correctly, you need to start with the idea of exclusion
1485 instead of inclusion.  So, you could simply exclude all directories
1486 except the two you want to use:
1487 \footnotesize
1488 \begin{verbatim}
1489 FileSet {
1490   Name = "Full Set"
1491   Include {
1492      Options {
1493         RegexDir = "^/home/[c-z]"
1494         exclude = yes
1495      }
1496      File = /home
1497   }
1498 }
1499 \end{verbatim}
1500 \normalsize
1501
1502 And assuming that all subdirectories start with a lowercase letter, this
1503 would work.
1504
1505 An alternative would be to include the two subdirectories desired and
1506 exclude everything else:
1507 \footnotesize
1508 \begin{verbatim}
1509 FileSet {
1510   Name = "Full Set"
1511   Include {
1512      Options {
1513         wilddir = "/home/a*"
1514         wilddir = "/home/b*"
1515      }
1516      Options {
1517         RegexDir = ".*"
1518         exclude = yes
1519      }
1520      File = /home
1521   }
1522 }
1523 \end{verbatim}
1524 \normalsize
1525
1526
1527 The following example shows how to back up only the My Pictures directory inside
1528 the My Documents directory for all users in C:/Documents and Settings, i.e.
1529 everything matching the pattern:
1530
1531 C:/Documents and Settings/*/My Documents/My Pictures/*
1532
1533 To understand how this can be achieved, there are two important points to
1534 remember:
1535
1536 Firstly, Bacula walks over the filesystem depth-first starting from the File =
1537 lines.  It stops descending when a directory is excluded, so you must include
1538 all ancestor directories of each directory containing files to be included.
1539
1540 Secondly, each directory and file is compared to the Options clauses in the
1541 order they appear in the FileSet.  When a match is found, no further clauses
1542 are compared and the directory or file is either included or excluded.
1543
1544 The FileSet resource definition below implements this by including specifc
1545 directories and files and excluding everything else.
1546
1547 \footnotesize
1548 \begin{verbatim}
1549 FileSet {
1550   Name = "AllPictures"
1551
1552   Include {
1553
1554     File  = "C:/Documents and Settings"
1555
1556     Options {
1557       signature = SHA1
1558       verify = s1
1559       IgnoreCase = yes
1560
1561       # Include all users' directories so we reach the inner ones.  Unlike a
1562       # WildDir pattern ending in *, this RegExDir only matches the top-level
1563       # directories and not any inner ones.
1564       RegExDir = "^C:/Documents and Settings/[^/]+$"
1565
1566       # Ditto all users' My Documents directories.
1567       WildDir = "C:/Documents and Settings/*/My Documents"
1568
1569       # Ditto all users' My Documents/My Pictures directories.
1570       WildDir = "C:/Documents and Settings/*/My Documents/My Pictures"
1571
1572       # Include the contents of the My Documents/My Pictures directories and
1573       # any subdirectories.
1574       Wild = "C:/Documents and Settings/*/My Documents/My Pictures/*"
1575     }
1576
1577     Options {
1578       Exclude = yes
1579       IgnoreCase = yes
1580
1581       # Exclude everything else, in particular any files at the top level and
1582       # any other directories or files in the users' directories.
1583       Wild = "C:/Documents and Settings/*"
1584     }
1585   }
1586 }
1587 \end{verbatim}
1588 \normalsize
1589
1590 \section{Backing up Raw Partitions}
1591 \index[general]{Backing up!Partitions }
1592 \index[general]{Backing up Raw Partitions }
1593
1594 The following FileSet definition will backup a raw partition: 
1595
1596 \footnotesize
1597 \begin{verbatim}
1598 FileSet {
1599   Name = "RawPartition"
1600   Include {
1601     Options { sparse=yes }
1602     File = /dev/hda2
1603   }
1604 }
1605 \end{verbatim}
1606 \normalsize
1607
1608 While backing up and restoring a raw partition, you should ensure that no
1609 other process including the system is writing to that partition. As a
1610 precaution, you are strongly urged to ensure that the raw partition is not
1611 mounted or is mounted read-only. If necessary, this can be done using the {\bf
1612 RunBeforeJob} directive. 
1613
1614
1615 \section{Excluding Files and Directories}
1616 \index[general]{Directories!Excluding Files and }
1617 \index[general]{Excluding Files and Directories }
1618
1619 You may also include full filenames or directory names in addition to using
1620 wild-cards and {\bf Exclude=yes} in the Options resource as specified above by
1621 simply including the files to be excluded in an Exclude resource within the
1622 FileSet. It accepts wild-cards pattern, so for a directory, don't add a trailing
1623 /. For example:
1624
1625 \footnotesize
1626 \begin{verbatim}
1627 FileSet {
1628   Name = Exclusion_example
1629   Include {
1630     Options {
1631       Signature = SHA1
1632     }
1633     File = /
1634     File = /boot
1635     File = /home
1636     File = /rescue
1637     File = /usr
1638   }
1639   Exclude {
1640     File = /proc
1641     File = /tmp                          # Don't add trailing /
1642     File = .journal
1643     File = .autofsck
1644   }
1645 }
1646 \end{verbatim}
1647 \normalsize
1648
1649 \label{win32}
1650 \section{Windows FileSets}
1651 \index[general]{Windows FileSets }
1652 \index[general]{FileSets!Windows }
1653 If you are entering Windows file names, the directory path may be preceded by
1654 the drive and a colon (as in c:). However, the path separators must be
1655 specified in Unix convention (i.e. forward slash (/)). If you wish to include
1656 a quote in a file name, precede the quote with a backslash
1657 (\textbackslash{}). For example you might use the following
1658 for a Windows machine to backup the "My Documents" directory: 
1659
1660 \footnotesize
1661 \begin{verbatim}
1662 FileSet {
1663   Name = "Windows Set"
1664   Include {
1665     Options {
1666        WildFile = "*.obj"
1667        WildFile = "*.exe"
1668        exclude = yes
1669      }
1670      File = "c:/My Documents"
1671   }
1672 }
1673 \end{verbatim}
1674 \normalsize
1675
1676 For exclude lists to work correctly on Windows, you must observe the following
1677 rules: 
1678
1679 \begin{itemize}
1680 \item Filenames are case sensitive, so you must use the correct case.  
1681 \item To exclude a directory, you must not have a trailing slash on the 
1682    directory name.  
1683 \item If you have spaces in your filename, you must enclose the entire name 
1684    in double-quote characters ("). Trying to use a backslash before  the space
1685    will not work.  
1686 \item If you are using the old Exclude syntax (noted below), you may not
1687    specify a drive letter in the exclude.  The new syntax noted above
1688    should work fine including driver letters.
1689 \end{itemize}
1690
1691 Thanks to Thiago Lima for summarizing the above items for us. If you are
1692 having difficulties getting includes or excludes to work, you might want to
1693 try using the {\bf estimate job=xxx listing} command documented in the 
1694 \ilink{Console chapter}{estimate} of this manual. 
1695
1696 On Win32 systems, if you move a directory or file or rename a file into the
1697 set of files being backed up, and a Full backup has already been made, Bacula
1698 will not know there are new files to be saved during an Incremental or
1699 Differential backup (blame Microsoft, not me). To avoid this problem, please
1700 {\bf copy} any new directory or files into the backup area. If you do not have
1701 enough disk to copy the directory or files, move them, but then initiate a
1702 Full backup. 
1703
1704
1705 \paragraph*{A Windows Example FileSet}
1706 \index[general]{FileSet!Windows Example }
1707 \index[general]{Windows Example FileSet }
1708
1709 The following example was contributed by Russell Howe. Please note that
1710 for presentation purposes, the lines beginning with Data and Internet 
1711 have been wrapped and should included on the previous line with one
1712 space.
1713
1714 \footnotesize
1715 \begin{verbatim}
1716 This is my Windows 2000 fileset:
1717 FileSet {
1718  Name = "Windows 2000"
1719  Include {
1720   Options {
1721    signature = MD5
1722    Exclude = yes
1723    IgnoreCase = yes
1724    # Exclude Mozilla-based programs' file caches
1725    WildDir = "[A-Z]:/Documents and Settings/*/Application 
1726 Data/*/Profiles/*/*/Cache"
1727    WildDir = "[A-Z]:/Documents and Settings/*/Application 
1728 Data/*/Profiles/*/*/Cache.Trash"
1729    WildDir = "[A-Z]:/Documents and Settings/*/Application
1730 Data/*/Profiles/*/*/ImapMail"
1731
1732    # Exclude user's registry files - they're always in use anyway.
1733    WildFile = "[A-Z]:/Documents and Settings/*/Local Settings/Application
1734 Data/Microsoft/Windows/usrclass.*"
1735    WildFile = "[A-Z]:/Documents and Settings/*/ntuser.*"
1736
1737    # Exclude directories full of lots and lots of useless little files
1738    WildDir = "[A-Z]:/Documents and Settings/*/Cookies"
1739    WildDir = "[A-Z]:/Documents and Settings/*/Recent"
1740    WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/History"
1741    WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/Temp"
1742    WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/Temporary
1743 Internet Files"
1744
1745    # These are always open and unable to be backed up
1746    WildFile = "[A-Z]:/Documents and Settings/All Users/Application
1747 Data/Microsoft/Network/Downloader/qmgr[01].dat"
1748
1749    # Some random bits of Windows we want to ignore
1750    WildFile = "[A-Z]:/WINNT/security/logs/scepol.log"
1751    WildDir = "[A-Z]:/WINNT/system32/config"
1752    WildDir = "[A-Z]:/WINNT/msdownld.tmp"
1753    WildDir = "[A-Z]:/WINNT/Internet Logs"
1754    WildDir = "[A-Z]:/WINNT/$Nt*Uninstall*"
1755    WildDir = "[A-Z]:/WINNT/sysvol"
1756    WildFile = "[A-Z]:/WINNT/cluster/CLUSDB"
1757    WildFile = "[A-Z]:/WINNT/cluster/CLUSDB.LOG"
1758    WildFile = "[A-Z]:/WINNT/NTDS/edb.log"
1759    WildFile = "[A-Z]:/WINNT/NTDS/ntds.dit"
1760    WildFile = "[A-Z]:/WINNT/NTDS/temp.edb"
1761    WildFile = "[A-Z]:/WINNT/ntfrs/jet/log/edb.log"
1762    WildFile = "[A-Z]:/WINNT/ntfrs/jet/ntfrs.jdb"
1763    WildFile = "[A-Z]:/WINNT/ntfrs/jet/temp/tmp.edb"
1764    WildFile = "[A-Z]:/WINNT/system32/CPL.CFG"
1765    WildFile = "[A-Z]:/WINNT/system32/dhcp/dhcp.mdb"
1766    WildFile = "[A-Z]:/WINNT/system32/dhcp/j50.log"
1767    WildFile = "[A-Z]:/WINNT/system32/dhcp/tmp.edb"
1768    WildFile = "[A-Z]:/WINNT/system32/LServer/edb.log"
1769    WildFile = "[A-Z]:/WINNT/system32/LServer/TLSLic.edb"
1770    WildFile = "[A-Z]:/WINNT/system32/LServer/tmp.edb"
1771    WildFile = "[A-Z]:/WINNT/system32/wins/j50.log"
1772    WildFile = "[A-Z]:/WINNT/system32/wins/wins.mdb"
1773    WildFile = "[A-Z]:/WINNT/system32/wins/winstmp.mdb"
1774
1775    # Temporary directories & files
1776    WildDir = "[A-Z]:/WINNT/Temp"
1777    WildDir = "[A-Z]:/temp"
1778    WildFile = "*.tmp"
1779    WildDir = "[A-Z]:/tmp"
1780    WildDir = "[A-Z]:/var/tmp"
1781
1782    # Recycle bins
1783    WildDir = "[A-Z]:/RECYCLER"
1784
1785    # Swap files
1786    WildFile = "[A-Z]:/pagefile.sys"
1787
1788    # These are programs and are easier to reinstall than restore from
1789    # backup
1790    WildDir = "[A-Z]:/cygwin"
1791    WildDir = "[A-Z]:/Program Files/Grisoft"
1792    WildDir = "[A-Z]:/Program Files/Java"
1793    WildDir = "[A-Z]:/Program Files/Java Web Start"
1794    WildDir = "[A-Z]:/Program Files/JavaSoft"
1795    WildDir = "[A-Z]:/Program Files/Microsoft Office"
1796    WildDir = "[A-Z]:/Program Files/Mozilla Firefox"
1797    WildDir = "[A-Z]:/Program Files/Mozilla Thunderbird"
1798    WildDir = "[A-Z]:/Program Files/mozilla.org"
1799    WildDir = "[A-Z]:/Program Files/OpenOffice*"
1800   }
1801
1802   # Our Win2k boxen all have C: and D: as the main hard drives.
1803   File = "C:/"
1804   File = "D:/"
1805  }
1806 }
1807 \end{verbatim}
1808 \normalsize
1809
1810 Note, the three line of the above Exclude were split to fit on the document
1811 page, they should be written on a single line in real use. 
1812
1813 \paragraph*{Windows NTFS Naming Considerations}
1814 \index[general]{Windows NTFS Naming Considerations }
1815 \index[general]{Considerations!Windows NTFS Naming }
1816
1817 NTFS filenames containing Unicode characters should now be supported
1818 as of version 1.37.30 or later.
1819
1820 \section{Testing Your FileSet}
1821 \index[general]{FileSet!Testing Your }
1822 \index[general]{Testing Your FileSet }
1823
1824 If you wish to get an idea of what your FileSet will really backup or if your
1825 exclusion rules will work correctly, you can test it by using the {\bf
1826 estimate} command in the Console program. See the 
1827 \ilink{estimate}{estimate} in the Console chapter of this
1828 manual.
1829
1830 As an example, suppose you add the following test FileSet:
1831
1832 \footnotesize
1833 \begin{verbatim}
1834 FileSet {
1835   Name = Test
1836   Include {
1837     File = /home/xxx/test
1838     Options {
1839        regex = ".*\\.c$"
1840     }
1841   }
1842 }
1843 \end{verbatim}
1844 \normalsize
1845
1846 You could then add some test files to the directory {\bf /home/xxx/test}
1847 and use the following command in the console:
1848
1849 \footnotesize
1850 \begin{verbatim}
1851 estimate job=<any-job-name> listing client=<desired-client> fileset=Test
1852 \end{verbatim}
1853 \normalsize
1854
1855 to give you a listing of all files that match.  In the above
1856 example, it should be only files with names ending in  {\bf .c}.