From 4252ee3dc2b0298c974e2e95e3a0758245ca2518 Mon Sep 17 00:00:00 2001 From: Joerg Steffens Date: Tue, 17 Dec 2013 18:43:21 +0100 Subject: [PATCH] bpipe plugin, cleanup FileSet rearrange bpipe plugin description and rearrange the FileSet chapter. --- .../en/main/bareos-manual-main-reference.tex | 2 + manuals/en/main/bareos.sty | 1 + manuals/en/main/dirdconf-fileset.tex | 1320 ++++++++--------- manuals/en/main/howto.tex | 94 +- manuals/en/main/plugins.tex | 70 + 5 files changed, 747 insertions(+), 740 deletions(-) create mode 100644 manuals/en/main/plugins.tex diff --git a/manuals/en/main/bareos-manual-main-reference.tex b/manuals/en/main/bareos-manual-main-reference.tex index 45038d4..70cccb1 100644 --- a/manuals/en/main/bareos-manual-main-reference.tex +++ b/manuals/en/main/bareos-manual-main-reference.tex @@ -133,6 +133,8 @@ \chapter{Accurate Mode} \include{basejob} +\include{plugins} + %tape \include{win32} diff --git a/manuals/en/main/bareos.sty b/manuals/en/main/bareos.sty index 2e2cdbe..3d0dd93 100644 --- a/manuals/en/main/bareos.sty +++ b/manuals/en/main/bareos.sty @@ -44,6 +44,7 @@ \newcommand{\command}[1]{\path|#1|} \newcommand{\bcommand}[1]{\path|#1|} \newcommand{\file}[1]{\path|#1|} +\newcommand{\package}[1]{\path|#1|} \newcommand{\user}[1]{\path|#1|} \newcommand{\group}[1]{\path|#1|} \newcommand{\parameter}[1]{\path|#1|} diff --git a/manuals/en/main/dirdconf-fileset.tex b/manuals/en/main/dirdconf-fileset.tex index 3c1f986..efb1541 100644 --- a/manuals/en/main/dirdconf-fileset.tex +++ b/manuals/en/main/dirdconf-fileset.tex @@ -24,14 +24,27 @@ \section{FileSet Resource} Start of the FileSet resource. One {\bf FileSet} resource must be defined for each Backup job. -\item [Name = {\textless}name{\textgreater}] \hfill \\ -\index[dir]{Name} -\index[dir]{Directive!Name} - The name of the FileSet resource. This directive is required. - -\item [Ignore FileSet Changes = {\textless}yes{\textbar}no{\textgreater}] \hfill \\ -\index[dir]{Ignore FileSet Changes} -\index[dir]{Directive!Ignore FileSet Changes} +\directive{dir}{Name}{name}{required}{} + The name of the FileSet resource. This directive is required. + +\directive{dir}{Description}{text}{}{} + Information only. + +\directive{dir}{Enable VSS}{yes{\textbar}no}{}{yes (on Windows)} + 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. This directive is effective only on the Windows File Daemon. + It permits a consistent copy + of open files to be made for cooperating writer applications, and for + applications that are not VSS away, Bareos can at least copy open files. + The Volume Shadow Copy will only be done on Windows drives where the + drive (e.g. C:, D:, ...) is explicitly mentioned in a {\bf File} + directive. + For more information, please see the + \ilink{Windows}{VSS} chapter of this manual. + + +\directive{dir}{Ignore FileSet Changes}{yes{\textbar}no}{}{no} Normally, if you modify the FileSet Include or Exclude lists, the next backup will be forced to a Full so that Bareos can guarantee that any additions or deletions are properly saved. @@ -47,38 +60,21 @@ \section{FileSet Resource} Exclude, Bareos will force a Full backup to ensure that everything is properly backed up. -\item [Enable VSS = {\textless}yes{\textbar}no{\textgreater}] \hfill \\ -\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 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, Bareos can at least copy open files. - The Volume Shadow Copy will only be done on Windows drives where the - drive (e.g. C:, D:, ...) is explicitly mentioned in a {\bf File} - directive. - For more information, please see the - \ilink{Windows}{VSS} chapter of this manual. - -\item [Include \{ Options \{{\textless}file-options{\textgreater}\} ...; - {\textless}file-list{\textgreater} \} ] \hfill \\ -\index[dir]{Include \{ [ Options \{{\textless}file-options{\textgreater}\} ...] - {\textless}file-list{\textgreater} \} } -\index[dir]{Directive!Include} - -\item [Options \{ {\textless}file-options{\textgreater} \} ] \hfill \\ -\index[dir]{Options \{ {\textless}file-options{\textgreater} \} } +\directive{dir}{Include}{$\ldots$}{}{} + Describe the files, that should get included to a backup, see section about the \ilink{Include Ressource}{fileset-include}. -\item [Exclude \{ {\textless}file-list{\textgreater} \}] \hfill \\ -\index[dir]{Exclude \{ {\textless}file-list{\textgreater} \} } -\index[dir]{Directive!Exclude} +\directive{dir}{Exclude}{$\ldots$}{}{} + Describe the files, that should get excluded from a backup, see section about the \ilink{Exclude Ressource}{fileset-exclude}. \end{description} +\subsection{FileSet Include Ressource} +\label{fileset-include} + The Include resource must contain a list of directories and/or files to be -processed in the backup job. Normally, all files found in all +processed in the backup job. + +Normally, all files found in all subdirectories of any directory in the Include File list will be backed up. Note, see below for the definition of {\textless}file-list{\textgreater}. The Include resource may also contain one or more Options resources that @@ -88,43 +84,59 @@ \section{FileSet Resource} There can be any number of {\bf Include} resources within the FileSet, each having its own list of directories or files to be backed up and the backup -options defined by one or more Options resources. The {\bf file-list} -consists of one file or directory name per line. Directory names should be -specified without a trailing slash with Unix path notation. - -Windows users, please take note to specify directories (even c:/...) in -Unix path notation. If you use Windows conventions, you will most likely -not be able to restore your files due to the fact that the Windows -path separator was defined as an escape character long before Windows -existed, and Bareos adheres to that convention (i.e. \\ means the next character -appears as itself). - -You should always specify a full path for every directory and file that you -list in the FileSet. In addition, on Windows machines, you should {\bf -always} prefix the directory or filename with the drive specification -(e.g. {\bf c:/xxx}) using Unix directory name separators -(forward slash). The drive letter itself can be upper or lower case (e.g. -c:/xxx or C:/xxx). - -Bareos's default for processing directories is to recursively descend in -the directory saving all files and subdirectories. Bareos will not by -default cross filesystems (or mount points in Unix parlance). This means -that if you specify the root partition (e.g. {\bf /}), Bareos will save -only the root partition and not any of the other mounted filesystems. -Similarly on Windows systems, you must explicitly specify each of the -drives you want saved (e.g. -{\bf c:/} and {\bf d:/} ...). In addition, at least for Windows systems, you -will most likely want to enclose each specification within double quotes -particularly if the directory (or file) name contains spaces. The {\bf df} -command on Unix systems will show you which mount points you must specify to -save everything. See below for an example. +options defined by one or more Options resources. + +Please take note of the following items in the FileSet syntax: + +\begin{enumerate} +\item There is no equal sign (=) after the Include and before the opening + brace (\{). The same is true for the Exclude. +\item Each directory (or filename) to be included or excluded is preceded by a {\bf File + =}. Previously they were simply listed on separate lines. +\item The Exclude resource does not accept Options. +\item When using wild-cards or regular expressions, directory names are + always terminated with a slash (/) and filenames have no trailing slash. +\end{enumerate} + + +\begin{description} +\directive{dir}{File}{ filename \textbar\ dirname \textbar\ \textbar command \textbar\ \textbackslash\textless includefile-client \textbar\ \textless includefile-server }{}{} + The file list + consists of one file or directory name per line. Directory names should be + specified without a trailing slash with Unix path notation. + + Windows users, please take note to specify directories (even c:/...) in + Unix path notation. If you use Windows conventions, you will most likely + not be able to restore your files due to the fact that the Windows + path separator was defined as an escape character long before Windows + existed, and Bareos adheres to that convention (i.e. means the next character + appears as itself). + + You should always specify a full path for every directory and file that you + list in the FileSet. In addition, on Windows machines, you should {\bf + always} prefix the directory or filename with the drive specification + (e.g. {\bf c:/xxx}) using Unix directory name separators + (forward slash). The drive letter itself can be upper or lower case (e.g. + c:/xxx or C:/xxx). + + Bareos's default for processing directories is to recursively descend in + the directory saving all files and subdirectories. Bareos will not by + default cross filesystems (or mount points in Unix parlance). This means + that if you specify the root partition (e.g. {\bf /}), Bareos will save + only the root partition and not any of the other mounted filesystems. + Similarly on Windows systems, you must explicitly specify each of the + drives you want saved (e.g. + {\bf c:/} and {\bf d:/} ...). In addition, at least for Windows systems, you + will most likely want to enclose each specification within double quotes + particularly if the directory (or file) name contains spaces. The {\bf df} + command on Unix systems will show you which mount points you must specify to + save everything. See below for an example. Take special care not to include a directory twice or Bareos will backup the same files two times wasting a lot of space on your archive device. Including a directory twice is very easy to do. For example: -\footnotesize -\begin{verbatim} +\begin{bconfig}{File Set} Include { Options { compression=GZIP @@ -132,25 +144,295 @@ \section{FileSet Resource} File = / File = /usr } +\end{bconfig} +on a Unix system where /usr is a subdirectory (rather than a mounted +filesystem) will cause /usr to be backed up twice. + +{\bf {\textless}file-list{\textgreater}} is a list of directory and/or filename names +specified with a {\bf File =} directive. To include names containing spaces, +enclose the name between double-quotes. Wild-cards are not interpreted +in file-lists. They can only be specified in Options resources. + +There are a number of special cases when specifying directories and files in a +{\bf file-list}. They are: + +\begin{itemize} +\item Any name preceded by an at-sign (@) is assumed to be the name of a + file, which contains a list of files each preceded by a "File =". The + named file is read once when the configuration file is parsed during the + Director startup. Note, that the file is read on the Director's machine + and not on the Client's. In fact, the @filename can appear anywhere + within the conf file where a token would be read, and the contents of + the named file will be logically inserted in the place of the @filename. + What must be in the file depends on the location the @filename is + specified in the conf file. For example: + +\begin{bconfig}{File Set with Include File} +Include { + Options { + compression=GZIP + } + @/home/files/my-files +} +\end{bconfig} + + +\item Any name beginning with a vertical bar ({\textbar}) is assumed to + be the name of 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. Before + submitting the specified command Bareos 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 + examples below show you how to do this. However, please note two + things: \\ + 1. if you want the local filesystems, you probably should be + using the new {\bf fstype} directive, which was added in version 1.36.3 + and set {\bf onefs=no}. + \\ + + 2. the exact syntax of the command needed in the examples below is very + system dependent. For example, on recent Linux systems, you may need to + add the -P option, on FreeBSD systems, the options will be different as + well. + + In general, you will need to prefix your command or commands with a {\bf + sh -c} so that they are invoked by a shell. This will not be the case + if you are invoking a script as in the second example below. Also, you + must take care to escape (precede with a \textbackslash{}) wild-cards, + shell character, and to ensure that any spaces in your command are + escaped as well. If you use a single quotes (') within a double quote + ("), Bareos will treat everything between the single quotes as one field + so it will not be necessary to escape the spaces. In general, getting + all the quotes and escapes correct is a real pain as you can see by the + next example. As a consequence, it is often easier to put everything in + a file and simply use the file name within Bareos. In that case the + {\bf sh -c} will not be necessary providing the first line of the file + is {\bf \#!/bin/sh}. + + As an example: + +\begin{bconfig}{File Set with inline script} +Include { + Options { + signature = SHA1 + } + File = "|sh -c 'df -l | grep \"^/dev/hd[ab]\" | grep -v \".*/tmp\" | awk \"{print \\$6}\"'" +} +\end{bconfig} +% workaround for kile editor +\comment{$} + will produce a list of all the local partitions on a Linux system. + Quoting is a real problem because you must quote for Bareos which consists of + preceding every \textbackslash{} and every " with a \textbackslash{}, and + you must also quote for the shell command. In the end, it is probably easier + just to execute a script file with: + +\begin{bconfig}{File Set with external script} +Include { + Options { + signature=MD5 + } + File = "|my_partitions" +} +\end{bconfig} + + where \command{my_partitions} has: + +\footnotesize +\begin{verbatim} +#!/bin/sh +df -l | grep "^/dev/hd[ab]" | grep -v ".*/tmp" \ + | awk "{print \$6}" \end{verbatim} \normalsize -on a Unix system where /usr is a subdirectory (rather than a mounted -filesystem) will cause /usr to be backed up twice. + If the vertical bar (\verb+|+) in front of \command{my_partitions} is preceded by a + backslash as in \textbackslash{}\verb+|+, the program will be executed on the + Client's machine instead of on the Director's machine. + Please note that if the filename is given within quotes, you + will need to use two slashes. An example, provided by John Donagher, + that backs up all the local UFS partitions on a remote system is: -Please take note of the following items in the FileSet syntax: +\begin{bconfig}{File Set with inline script in quotes} +FileSet { + Name = "All local partitions" + Include { + Options { + signature=SHA1 + onefs=yes + } + File = "\\|bash -c \"df -klF ufs | tail +2 | awk '{print \$6}'\"" + } +} +\end{bconfig} -\begin{enumerate} -\item There is no equal sign (=) after the Include and before the opening - brace (\{). The same is true for the Exclude. -\item Each directory (or filename) to be included or excluded is preceded by a {\bf File - =}. Previously they were simply listed on separate lines. -\item The options that previously appeared on the Include line now must be - specified within their own Options resource. -\item The Exclude resource does not accept Options. -\item When using wild-cards or regular expressions, directory names are - always terminated with a slash (/) and filenames have no trailing slash. -\end{enumerate} + The above requires two backslash characters after the double quote (one + preserves the next one). If you are a Linux user, just change the {\bf ufs} + to {\bf ext3} (or your preferred filesystem type), and you will be in + business. + + If you know what filesystems you have mounted on your system, e.g. + for Linux only using ext2, ext3 or ext4, you can backup + all local filesystems using something like: + +\begin{bconfig}{File Set to backup all extfs partions} +Include { + Options { + signature = SHA1 + onfs=no + fstype=ext2 + } + File = / +} +\end{bconfig} + +\item Any file-list item preceded by a less-than sign ({\textless}) will be taken + 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 + modify the external file and change what will be saved without stopping and + restarting Bareos as would be necessary if using the @ modifier noted above. + For example: + +\footnotesize +\begin{verbatim} +Include { + Options { + signature = SHA1 + } + File = " /dev/null +\end{verbatim} + + +\begin{bconfig}{FileSet with Fifo} +Include { + Options { + signature=SHA1 + readfifo=yes + } + File = /home/abc/fifo +} +\end{bconfig} + + This feature can be used to do a "hot" database backup. + You can use the {\bf RunBeforeJob} to create the fifo + and to start a program that dynamically reads your database and writes + it to the fifo. Bareos will then write it to the Volume. + + During the restore operation, the inverse is true, after Bareos creates + the fifo if there was any data stored with it (no need to explicitly + list it or add any options), that data will be written back to the fifo. + As a consequence, if any such FIFOs exist in the fileset to be restored, + you must ensure that there is a reader program or Bareos will block, and + after one minute, Bareos will time out the write to the fifo and move on + to the next file. + + If you are planing to use a Fifo for backup, better take a look to the \ilink{bpipe plugin}{bpipe} section. -\begin{verbatim} - exec > /dev/null -\end{verbatim} \item [noatime=yes{\textbar}no] \hfill \\ \index[dir]{noatime} @@ -610,7 +915,7 @@ \section{FileSet Resource} 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 bareos can fit on both categories). + file integrity checkers (and Bareos 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} @@ -831,10 +1136,10 @@ \section{FileSet Resource} The default is {\bf no}. When enabled, any files matched within the Options will be excluded from the backup. -\label{ACLSupport} \item [aclsupport=yes{\textbar}no] \hfill \\ \index[dir]{aclsupport} \index[dir]{Directive!aclsupport} +\label{ACLSupport} The default is {\bf no}. If this option is set to yes, and you have the POSIX {\bf libacl} installed on your Linux system, Bareos will backup the file and directory Unix Access Control Lists (ACL) as defined in IEEE Std @@ -909,429 +1214,155 @@ \section{FileSet Resource} comparisons. That is an uppercase A will match a lowercase a. \item [fstype=filesystem-type] \hfill \\ -\index[dir]{fstype} -\index[dir]{Directive!fstype} - This option allows you to select files and directories by the - filesystem type. The permitted filesystem-type names are: - - ext2, jfs, ntfs, proc, reiserfs, xfs, usbdevfs, sysfs, smbfs, - iso9660. - - You may have multiple Fstype directives, and thus permit matching - of multiple filesystem types within a single Options resource. If - the type specified on the fstype directive does not match the - filesystem for a particular directive, that directory will not be - backed up. This directive can be used to prevent backing up - non-local filesystems. Normally, when you use this directive, you - would also set {\bf onefs=no} so that Bareos will traverse filesystems. - - This option is not implemented in Win32 systems. - -\item [DriveType=Windows-drive-type] \hfill \\ -\index[dir]{DriveType} -\index[dir]{Directive!DriveType} - This option is effective only on Windows machines and is - somewhat similar to the Unix/Linux {\bf fstype} described - above, except that it allows you to select what Windows - drive types you want to allow. By default all drive - types are accepted. - - The permitted drivetype names are: - - removable, fixed, remote, cdrom, ramdisk - - You may have multiple Driveype directives, and thus permit matching - of multiple drive types within a single Options resource. If - the type specified on the drivetype directive does not match the - filesystem for a particular directive, that directory will not be - backed up. This directive can be used to prevent backing up - non-local filesystems. Normally, when you use this directive, you - would also set {\bf onefs=no} so that Bareos will traverse filesystems. - - This option is not implemented in Unix/Linux systems. - -\item [hfsplussupport=yes{\textbar}no] \hfill \\ -\index[dir]{hfsplussupport} -\index[dir]{Directive!hfsplussupport} - This option allows you to turn on support for Mac OSX HFS plus - finder information. - -\item [strippath={\textless}integer{\textgreater}] \hfill \\ -\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. - -\item [size=sizeoption] \hfill \\ -\index[dir]{size} -\index[dir]{Directive!size} - This option will allow you to select files by their actual size. - You can select either files smaller than a certain size or bigger - then a certain size, files of a size in a certain range or files - of a size which is within 1 \% of its actual size. - - The following settings can be used: - - \begin{enumerate} - \item {\bf {\textless}size{\textgreater}-{\textless}size{\textgreater}} - Select file in range size - size. - \item {\bf {\textless}size} - Select files smaller than size. - \item {\bf {\textgreater}size} - Select files bigger than size. - \item {\bf size} - Select files which are within 1 \% of size. - \end{enumerate} - -\item [shadowing=none{\textbar}localwarn{\textbar}localremove{\textbar}globalwarn{\textbar}globalremove] \hfill \\ -\index[dir]{shadowing} -\index[dir]{Directive!shadowing} - The default is {\bf none}. This option performs a check within the - fileset for any file-list entries which are shadowing each other. - Lets say you specify / and /usr but /usr is not a seperate filesystem - then in the normal situation both / and /usr would lead to data being - backuped twice. - - The following settings can be used: - - \begin{enumerate} - \item none - Do NO shadowing check - \item localwarn - Do shadowing check within one include block and warn - \item localremove - Do shadowing check within one include block and remove duplicates - \item globalwarn - Do shadowing check between all include blocks and warn - \item globalremove - Do shadowing check between all include blocks and remove duplicates - \end{enumerate} - - The local and global part of the setting relate to the fact if the check - should be performed only within one include block (local) or between multiple - include blocks of the same fileset (global). The warn and remove part of the - keyword sets the action e.g. warn the user about shadowing or remove - the entry shadowing the other. - -\item [meta=tag] \hfill \\ -\index[dir]{meta} -\index[dir]{Directive!meta} - This option will add a meta tag to a fileset. These meta tags are used - by the Native NDMP protocol to pass NDMP backup or restore environment - variables via the Data Management Agent (DMA) in Bareos to the remote - NDMP Data Agent. You can have zero or more metatags which are all passed - to the remote NDMP Data Agent. - -\end{description} - -{\bf {\textless}file-list{\textgreater}} is a list of directory and/or filename names -specified with a {\bf File =} directive. To include names containing spaces, -enclose the name between double-quotes. Wild-cards are not interpreted -in file-lists. They can only be specified in Options resources. - -There are a number of special cases when specifying directories and files in a -{\bf file-list}. They are: - -\begin{itemize} -\item Any name preceded by an at-sign (@) is assumed to be the name of a - file, which contains a list of files each preceded by a "File =". The - named file is read once when the configuration file is parsed during the - Director startup. Note, that the file is read on the Director's machine - and not on the Client's. In fact, the @filename can appear anywhere - within the conf file where a token would be read, and the contents of - the named file will be logically inserted in the place of the @filename. - What must be in the file depends on the location the @filename is - specified in the conf file. For example: - -\footnotesize -\begin{verbatim} -Include { - Options { - compression=GZIP - } - @/home/files/my-files -} -\end{verbatim} -\normalsize - -\item Any name beginning with a vertical bar ({\textbar}) is assumed to - be the name of 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. Before - submitting the specified command bareos 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 - examples below show you how to do this. However, please note two - things: \\ - 1. if you want the local filesystems, you probably should be - using the new {\bf fstype} directive, which was added in version 1.36.3 - and set {\bf onefs=no}. - \\ - - 2. the exact syntax of the command needed in the examples below is very - system dependent. For example, on recent Linux systems, you may need to - add the -P option, on FreeBSD systems, the options will be different as - well. - - In general, you will need to prefix your command or commands with a {\bf - sh -c} so that they are invoked by a shell. This will not be the case - if you are invoking a script as in the second example below. Also, you - must take care to escape (precede with a \textbackslash{}) wild-cards, - shell character, and to ensure that any spaces in your command are - escaped as well. If you use a single quotes (') within a double quote - ("), Bareos will treat everything between the single quotes as one field - so it will not be necessary to escape the spaces. In general, getting - all the quotes and escapes correct is a real pain as you can see by the - next example. As a consequence, it is often easier to put everything in - a file and simply use the file name within Bareos. In that case the - {\bf sh -c} will not be necessary providing the first line of the file - is {\bf \#!/bin/sh}. - - As an example: - -\footnotesize -\begin{verbatim} - -Include { - Options { - signature = SHA1 - } - File = "|sh -c 'df -l | grep \"^/dev/hd[ab]\" | grep -v \".*/tmp\" \ - | awk \"{print \\$6}\"'" -} -\end{verbatim} -\normalsize - - 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 Bareos which consists of - preceding every \textbackslash{} and every " with a \textbackslash{}, and - you must also quote for the shell command. In the end, it is probably easier - just to execute a small file with: - - -\footnotesize -\begin{verbatim} -Include { - Options { - signature=MD5 - } - File = "|my_partitions" -} -\end{verbatim} -\normalsize - - where my\_partitions has: - -\footnotesize -\begin{verbatim} -#!/bin/sh -df -l | grep "^/dev/hd[ab]" | grep -v ".*/tmp" \ - | awk "{print \$6}" -\end{verbatim} -\normalsize - - If the vertical bar (\verb+|+) in front of my\_partitions is preceded by a - backslash as in \textbackslash{}\verb+|+, the program will be executed on the - Client's machine instead of on the Director's machine. - Please note that if the filename is given within quotes, you - will need to use two slashes. An example, provided by John Donagher, - that backs up all the local UFS partitions on a remote system is: - -\footnotesize -\begin{verbatim} -FileSet { - Name = "All local partitions" - Include { - Options { - signature=SHA1 - onefs=yes - } - File = "\\|bash -c \"df -klF ufs | tail +2 | awk '{print \$6}'\"" - } -} -\end{verbatim} -\normalsize +\index[dir]{fstype} +\index[dir]{Directive!fstype} + This option allows you to select files and directories by the + filesystem type. The permitted filesystem-type names are: - The above requires two backslash characters after the double quote (one - preserves the next one). If you are a Linux user, just change the {\bf ufs} - to {\bf ext3} (or your preferred filesystem type), and you will be in - business. + ext2, jfs, ntfs, proc, reiserfs, xfs, usbdevfs, sysfs, smbfs, + iso9660. - If you know what filesystems you have mounted on your system, e.g. - for Red Hat Linux normally only ext2 and ext3, you can backup - all local filesystems using something like: + You may have multiple Fstype directives, and thus permit matching + of multiple filesystem types within a single Options resource. If + the type specified on the fstype directive does not match the + filesystem for a particular directive, that directory will not be + backed up. This directive can be used to prevent backing up + non-local filesystems. Normally, when you use this directive, you + would also set {\bf onefs=no} so that Bareos will traverse filesystems. -\footnotesize -\begin{verbatim} + This option is not implemented in Win32 systems. -Include { - Options { - signature = SHA1 - onfs=no - fstype=ext2 - } - File = / -} -\end{verbatim} -\normalsize +\item [DriveType=Windows-drive-type] \hfill \\ +\index[dir]{DriveType} +\index[dir]{Directive!DriveType} + This option is effective only on Windows machines and is + somewhat similar to the Unix/Linux {\bf fstype} described + above, except that it allows you to select what Windows + drive types you want to allow. By default all drive + types are accepted. + The permitted drivetype names are: -\item Any file-list item preceded by a less-than sign ({\textless}) will be taken - 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 - modify the external file and change what will be saved without stopping and - restarting Bareos as would be necessary if using the @ modifier noted above. - For example: + removable, fixed, remote, cdrom, ramdisk -\footnotesize -\begin{verbatim} -Include { - Options { - signature = SHA1 - } - File = "