-%
%%
-\subsection*{The FileSet Resource}
+\section{The FileSet Resource}
\label{FileSetResource}
\index[general]{Resource!FileSet}
\index[general]{FileSet Resource}
-\addcontentsline{toc}{subsection}{FileSet Resource}
The FileSet resource defines what files are to be included or excluded in a
backup job. A {\bf FileSet} resource is required for each backup Job. It
of the Include/Exclude contents). Each time a new FileSet is created,
Bacula will ensure that the next backup is always a Full save.
+Bacula is designed to handle most character sets of the world,
+US ASCII, German, French, Chinese, ... However, it does this by
+encoding everything in UTF-8, and it expects all configuration files
+(including those read on Win32 machines) to be in UTF-8 format.
+UTF-8 is typically the default on Linux machines, but not on all
+Unix machines, nor on Windows, so you must take some care to ensure
+that your locale is set properly before starting Bacula.
+On most modern Win32 machines, you can edit the conf files with {\bf
+notebook} and choose output encoding UTF-8.
+
+To ensure that Bacula configuration files can be correctly read including
+foreign characters the {bf LANG} environment variable
+must end in {\bf .UTF-8}. An full example is {\bf en\_US.UTF-8}. The
+exact syntax may vary a bit from OS to OS, and exactly how you define
+it will also vary.
+
+Bacula assumes that all filenames are in UTF-8 format on Linux and
+Unix machines. On Win32 they are in Unicode (UTF-16), and will
+be automatically converted to UTF-8 format.
+
+
\begin{description}
\item [FileSet]
\index[dir]{Directive!Ignore FileSet Changes}
Normally, if you modify the FileSet Include or Exclude lists,
the next backup will be forced to a Full so that Bacula can
- guarantee that any additions or deletions are properly backed
- up.
+ guarantee that any additions or deletions are properly saved.
+
+ We strongly recommend against setting this directive to yes,
+ since doing so may cause you to have an incomplete set of backups.
+
If this directive is set to {\bf yes}, any changes you make to the
- FileSet Include or Exclude lists will be ignored and not cause Bacula to
- immediately perform a Full backup. The default is {\bf no}, in which
- case, if you change the Include or Exclude, Bacula will force a Full
- backup to ensure that everything is properly backed up. It is not
- recommended to set this directive to yes.
+ FileSet Include or Exclude lists, will not force a Full during
+ subsequent backups.
+
+ The default is {\bf no}, in which case, if you change the Include or
+ Exclude, Bacula will force a Full backup to ensure that everything is
+ properly backed up.
\item [Enable VSS = \lt{}yes|no\gt{}]
\index[dir]{Enable VSS}
\index[dir]{Directive!Enable VSS}
If this directive is set to {\bf yes} the File daemon will be notified
that the user wants to use a Volume Shadow Copy Service (VSS) backup
- for this job. The default is {\bf no}. This directive is effective
+ for this job. The default is {\bf yes}. This directive is effective
only for VSS enabled Win32 File daemons. It permits a consistent copy
of open files to be made for cooperating writer applications, and for
applications that are not VSS away, Bacula can at least copy open files.
hardware compression. As noted above, it is not generally a good idea
to do both software and hardware compression.
- Specifying {\bf GZIP} uses the default compression level six (i.e. {\bf
+ Specifying {\bf GZIP} uses the default compression level 6 (i.e. {\bf
GZIP} is identical to {\bf GZIP6}). If you want a different compression
level (1 through 9), you can specify it by appending the level number
with no intervening spaces to {\bf GZIP}. Thus {\bf compression=GZIP1}
would give minimum compression but the fastest algorithm, and {\bf
compression=GZIP9} would give the highest level of compression, but
requires more computation. According to the GZIP documentation,
- compression levels greater than 6 generally give very little extra
+ compression levels greater than six generally give very little extra
compression and are rather CPU intensive.
\item [signature=SHA1]
\item {\bf c}
compare the change time (st\_ctime)
- \item {\bf s}
+ \item {\bf d}
report file size decreases
\item {\bf 5}
\footnotesize
\begin{verbatim}
-rufus-fd: Filesystem change prohibited. Will not descend into /misc
-rufus-fd: Filesystem change prohibited. Will not descend into /net
-rufus-fd: Filesystem change prohibited. Will not descend into /var/lib/nfs/rpc_pipefs
-rufus-fd: Filesystem change prohibited. Will not descend into /selinux
-rufus-fd: Filesystem change prohibited. Will not descend into /sys
-rufus-fd: Filesystem change prohibited. Will not descend into /dev
-rufus-fd: Filesystem change prohibited. Will not descend into /home
+rufus-fd: /misc is a different filesystem. Will not descend from / into /misc
+rufus-fd: /net is a different filesystem. Will not descend from / into /net
+rufus-fd: /var/lib/nfs/rpc_pipefs is a different filesystem. Will not descend from /var/lib/nfs into /var/lib/nfs/rpc_pipefs
+rufus-fd: /selinux is a different filesystem. Will not descend from / into /selinux
+rufus-fd: /sys is a different filesystem. Will not descend from / into /sys
+rufus-fd: /dev is a different filesystem. Will not descend from / into /dev
+rufus-fd: /home is a different filesystem. Will not descend from / into /home
\end{verbatim}
\normalsize
+
+ Note: in previous versions of Bacula, the above message was of the form:
+
+\footnotesize
+\begin{verbatim}
+Filesystem change prohibited. Will not descend into /misc
+\end{verbatim}
+\normalsize
+
If you wish to backup multiple filesystems, you can explicitly
list each filesystem you want saved. Otherwise, if you set the onefs option
to {\bf no}, Bacula will backup all mounted file systems (i.e. traverse mount
Also be aware that even if you include {\bf /home} in your list
of files to backup, as you most likely should, you will get the
- informational message about Filesystem change prohibited when Bacula is
- processing the {\bf /} directory.
+ informational message that "/home is a different filesystem" when
+ Bacula is processing the {\bf /} directory. This message does not
+ indicate an error. This message means that while examining the
+ {\bf File =} referred to in the second part of the message, Bacula will
+ not descend into the directory mentioned in the first part of the message.
+ However, it is possible that the separate filesystem will be backed up
+ despite the message. For example, consider the following FileSet:
+
+\footnotesize
+\begin{verbatim}
+ File = /
+ File = /var
+\end{verbatim}
+\normalsize
+
+ where {\bf /var} is a separate filesystem. In this example, you will get a
+ message saying that Bacula will not decend from {\bf /} into {\bf /var}. But
+ it is important to realise that Bacula will descend into {\bf /var} from the
+ second File directive shown above. In effect, the warning is bogus,
+ but it is supplied to alert you to possible omissions from your FileSet. In
+ this example, {\bf /var} will be backed up. If you changed the FileSet such
+ that it did not specify {\bf /var}, then {\bf /var} will not be backed up.
+
+
\label{portable}
exec > /dev/null
\end{verbatim}
+\item [noatime=yes|no]
+\index[dir]{noatime}
+\index[dir]{Directive!noatime}
+ If enabled, and if your Operating System supports the O\_NOATIME file
+ open flag, Bacula will open all files to be backed up with this option.
+ It makes it possible to read a file without updating the inode atime
+ (and also without the inode ctime update which happens if you try to set
+ the atime back to its previous value). It also prevents a race
+ condition when two programs are reading the same file, but only one does
+ not want to change the atime. It's most useful for backup programs and
+ file integrity checkers (and bacula can fit on both categories).
+
+ This option is particularly useful for sites where users are sensitive
+ to their MailBox file access time. It replaces both the {\bf keepatime}
+ option without the inconveniences of that option (see below).
+
+ If your Operating System does not support this option, it will be
+ silently ignored by Bacula.
+
\item [mtimeonly=yes|no]
\index[dir]{mtimeonly}
to use {\bf mtimeonly = yes} as well as keepatime (thanks to
Rudolf Cejka for this tip).
+\item [checkfilechanges=yes|no]
+\index[dir]{checkfilechanges}
+\index[dir]{Directive!checkfilechanges}
+ On versions 2.0.4 or greater,
+ if enabled, the Client will checks size, age of each file after
+ their backup to see if they have changed during backup. If time
+ or size mismatch, an error will raise.
+
+\begin{verbatim}
+ zog-fd: Client1.2007-03-31_09.46.21 Error: /tmp/test mtime changed during backup.
+\end{verbatim}
+
+ In general, it is recommended to use this option.
+
\item [hardlinks=yes|no]
\index[dir]{hardlinks}
\index[dir]{Directive!hardlinks}
- When enabled (default), this directive will cause hard inks to be
+ When enabled (default), this directive will cause hard links to be
backed up. However, the File daemon keeps track of hard linked files and
will backup the data only once. The process of keeping track of the
hard links can be quite expensive if you have lots of them (tens of
You may want to test your expressions prior to running your
backup by using the bwild program. Please see the
- \ilink{UtilitiesChapter}{Utilities} chapter of this manual for
+ \ilink{Utilities}{bwild} chapter of this manual for
more. You can also test your full FileSet definition by using
- the \ilink{estimate}{Estimate} command in the Console
+ the \ilink{estimate}{estimate} command in the Console
chapter of this manual.
It is recommended to enclose the string in double quotes.
\index[dir]{Directive!wilddir}
Specifies a wild-card string to be applied to directory names only. No
filenames will be matched by this directive. Note, if {\bf Exclude} is
- not enabled, the wild-card will select directories files are to be
+ not enabled, the wild-card will select directories to be
included. If {\bf Exclude=yes} is specified, the wild-card will select
- which files are to be excluded. Multiple wild-card directives may be
+ which directories are to be excluded. Multiple wild-card directives may be
specified, and they will be applied in turn until the first one that
matches. Note, if you exclude a directory, no files or directories
below it will be matched.
You may want to test your expressions prior to running your
backup by using the bwild program. Please see the
- \ilink{UtilitiesChapter}{Utilities} chapter of this manual for
+ \ilink{Utilities}{bwild} chapter of this manual for
more. You can also test your full FileSet definition by using
- the \ilink{estimate}{Estimate} command in the Console
+ the \ilink{estimate}{estimate} command in the Console
chapter of this manual.
An example of excluding with the WildDir option on Win32 machines is
presented below.
You may want to test your expressions prior to running your
backup by using the bwild program. Please see the
- \ilink{UtilitiesChapter}{Utilities} chapter of this manual for
+ \ilink{Utilities}{bwild} chapter of this manual for
more. You can also test your full FileSet definition by using
- the \ilink{estimate}{Estimate} command in the Console
+ the \ilink{estimate}{estimate} command in the Console
chapter of this manual.
An example of excluding with the WildFile option on Win32 machines is
presented below.
another, and in addition, regular expressions are complicated,
so you may want to test your expressions prior to running your
backup by using the bregex program. Please see the
- \ilink{UtilitiesChapter}{Utilities} chapter of this manual for
+ \ilink{Utilities}{bwild} chapter of this manual for
more. You can also test your full FileSet definition by using
- the \ilink{estimate}{Estimate} command in the Console
+ the \ilink{estimate}{estimate} command in the Console
chapter of this manual.
another, and in addition, regular expressions are complicated,
so you may want to test your expressions prior to running your
backup by using the bregex program. Please see the
- \ilink{UtilitiesChapter}{Utilities} chapter of this manual for
+ \ilink{Utilities}{bregex} chapter of this manual for
more.
another, and in addition, regular expressions are complicated,
so you may want to test your expressions prior to running your
backup by using the bregex program. Please see the
- \ilink{UtilitiesChapter}{Utilities} chapter of this manual for
+ \ilink{Utilities}{bregex} chapter of this manual for
more.
Options will be excluded from the backup.
\label{ACLSupport}
-
\item [aclsupport=yes|no]
\index[dir]{aclsupport}
\index[dir]{Directive!aclsupport}
This option allows you to turn on support for Mac OSX HFS plus
finder information.
+\item [strippath=\lt{}integer\gt{}]
+\index[dir]{strippath}
+\index[dir]{Directive!strippath}
+ This option will cause {\bf integer} paths to be stripped from
+ the front of the full path/filename being backed up. This can
+ be useful if you are migrating data from another vendor or if
+ you have taken a snapshot into some subdirectory. This directive
+ can cause your filenames to be overlayed with regular backup data,
+ so should be used only by experts and with great care.
\end{description}
{\bf \lt{}file-list\gt{}} is a list of directory and/or filename names
a program. This program will be executed on the Director's machine at
the time the Job starts (not when the Director reads the configuration
file), and any output from that program will be assumed to be a list of
- files or directories, one per line, to be included.
+ files or directories, one per line, to be included. Before submitting the
+ specified command bacula will performe
+ \ilink{character substitution}{character substitution}.
This allows you to have a job that, for example, includes all the local
partitions even if you change the partitioning by adding a disk. The
\end{verbatim}
\normalsize
- will produce a list of all the local partitions on a RedHat Linux system.
+ will produce a list of all the local partitions on a Red Hat Linux system.
Note, the above line was split, but should normally be written on one line.
Quoting is a real problem because you must quote for Bacula which consists of
preceding every \textbackslash{} and every " with a \textbackslash{}, and
business.
If you know what filesystems you have mounted on your system, e.g.
- for RedHat Linux normally only ext2 and ext3, you can backup
- all local fileystems using something like:
+ for Red Hat Linux normally only ext2 and ext3, you can backup
+ all local filesystems using something like:
\footnotesize
\begin{verbatim}
\item Any file-list item preceded by a less-than sign (\lt{}) will be taken
- to be a file. This file will be read on the Director's machine at the time
+ to be a file. This file will be read on the Director's machine (see
+ below for doing it on the Client machine) at the time
the Job starts, and the data will be assumed to be a list of directories or
files, one per line, to be included. The names should start in column 1 and
should not be quoted even if they contain spaces. This feature allows you to
Ludovic Strappazon has pointed out that this feature can be used to backup a
full Microsoft Windows disk. Simply boot into the system using a Linux Rescue
disk, then load a statically linked Bacula as described in the
- \ilink{ Disaster Recovery Using Bacula}{_ChapterRescue} chapter of
+ \ilink{ Disaster Recovery Using Bacula}{RescueChapter} chapter of
this manual. Then save the whole disk partition. In the case of a disaster,
you can then restore the desired partition by again booting with the rescue
disk and doing a restore of the partition.
matching.
\end{itemize}
-\subsubsection*{FileSet Examples}
+\section{FileSet Examples}
\index[general]{Examples!FileSet }
\index[general]{FileSet Examples}
-\addcontentsline{toc}{subsection}{FileSet Examples}
The following is an example of a valid FileSet resource definition. Note,
the first Include pulls in the contents of the file {\bf /etc/backup.list}
\end{verbatim}
\normalsize
-\subsubsection*{Backing up Raw Partitions}
+\section{Backing up Raw Partitions}
\index[general]{Backing up!Partitions }
\index[general]{Backing up Raw Partitions }
-\addcontentsline{toc}{subsection}{Backing up Raw Partitions}
The following FileSet definition will backup a raw partition:
RunBeforeJob} directive.
-\subsubsection*{Excluding Files and Directories}
+\section{Excluding Files and Directories}
\index[general]{Directories!Excluding Files and }
\index[general]{Excluding Files and Directories }
-\addcontentsline{toc}{subsubsection}{Excluding Files and Directories}
You may also include full filenames or directory names in addition to using
wild-cards and {\bf Exclude=yes} in the Options resource as specified above by
\normalsize
\label{win32}
-\subsubsection*{Windows FileSets}
+\section{Windows FileSets}
\index[general]{Windows FileSets }
\index[general]{FileSets!Windows }
-\addcontentsline{toc}{subsection}{Windows FileSets}
If you are entering Windows file names, the directory path may be preceded by
the drive and a colon (as in c:). However, the path separators must be
specified in Unix convention (i.e. forward slash (/)). If you wish to include
\paragraph*{A Windows Example FileSet}
\index[general]{FileSet!Windows Example }
\index[general]{Windows Example FileSet }
-\addcontentsline{toc}{paragraph}{Windows Example FileSet}
The following example was contributed by Russell Howe. Please note that
for presentation purposes, the lines beginning with Data and Internet
\paragraph*{Windows NTFS Naming Considerations}
\index[general]{Windows NTFS Naming Considerations }
\index[general]{Considerations!Windows NTFS Naming }
-\addcontentsline{toc}{paragraph}{Windows NTFS Naming Considerations}
NTFS filenames containing Unicode characters should now be supported
as of version 1.37.30 or later.
-\subsubsection*{Testing Your FileSet}
+\section{Testing Your FileSet}
\index[general]{FileSet!Testing Your }
\index[general]{Testing Your FileSet }
-\addcontentsline{toc}{subsection}{Testing Your FileSet}
If you wish to get an idea of what your FileSet will really backup or if your
exclusion rules will work correctly, you can test it by using the {\bf
estimate} command in the Console program. See the
-\ilink{estimate command}{estimate} in the Console chapter of this
+\ilink{estimate}{estimate} in the Console chapter of this
manual.
As an example, suppose you add the following test FileSet: