+
+The following example shows how to back up only the My Pictures directory inside
+the My Documents directory for all users in C:/Documents and Settings, i.e.
+everything matching the pattern:
+
+C:/Documents and Settings/*/My Documents/My Pictures/*
+
+To understand how this can be achieved, there are two important points to
+remember:
+
+Firstly, Bacula walks over the filesystem depth-first starting from the File =
+lines. It stops descending when a directory is excluded, so you must include
+all ancestor directories of each directory containing files to be included.
+
+Secondly, each directory and file is compared to the Options clauses in the
+order they appear in the FileSet. When a match is found, no further clauses
+are compared and the directory or file is either included or excluded.
+
+The FileSet resource definition below implements this by including specifc
+directories and files and excluding everything else.
+
+\footnotesize
+\begin{verbatim}
+FileSet {
+ Name = "AllPictures"
+
+ Include {
+
+ File = "C:/Documents and Settings"
+
+ Options {
+ signature = SHA1
+ verify = s1
+ IgnoreCase = yes
+
+ # Include all users' directories so we reach the inner ones. Unlike a
+ # WildDir pattern ending in *, this RegExDir only matches the top-level
+ # directories and not any inner ones.
+ RegExDir = "^C:/Documents and Settings/[^/]+$"
+
+ # Ditto all users' My Documents directories.
+ WildDir = "C:/Documents and Settings/*/My Documents"
+
+ # Ditto all users' My Documents/My Pictures directories.
+ WildDir = "C:/Documents and Settings/*/My Documents/My Pictures"
+
+ # Include the contents of the My Documents/My Pictures directories and
+ # any subdirectories.
+ Wild = "C:/Documents and Settings/*/My Documents/My Pictures/*"
+ }
+
+ Options {
+ Exclude = yes
+ IgnoreCase = yes
+
+ # Exclude everything else, in particular any files at the top level and
+ # any other directories or files in the users' directories.
+ Wild = "C:/Documents and Settings/*"
+ }
+ }
+}
+\end{verbatim}
+\normalsize
+