From: Kern Sibbald Date: Mon, 17 Sep 2007 09:43:34 +0000 (+0000) Subject: Fix build of German manual X-Git-Tag: Release-3.0.0~2513 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0decdf3a10b821af0be930ea26b9a56533d613e5;p=bacula%2Fdocs Fix build of German manual --- diff --git a/docs/manual-de/Makefile.in b/docs/manual-de/Makefile.in index 7fdad5cb..6648329a 100644 --- a/docs/manual-de/Makefile.in +++ b/docs/manual-de/Makefile.in @@ -98,7 +98,7 @@ web: latex2html -split 3 -local_icons -t "Bacula User's Guide" -long_titles 4 \ -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent bacula >tex.out 2>&1 ./translate_images.pl --to_meaningful_names bacula/Bacula_Users_Guide.html - cp -f bacula/Bacula_Freque_Asked_Questi.html bacula/faq.html + -cp -f bacula/Bacula_Freque_Asked_Questi.html bacula/faq.html @echo "Done making web" show: xdvi bacula diff --git a/docs/manual-de/autochangers.tex b/docs/manual-de/autochangers.tex index b223cb93..155836af 100644 --- a/docs/manual-de/autochangers.tex +++ b/docs/manual-de/autochangers.tex @@ -323,7 +323,7 @@ Storage-Dienstes erstellt werden. Einzelheiten dazu stehen, weiter oben in diese {\bf mehrere Laufwerke} \end{description} -Damit der Autochanger zuverl\"{a}{\ss}ig funktioniert, muss zus\"[a}tzlich ein Autochanger-Eintrag erstellt werden. +Damit der Autochanger zuverl\"{a}{\ss}ig funktioniert, muss zus\"{a}tzlich ein Autochanger-Eintrag erstellt werden. \input{autochangerres} \label{example} @@ -904,8 +904,8 @@ Ausserdem muss jedes dieser Kommandos genau diese R\"{u}ckgabewerte liefern: list -- gibt eine Zeile pro Tape im Autochanger aus. Das Format ist: :. Wobei der {\bf Slot} eine Zahl (nicht null) ist, die der Slot-Nummer entspricht, - und {\bf Barcode} ist, falls vorhanden, der Barcode des Tapes, - ansonsten ist {\bf Barcode} leer. + und {\bf Barcode} ist, falls vorhanden, der Barcode des Tapes, + ansonsten ist {\bf Barcode} leer. slots -- gibt die absolute Anzahl der Slots im Autochanger zur\"{u}ck. \end{verbatim} \normalsize @@ -914,4 +914,3 @@ Bacula \"{u}berpr\"{u}ft den R\"{u}ckgabewert des aufgerufenen Programms, wenn er Null ist, werden die gelieferten Daten akzeptiert. Wenn der R\"{u}ckgabewert nicht Null ist, wird eine entsprechende Fehlermeldung ausgegeben und Bacula wird ein manuelles laden des Tapes in das laufwerk erwarten. - diff --git a/docs/manual-de/configure.tex b/docs/manual-de/configure.tex index 7d900cea..81b85b37 100644 --- a/docs/manual-de/configure.tex +++ b/docs/manual-de/configure.tex @@ -1,11 +1,10 @@ %% %% -\section*{Customizing the Configuration Files} -\label{_ChapterStart16} +\chapter{Customizing the Configuration Files} +\label{ConfigureChapter} \index[general]{Files!Customizing the Configuration } \index[general]{Customizing the Configuration Files } -\addcontentsline{toc}{section}{Customizing the Configuration Files} When each of the Bacula programs starts, it reads a configuration file specified on the command line or the default {\bf bacula-dir.conf}, {\bf @@ -33,10 +32,30 @@ your system. An overall view of the resources can be seen in the following: (thanks to Aristides Maniatis for the above graphic) \label{ResFormat} -\subsection*{Resource Directive Format} +\section{Character Sets} +\index[general]{Character Sets} +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. + +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. On most newer Win32 machines, you can use {\bf notepad} +to edit the conf files, then choose output encoding UTF-8. + +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. + +\section{Resource Directive Format} \index[general]{Resource Directive Format } \index[general]{Format!Resource Directive } -\addcontentsline{toc}{subsection}{Resource Directive Format} Although, you won't need to know the details of all the directives a basic knowledge of Bacula resource directives is essential. Each directive contained @@ -46,7 +65,7 @@ the known Bacula resource record keywords, and it may be composed of upper or lower case characters and spaces. Each resource definition MUST contain a Name directive, and may optionally -contain a Description directive (or record). The Name directive is used to +contain a Description directive. The Name directive is used to uniquely identify the resource. The Description directive is (will be) used during display of the Resource to provide easier human recognition. For example: @@ -65,12 +84,11 @@ Defines the Director resource with the name "MyDir" and a working directory \$HOME/bacula/bin/working. In general, if you want spaces in a name to the right of the first equal sign (=), you must enclose that name within double quotes. Otherwise quotes are not generally necessary because once defined, -quoted strings and unquoted strings are all equal. -\label{Comments} +quoted strings and unquoted strings are all equal. -\subsubsection*{Comments} -\index[general]{Comments } -\addcontentsline{toc}{subsubsection}{Comments} +\label{Comments} +\subsection{Comments} +\index[general]{Comments} When reading the configuration file, blank lines are ignored and everything after a hash sign (\#) until the end of the line is taken to be a comment. A @@ -80,10 +98,9 @@ a semicolon is not necessary to terminate it, so generally in the examples in this manual, you will not see many semicolons. \label{Case1} -\subsubsection*{Upper and Lower Case and Spaces} -\index[general]{Spaces!Upper and Lower Case and } -\index[general]{Upper and Lower Case and Spaces } -\addcontentsline{toc}{subsubsection}{Upper and Lower Case and Spaces} +\subsection{Upper and Lower Case and Spaces} +\index[general]{Spaces!Upper/Lower Case} +\index[general]{Upper and Lower Case and Spaces} Case (upper/lower) and spaces are totally ignored in the resource directive keywords (the part before the equal sign). @@ -100,32 +117,29 @@ value is a name, you must enclose the name in double quotes for the spaces to be accepted. Names may contain up to 127 characters. Currently, a name may contain any ASCII character. Within a quoted string, any character following a backslash (\textbackslash{}) is taken as itself (handy for inserting -blackslashes and double quotes ("). +backslashes and double quotes ("). Please note, however, that Bacula resource names as well as certain other -names (e.g. Volume names) will in the future be severely limited to permit -only letters (including ISO accented letters), numbers, and a few special -characters (space, underscore, ...). All other characters and punctuation will -be illegal. -\label{Includes} +names (e.g. Volume names) must contain only letters (including ISO accented +letters), numbers, and a few special characters (space, underscore, ...). +All other characters and punctuation are invalid. -\subsubsection*{Including other Configuration Files} +\label{Includes} +\subsection{Including other Configuration Files} \index[general]{Including other Configuration Files } \index[general]{Files!Including other Configuration } \index[general]{Using @ to include other files} -\index[general{@{\bf filename}} -\addcontentsline{toc}{subsubsection}{Including other Configuration Files} +\index[general]{@{\bf filename}} If you wish to break your configuration file into smaller pieces, you can do so by including other files using the syntax @{\bf filename} where {\bf filename} is the full path and filename of another file. The @filename -specification can be given anywhere a primitive token would appear. -\label{DataTypes} +specification can be given anywhere a primitive token would appear. -\subsubsection*{Recognized Primitive Data Types} +\label{DataTypes} +\subsection{Recognized Primitive Data Types} \index[general]{Types!Recognized Primitive Data } \index[general]{Recognized Primitive Data Types } -\addcontentsline{toc}{subsubsection}{Recognized Primitive Data Types} When parsing the resource directives, Bacula classifies the data according to the types listed below. The first time you read this, it may appear a bit @@ -143,7 +157,7 @@ Bacula keywords -- i.e. Resource names or directive names). Keywords may not be quoted. \item [name-string] - \index[fd]{name-string } + \index[fd]{name-string} A name-string is similar to a name, except that the name may be quoted and can thus contain additional characters including spaces. Name strings are limited to 127 characters in length. Name strings are typically used on the @@ -151,7 +165,7 @@ right side of an equal (i.e. they are values to be associated with a keyword. \item [string] - \index[fd]{string } + \index[fd]{string} A quoted string containing virtually any character including spaces, or a non-quoted string. A string may be of any length. Strings are typically values that correspond to filenames, directories, or system command names. A @@ -160,25 +174,25 @@ include a double quote in a string, you precede the double quote with a backslash. Likewise to include a backslash. \item [directory] - \index[dir]{directory } + \index[dir]{directory} A directory is either a quoted or non-quoted string. A directory will be passed to your standard shell for expansion when it is scanned. Thus constructs such as {\bf \$HOME} are interpreted to be their correct values. \item [password] - \index[dir]{password } - This is a Bacula password and it is stored internally in MD5 hashed format. + \index[dir]{password} + This is a Bacula password and it is stored internally in MD5 hashed format. \item [integer] - \index[dir]{integer } - A 32 bit integer value. It may be positive or negative. + \index[dir]{integer} + A 32 bit integer value. It may be positive or negative. \item [positive integer] \index[dir]{positive integer } A 32 bit positive integer value. \item [long integer] - \index[dir]{long integer } + \index[dir]{long integer} A 64 bit integer value. Typically these are values such as bytes that can exceed 4 billion and thus require a 64 bit value. @@ -188,7 +202,7 @@ exceed 4 billion and thus require a 64 bit value. \label{Size1} \item [size] -\index[dir]{size } +\index[dir]{size} A size specified as bytes. Typically, this is a floating point scientific input format followed by an optional modifier. The floating point input is stored as a 64 bit integer value. If a modifier is present, it must @@ -229,11 +243,11 @@ permitted: \begin{description} \item [seconds] - \index[dir]{seconds } - seconds + \index[dir]{seconds} + seconds \item [minutes] - \index[dir]{minutes } + \index[dir]{minutes} minutes (60 seconds) \item [hours] @@ -241,12 +255,12 @@ permitted: hours (3600 seconds) \item [days] - \index[dir]{days } + \index[dir]{days} days (3600*24 seconds) \item [weeks] - \index[dir]{weeks } - weeks (3600*24*7 seconds) + \index[dir]{weeks} + weeks (3600*24*7 seconds) \item [months] \index[dir]{months } @@ -281,10 +295,9 @@ are valid date specifications. \end{description} \label{ResTypes} -\subsection*{Resource Types} +\section{Resource Types} \index[general]{Types!Resource } \index[general]{Resource Types } -\addcontentsline{toc}{subsection}{Resource Types} The following table lists all current Bacula resource types. It shows what resources must be defined for each service (daemon). The default configuration @@ -327,12 +340,11 @@ you need not worry about creating all these kinds of resources from scratch. \end{longtable} -\subsection*{Names, Passwords and Authorization} +\section{Names, Passwords and Authorization} \label{Names} \index[general]{Authorization!Names Passwords and } \index[general]{Names, Passwords and Authorization } \index[general]{Passwords} -\addcontentsline{toc}{subsection}{Names, Passwords and Authorization} In order for one daemon to contact another daemon, it must authorize itself with a password. In most cases, the password corresponds to a particular name, @@ -363,10 +375,9 @@ File daemon to authorize with the Storage daemon is a temporary password unique to each Job created by the daemons and is not specified in any .conf file. -\subsection*{Detailed Information for each Daemon} +\section{Detailed Information for each Daemon} \index[general]{Detailed Information for each Daemon } \index[general]{Daemon!Detailed Information for each } -\addcontentsline{toc}{subsection}{Detailed Information for each Daemon} The details of each Resource and the directives permitted therein are described in the following chapters. @@ -375,19 +386,19 @@ The following configuration files must be defined: \begin{itemize} \item - \ilink{Console}{_ChapterStart36} -- to define the resources for + \ilink{Console}{ConsoleConfChapter} -- to define the resources for the Console program (user interface to the Director). It defines which Directors are available so that you may interact with them. \item - \ilink{Director}{_ChapterStart40} -- to define the resources + \ilink{Director}{DirectorChapter} -- to define the resources necessary for the Director. You define all the Clients and Storage daemons that you use in this configuration file. \item - \ilink{Client}{_ChapterStart25} -- to define the resources for + \ilink{Client}{FiledConfChapter} -- to define the resources for each client to be backed up. That is, you will have a separate Client resource file on each machine that runs a File daemon. \item - \ilink{Storage}{_ChapterStart31} -- to define the resources to + \ilink{Storage}{StoredConfChapter} -- to define the resources to be used by each Storage daemon. Normally, you will have a single Storage daemon that controls your tape drive or tape drives. However, if you have tape drives on several machines, you will have at least one Storage daemon diff --git a/docs/manual-de/fdl.tex b/docs/manual-de/fdl.tex index ea027bba..b46cd990 100644 --- a/docs/manual-de/fdl.tex +++ b/docs/manual-de/fdl.tex @@ -1,26 +1,10 @@ -%---------The file header--------------------------------------------- +% TODO: maybe get rid of centering -\usepackage[english]{babel} %language selection -\usepackage[T1]{fontenc} +\chapter{GNU Free Documentation License} +\index[general]{GNU Free Documentation License} +\index[general]{License!GNU Free Documentation} -\pagenumbering{arabic} - -\usepackage{hyperref} -\hypersetup{colorlinks, - citecolor=black, - filecolor=black, - linkcolor=black, - urlcolor=black, - pdftex} - - -%--------------------------------------------------------------------- -\section*{GNU Free Documentation License} -\index[general]{GNU ree Documentation License} -\index[general]{License!GNU ree Documentation} -\addcontentsline{toc}{section}{GNU ree Documentation License} - -%\label{label_fdl} +\label{label_fdl} \begin{center} @@ -68,7 +52,6 @@ principally for works whose purpose is instruction or reference. \begin{center} {\Large\bf 1. APPLICABILITY AND DEFINITIONS} -\addcontentsline{toc}{section}{1. APPLICABILITY AND DEFINITIONS} \end{center} This License applies to any manual or other work, in any medium, that @@ -159,7 +142,6 @@ no effect on the meaning of this License. \begin{center} {\Large\bf 2. VERBATIM COPYING} -\addcontentsline{toc}{section}{2. VERBATIM COPYING} \end{center} You may copy and distribute the Document in any medium, either @@ -178,7 +160,6 @@ you may publicly display copies. \begin{center} {\Large\bf 3. COPYING IN QUANTITY} -\addcontentsline{toc}{section}{3. COPYING IN QUANTITY} \end{center} @@ -220,7 +201,6 @@ them a chance to provide you with an updated version of the Document. \begin{center} {\Large\bf 4. MODIFICATIONS} -\addcontentsline{toc}{section}{4. MODIFICATIONS} \end{center} You may copy and distribute a Modified Version of the Document under @@ -339,7 +319,6 @@ imply endorsement of any Modified Version. \begin{center} {\Large\bf 5. COMBINING DOCUMENTS} -\addcontentsline{toc}{section}{5. COMBINING DOCUMENTS} \end{center} @@ -367,7 +346,6 @@ Entitled "Endorsements". \begin{center} {\Large\bf 6. COLLECTIONS OF DOCUMENTS} -\addcontentsline{toc}{section}{6. COLLECTIONS OF DOCUMENTS} \end{center} You may make a collection consisting of the Document and other documents @@ -384,7 +362,6 @@ other respects regarding verbatim copying of that document. \begin{center} {\Large\bf 7. AGGREGATION WITH INDEPENDENT WORKS} -\addcontentsline{toc}{section}{7. AGGREGATION WITH INDEPENDENT WORKS} \end{center} @@ -408,7 +385,6 @@ aggregate. \begin{center} {\Large\bf 8. TRANSLATION} -\addcontentsline{toc}{section}{8. TRANSLATION} \end{center} @@ -433,7 +409,6 @@ title. \begin{center} {\Large\bf 9. TERMINATION} -\addcontentsline{toc}{section}{9. TERMINATION} \end{center} @@ -448,7 +423,6 @@ parties remain in full compliance. \begin{center} {\Large\bf 10. FUTURE REVISIONS OF THIS LICENSE} -\addcontentsline{toc}{section}{10. FUTURE REVISIONS OF THIS LICENSE} \end{center} @@ -470,7 +444,7 @@ as a draft) by the Free Software Foundation. \begin{center} {\Large\bf ADDENDUM: How to use this License for your documents} -\addcontentsline{toc}{section}{ADDENDUM: How to use this License for your documents} +% TODO: this is too long for table of contents \end{center} To use this License in a document you have written, include a copy of diff --git a/docs/manual-de/fileset.tex b/docs/manual-de/fileset.tex index c76fbd36..6f9c849b 100644 --- a/docs/manual-de/fileset.tex +++ b/docs/manual-de/fileset.tex @@ -1,11 +1,10 @@ -%% +-% %% -\subsection*{The FileSet Resource} +\section{The FileSet Resource} \label{FileSetResource} -\index[general]{Resource!FileSet } -\index[general]{FileSet Resource } -\addcontentsline{toc}{subsection}{FileSet Resource} +\index[general]{Resource!FileSet} +\index[general]{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 @@ -19,31 +18,65 @@ automatically create a new FileSet (defined by the name and an MD5 checksum of the Include/Exclude contents). Each time a new FileSet is created, Bacula will ensure that the next backup is always a Full save. +\section{Character Sets} +\index[general]{Character Sets} +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]{FileSet} +\index[dir]{Directive!FileSet} Start of the FileSet resource. One {\bf FileSet} resource must be defined for each Backup job. \item [Name = \lt{}name\gt{}] \index[dir]{Name} +\index[dir]{Directive!Name} The name of the FileSet resource. This directive is required. \item [Ignore FileSet Changes = \lt{}yes|no\gt{}] \index[dir]{Ignore FileSet Changes} - 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. This directive is available in Bacula version 1.35.4 or later. +\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 saved. + + If this directive is set to {\bf yes}, any changes you make to the + 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. We strongly recommend against setting this + directive to yes, since doing so may cause you to have an incomplete + set of backups. \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. @@ -54,12 +87,14 @@ defined for each Backup job. \lt{}file-list\gt{} \} ] \index[dir]{Include \{ [ Options \{\lt{}file-options\gt{}\} ...] \lt{}file-list\gt{} \} } +\index[dir]{Directive!Include} \item [Options \{ \lt{}file-options\gt{} \} ] \index[dir]{Options \{ \lt{}file-options\gt{} \} } \item [Exclude \{ \lt{}file-list\gt{} \}] \index[dir]{Exclude \{ \lt{}file-list\gt{} \} } +\index[dir]{Directive!Exclude} \end{description} @@ -69,7 +104,8 @@ subdirectories of any directory in the Include File list will be backed up. Note, see below for the definition of \lt{}file-list\gt{}. The Include resource may also contain one or more Options resources that specify options such as compression to be applied to all or any subset of -the files found when processing the file-list for backup. +the files found when processing the file-list for backup. Please see +below for more details concerning Options resources. 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 @@ -143,8 +179,11 @@ See below for the definition of file-list. Multiple Options resources may be specified one after another. As the files are found in the specified directories, the Options will applied to the filenames to determine if and how the file should be backed up. The -Options resources are applied in the order they are specified in the -FileSet until the first one that matches. +wildcard and regular expression pattern matching parts of the +Options resources are checked in the order they are specified in the +FileSet until the first one that matches. Once one matches, the +compression and other flags within the Options specification will +apply to the pattern matched. A key point is that in the absence of an Option or no other Option is matched, every file is accepted for backing up. This means that if @@ -156,18 +195,17 @@ consideration, that file will be saved without looking at any other Options resources that may be present. This means that any wild cards must appear before an Options resource without wild cards. -If for some reason, Bacula applies all the Options resources to a file -under consideration for backup, but there are no matches (generally because -of wild cards that don't match), Bacula as a default will then backup the -file. This is quite logical if you consider the case of no Options, where -you want everything to be backed up, and it is important to keep in -mind when excluding as mentioned above. +If for some reason, Bacula checks all the Options resources to a file under +consideration for backup, but there are no matches (generally because of wild +cards that don't match), Bacula as a default will then backup the file. This +is quite logical if you consider the case of no Options clause is specified, +where you want everything to be backed up, and it is important to keep in mind +when excluding as mentioned above. -However, one additional point is that -in the case that no match was found, Bacula will use the options found in -the last Options resource. As a consequence, if you want a particular set -of "default" options, you should put them in an Options resource after -any other Options. +However, one additional point is that in the case that no match was found, +Bacula will use the options found in the last Options resource. As a +consequence, if you want a particular set of "default" options, you should put +them in an Options resource after any other Options. It is a good idea to put all your wild-card and regex expressions inside double quotes to prevent conf file scanning problems. @@ -180,51 +218,60 @@ The directives within an Options resource may be one of the following: \begin{description} \item [compression=GZIP] -\index[fd]{compression } - All files saved will be software compressed using the GNU ZIP compression - format. The compression is done on a file by file basis by the File daemon. - If there is a problem reading the tape in a single record of a file, it will - at most affect that file and none of the other files on the tape. Normally - this option is {\bf not} needed if you have a modern tape drive as the drive - will do its own compression. In fact, if you specify software compression at - the same time you have hardware compression turned on, your files may - actually take more space on the volume. - - Software compression is very important if you are writing your Volumes to a - file, and it can also be helpful if you have a fast computer but a slow - network, otherwise it is generally better to rely your tape drive's 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 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 and are rather CPU intensive. +\index[dir]{compression} +\index[dir]{Directive!compression} + All files saved will be software compressed using the GNU ZIP + compression format. The compression is done on a file by file basis by + the File daemon. If there is a problem reading the tape in a single + record of a file, it will at most affect that file and none of the other + files on the tape. Normally this option is {\bf not} needed if you have + a modern tape drive as the drive will do its own compression. In fact, + if you specify software compression at the same time you have hardware + compression turned on, your files may actually take more space on the + volume. + + Software compression is very important if you are writing your Volumes + to a file, and it can also be helpful if you have a fast computer but a + slow network, otherwise it is generally better to rely your tape drive's + 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 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 six generally give very little extra + compression and are rather CPU intensive. \item [signature=SHA1] -\index[fd]{signature } - An SHA1 signature will be computed for all The SHA1 algorithm is purported to - be some what slower than the MD5 algorithm, but at the same time is - significantly better from a cryptographic point of view (i.e. much fewer - collisions, much lower probability of being hacked.) It adds four more bytes - than the MD5 signature. We strongly recommend that either this option or MD5 - be specified as a default for all files. Note, only one of the two options - MD5 or SHA1 can be computed for any file. +\index[dir]{signature} +\index[dir]{SHA1} +\index[dir]{Directive!signature} + An SHA1 signature will be computed for all The SHA1 algorithm is + purported to be some what slower than the MD5 algorithm, but at the same + time is significantly better from a cryptographic point of view (i.e. + much fewer collisions, much lower probability of being hacked.) It adds + four more bytes than the MD5 signature. We strongly recommend that + either this option or MD5 be specified as a default for all files. + Note, only one of the two options MD5 or SHA1 can be computed for any + file. \item [signature=MD5] - \index[fd]{signature } - An MD5 signature will be computed for all files saved. Adding this option - generates about 5\% extra overhead for each file saved. In addition to the - additional CPU time, the MD5 signature adds 16 more bytes per file to your - catalog. We strongly recommend that this option or the SHA1 option be - specified as a default for all files. +\index[dir]{signature} +\index[dir]{MD5} +\index[dir]{Directive!signature} + An MD5 signature will be computed for all files saved. Adding this + option generates about 5\% extra overhead for each file saved. In + addition to the additional CPU time, the MD5 signature adds 16 more + bytes per file to your catalog. We strongly recommend that this option + or the SHA1 option be specified as a default for all files. \item [verify=\lt{}options\gt{}] -\index[fd]{verify } +\index[dir]{verify} +\index[dir]{Directive!verify} The options letters specified are used when running a {\bf Verify Level=Catalog} as well as the {\bf DiskToCatalog} level job. The options letters may be any combination of the following: @@ -273,28 +320,38 @@ The directives within an Options resource may be one of the following: inodes, number of links, size, and MD5 changes. \item [onefs=yes|no] -\index[fd]{onefs} - If set to {\bf yes} (the default), {\bf Bacula} will remain on a single file - system. That is it will not backup file systems that are mounted on a - subdirectory. If you are using a *nix system, you may not even be aware - that there are several different filesystems as they are often - automatically mounted by the OS (e.g. /dev, /net, /sys, /proc, ...). - With Bacula 1.38.0 or later, it will inform you when it decides not - to traverse into another filesystem. This can be very useful if you - forgot to backup a particular partition. An example of the - informational message in the job report is: +\index[dir]{onefs} +\index[dir]{Directive!onefs} + If set to {\bf yes} (the default), {\bf Bacula} will remain on a single + file system. That is it will not backup file systems that are mounted + on a subdirectory. If you are using a *nix system, you may not even be + aware that there are several different filesystems as they are often + automatically mounted by the OS (e.g. /dev, /net, /sys, /proc, ...). + With Bacula 1.38.0 or later, it will inform you when it decides not to + traverse into another filesystem. This can be very useful if you forgot + to backup a particular partition. An example of the informational + message in the job report is: + +\footnotesize +\begin{verbatim} +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} -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 +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 @@ -303,8 +360,8 @@ rufus-fd: Filesystem change prohibited. Will not descend into /home also be backed up. Normally, it is preferable to set {\bf onefs=yes} and to explicitly name each filesystem you want backed up. Explicitly naming the filesystems you want backed up avoids the possibility of getting into a - infinite loop recursing filesystems. Another possiblity is to - use {\bf onefs=no} and to set {\bs fstype=ext2, ...}. + infinite loop recursing filesystems. Another possibility is to + use {\bf onefs=no} and to set {\bf fstype=ext2, ...}. See the example below for more details. If you think that Bacula should be backing up a particular directory @@ -345,35 +402,62 @@ Change: 2005-11-06 12:36:48.000000000 +0100 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} \item [portable=yes|no] -\index[dir]{portable } - If set to {\bf yes} (default is {\bf no}), the Bacula File daemon will backup - Win32 files in a portable format, but not all Win32 file attributes will be - saved and restored. By default, this option is set to {\bf no}, which means - that on Win32 systems, the data will be backed up using Windows API calls and - on WinNT/2K/XP, all the security and ownership attributes will be properly - backed up (and restored). However this format is not portable to other - systems -- e.g. Unix, Win95/98/Me. When backing up Unix systems, this option - is ignored, and unless you have a specific need to have portable backups, we - recommend accept the default ({\bf no}) so that the maximum information - concerning your files is saved. +\index[dir]{portable} +\index[dir]{Directive!portable} + If set to {\bf yes} (default is {\bf no}), the Bacula File daemon will + backup Win32 files in a portable format, but not all Win32 file + attributes will be saved and restored. By default, this option is set + to {\bf no}, which means that on Win32 systems, the data will be backed + up using Windows API calls and on WinNT/2K/XP, all the security and + ownership attributes will be properly backed up (and restored). However + this format is not portable to other systems -- e.g. Unix, Win95/98/Me. + When backing up Unix systems, this option is ignored, and unless you + have a specific need to have portable backups, we recommend accept the + default ({\bf no}) so that the maximum information concerning your files + is saved. \item [recurse=yes|no] -\index[fd]{recurse } - If set to {\bf yes} (the default), Bacula will recurse (or descend) into all - subdirectories found unless the directory is explicitly excluded using an - {\bf exclude} definition. If you set {\bf recurse=no}, Bacula will save the - subdirectory entries, but not descend into the subdirectories, and thus will - not save the files or directories contained in the subdirectories. Normally, - you will want the default ({\bf yes}). +\index[dir]{recurse} +\index[dir]{Directive!recurse} + If set to {\bf yes} (the default), Bacula will recurse (or descend) into + all subdirectories found unless the directory is explicitly excluded + using an {\bf exclude} definition. If you set {\bf recurse=no}, Bacula + will save the subdirectory entries, but not descend into the + subdirectories, and thus will not save the files or directories + contained in the subdirectories. Normally, you will want the default + ({\bf yes}). \item [sparse=yes|no] -\index[dir]{sparse } +\index[dir]{sparse} +\index[dir]{Directive!sparse} Enable special code that checks for sparse files such as created by ndbm. The default is {\bf no}, so no checks are made for sparse files. You may specify {\bf sparse=yes} even on files that are not sparse file. @@ -410,7 +494,8 @@ Change: 2005-11-06 12:36:48.000000000 +0100 \label{readfifo} \item [readfifo=yes|no] -\index[fd]{readfifo } +\index[dir]{readfifo} +\index[dir]{Directive!readfifo} If enabled, tells the Client to read the data on a backup and write the data on a restore to any FIFO (pipe) that is explicitly mentioned in the FileSet. In this case, you must have a program already running that @@ -431,9 +516,29 @@ Change: 2005-11-06 12:36:48.000000000 +0100 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 } +\index[dir]{mtimeonly} +\index[dir]{Directive!mtimeonly} If enabled, tells the Client that the selection of files during Incremental and Differential backups should based only on the st\_mtime value in the stat() packet. The default is {\bf no} which means that @@ -442,7 +547,8 @@ Change: 2005-11-06 12:36:48.000000000 +0100 to use this option. \item [keepatime=yes|no] -\index[dir]{keepatime } +\index[dir]{keepatime} +\index[dir]{Directive!keepatime} The default is {\bf no}. When enabled, Bacula will reset the st\_atime (access time) field of files that it backs up to their value prior to the backup. This option is not generally recommended as there are very @@ -460,9 +566,24 @@ Change: 2005-11-06 12:36:48.000000000 +0100 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} - When enabled (default), this directive will cause hard inks to be +\index[dir]{Directive!hardlinks} + 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 @@ -475,7 +596,8 @@ Change: 2005-11-06 12:36:48.000000000 +0100 system will not be restored identically to the original. \item [wild=\lt{}string\gt{}] -\index[dir]{wild } +\index[dir]{wild} +\index[dir]{Directive!wild} Specifies a wild-card string to be applied to the filenames and directory names. Note, if {\bf Exclude} is not enabled, the wild-card will select which files are to be included. If {\bf Exclude=yes} is @@ -483,23 +605,18 @@ Change: 2005-11-06 12:36:48.000000000 +0100 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. - It is recommended to enclose the string in double quotes. -\item [wildfile=\lt{}string\gt{}] -\index[dir]{wildfile } - Specifies a wild-card string to be applied to filenames only. No - directories will be matched by this directive. Note, if {\bf Exclude} - is not enabled, the wild-card will select which files are 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 - specified, and they will be applied in turn until the first one that - matches. + You may want to test your expressions prior to running your + backup by using the bwild program. Please see the + \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 + chapter of this manual. It is recommended to enclose the string in double quotes. - An example of excluding with the WildFile option on Win32 machines is - presented below. \item [wilddir=\lt{}string\gt{}] -\index[dir]{wilddir } +\index[dir]{wilddir} +\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 @@ -508,37 +625,96 @@ Change: 2005-11-06 12:36:48.000000000 +0100 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. + It is recommended to enclose the string in double quotes. + + You may want to test your expressions prior to running your + backup by using the bwild program. Please see the + \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 + chapter of this manual. An example of excluding with the WildDir option on Win32 machines is presented below. +\item [wildfile=\lt{}string\gt{}] +\index[dir]{wildfile} +\index[dir]{Directive!wildfile} + Specifies a wild-card string to be applied to non-directories. That + is no directory entries will be matched by this directive. + However, note that the match is done against the full path and filename, + so your wild-card string must take into account that filenames + are preceded by the full path. + If {\bf Exclude} + is not enabled, the wild-card will select which files are 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 + specified, and they will be applied in turn until the first one that + matches. + + It is recommended to enclose the string in double quotes. + + You may want to test your expressions prior to running your + backup by using the bwild program. Please see the + \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 + chapter of this manual. + An example of excluding with the WildFile option on Win32 machines is + presented below. + \item [regex=\lt{}string\gt{}] -\index[dir]{regex } +\index[dir]{regex} +\index[dir]{Directive!regex} Specifies a POSIX extended regular expression to be applied to the - filenames and directory names. - This directive is available in version 1.35 and later. If {\bf + filenames and directory names, which include the full path. If {\bf Exclude} is not enabled, the regex will select which files are to be included. If {\bf Exclude=yes} is specified, the regex will select which files are to be excluded. Multiple regex directives may be specified within an Options resource, 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. + until the first one that matches. Note, if you exclude a directory, no + files or directories below it will be matched. + It is recommended to enclose the string in double quotes. + The regex libraries differ from one operating system to + 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{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 + chapter of this manual. + + \item [regexfile=\lt{}string\gt{}] -\index[dir]{regexfile } - Specifies a POSIX extended regular expression to be applied to filenames - only. No directories will be matched by this directive. Note, if {\bf - Exclude} is not enabled, the regex will select which files are to be - included. If {\bf Exclude=yes} is specified, the regex will select - which files are to be excluded. Multiple regex directives may be +\index[dir]{regexfile} +\index[dir]{Directive!regexfile} + Specifies a POSIX extended regular expression to be applied to + non-directories. No directories will be matched by this directive. + However, note that the match is done against the full path and + filename, so your regex string must take into account that filenames + are preceded by the full path. + If {\bf Exclude} is not enabled, the regex will select which files are + to be included. If {\bf Exclude=yes} is specified, the regex will + select which files are to be excluded. Multiple regex directives may be specified, and they will be applied in turn until the first one that matches. + It is recommended to enclose the string in double quotes. + The regex libraries differ from one operating system to + 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{Utilities}{bregex} chapter of this manual for + more. + + \item [regexdir=\lt{}string\gt{}] -\index[dir]{regexdir } +\index[dir]{regexdir} +\index[dir]{Directive!regexdir} Specifies a POSIX extended regular expression to be applied to directory names only. No filenames will be matched by this directive. Note, if {\bf Exclude} is not enabled, the regex will select directories @@ -547,17 +723,27 @@ Change: 2005-11-06 12:36:48.000000000 +0100 regex 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. + It is recommended to enclose the string in double quotes. + The regex libraries differ from one operating system to + 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{Utilities}{bregex} chapter of this manual for + more. + + \item [exclude=yes|no] -\index[dir]{exclude } - The default is {\bf no}. When enabled, any files matched within the Options - will be excluded from the backup. +\index[dir]{exclude} +\index[dir]{Directive!exclude} + The default is {\bf no}. When enabled, any files matched within the + Options will be excluded from the backup. \label{ACLSupport} - \item [aclsupport=yes|no] -\index[dir]{aclsupport } +\index[dir]{aclsupport} +\index[dir]{Directive!aclsupport} The default is {\bf no}. If this option is set to yes, and you have the POSIX {\bf libacl} installed on your system, Bacula will backup the file and directory UNIX Access Control Lists (ACL) as defined in IEEE Std @@ -572,14 +758,16 @@ Change: 2005-11-06 12:36:48.000000000 +0100 (perhaps reiserfs) that does not have ACLs, the ACLs will be ignored. \item [ignore case=yes|no] -\index[dir]{ignore case } - The default is {\bf no}, except on Windows systems where the default - is {\bf yes}. When this directive is set to {\bf yes} all the case - of character will be ignored in wild-card and regex comparisons. - That is an uppercase A will match a lowercase a. +\index[dir]{ignore case} +\index[dir]{Directive!ignore case} + The default is {\bf no}. On Windows systems, you will almost surely + want to set this to {\bf yes}. When this directive is set to {\bf yes} + all the case of character will be ignored in wild-card and regex + comparisons. That is an uppercase A will match a lowercase a. \item [fstype=filesystem-type] -\index[dir]{fstype } +\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: @@ -598,15 +786,26 @@ Change: 2005-11-06 12:36:48.000000000 +0100 \item [hfsplussupport=yes|no] -\index[dir]{hfsplussupport } +\index[dir]{hfsplussupport} +\index[dir]{Directive!hfsplussupport} 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 specified with a {\bf File =} directive. To include names containing spaces, -enclose the name between double-quotes. +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: @@ -678,7 +877,7 @@ Include { \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 @@ -732,8 +931,8 @@ FileSet { 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} @@ -747,7 +946,8 @@ Include { \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 @@ -798,7 +998,7 @@ Include { 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}{_ChapterStart38} 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. @@ -839,12 +1039,15 @@ Include { you must ensure that there is a reader program or Bacula will block, and after one minute, Bacula will time out the write to the fifo and move on to the next file. + +\item A file-list may not contain wild-cards. Use directives in the + Options resource if you wish to specify wild-cards or regular expression + 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} @@ -967,8 +1170,8 @@ FileSet { Options { wilddir = /proc wilddir = /tmp - wildfile = ".journal" - wildfile = ".autofsck" + wildfile = "/.journal" + wildfile = "/.autofsck" exclude = yes } File = / @@ -1013,7 +1216,7 @@ that are not matched by the Options directives will automatically be backed up too (i.e. that is the default rule). To accomplish what we want, we must explicitly exclude all other files. -We do this with the fillowing: +We do this with the following: \footnotesize \begin{verbatim} @@ -1026,7 +1229,7 @@ FileSet { } Options { Exclude = yes - RegexFile = "^.?*$" + RegexFile = ".*" } File = /myfile } @@ -1093,7 +1296,7 @@ FileSet { The problem is that the above will include everything in /home. To get things to work correctly, you need to start with the idea of exclusion instead of inclusion. So, you could simply exclude all directories -except the two you want using: +except the two you want to use: \footnotesize \begin{verbatim} FileSet { @@ -1124,7 +1327,7 @@ FileSet { wilddir = "/home/b*" } Options { - RegexDir = "^.?*$" + RegexDir = ".*" exclude = yes } File = /home @@ -1133,14 +1336,9 @@ FileSet { \end{verbatim} \normalsize -I haven't actually tried the above two examples, so you may need to -tweak them to get them to work right. - - -\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: @@ -1163,10 +1361,9 @@ mounted or is mounted read-only. If necessary, this can be done using the {\bf 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 @@ -1198,11 +1395,9 @@ FileSet { \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 @@ -1231,14 +1426,14 @@ rules: \begin{itemize} \item Filenames are case sensitive, so you must use the correct case. -\item To exclude a directory, you must not have a trailing slash on the +\item To 2~exclude a directory, you must not have a trailing slash on the directory name. -\item If you have spaces in your filename, you must enclose the entire name +\item I2~f you have spaces in your filename, you must enclose the entire name in double-quote characters ("). Trying to use a backslash before the space will not work. -\item If you are using the old Exclude syntax (noted below), you may not - specify a drive letter in the exclude. The new syntax noted above should work - fine including driver letters. +\item If you are using the old Exclude syntax (noted below), you may not + specify a drive letter in the exclude. The new syntax noted above + should work fine including driver letters. \end{itemize} Thanks to Thiago Lima for summarizing the above items for us. If you are @@ -1258,7 +1453,6 @@ Full backup. \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 @@ -1367,18 +1561,43 @@ page, they should be written on a single line in real use. \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 -manual. +\ilink{estimate}{estimate} in the Console chapter of this +manual. + +As an example, suppose you add the following test FileSet: + +\footnotesize +\begin{verbatim} +FileSet { + Name = Test + Include { + File = /home/xxx/test + Options { + regex = ".*\.c$" + } + } +} +\end{verbatim} +\normalsize + +You could then add some test files to the directory {\bf /home/xxx/test} +and use the following command in the console: + +\footnotesize +\begin{verbatim} +estimate job= listing client= fileset=Test +\end{verbatim} +\normalsize + +to give you a listing of all files that match. diff --git a/docs/manual-de/install.tex b/docs/manual-de/install.tex index eabbbc00..92d1e7d6 100644 --- a/docs/manual-de/install.tex +++ b/docs/manual-de/install.tex @@ -708,7 +708,7 @@ make install Wenn Bacula zuvor schon installiert worden war, werden die Programmdateien überschrieben werden, die Konfigurationsdateien jedoch erhalten bleiben. An die Namen der ``neuen'' Konfigurationsdateien wird ein {\bf .new} angehängt. Wenn Sie Bacula bereits installiert und betrieben hatten, werden Sie diese normalerweise verwerfen wollen oder ignorieren. \subsection*{Einen File-Dämon oder Client-Prozess kompilieren} -\index[general]{Kompilierung!eines File-Dämons oder Client_Prozesses } +\index[general]{Kompilierung!eines File-Dämons oder Client-Prozesses } \index[general]{Einen File-Dämon oder Client-Prozess kompilieren } \addcontentsline{toc}{subsection}{Einen File-Dämon oder Client-Prozess kompilieren} diff --git a/docs/manual-de/postgresql.tex b/docs/manual-de/postgresql.tex index e8df71a7..b59a8d4e 100644 --- a/docs/manual-de/postgresql.tex +++ b/docs/manual-de/postgresql.tex @@ -1,21 +1,33 @@ %% %% -\section*{Installing and Configuring PostgreSQL} -\label{_ChapterStart10} +\chapter{Installing and Configuring PostgreSQL} +\label{PostgreSqlChapter} \index[general]{PostgreSQL!Installing and Configuring } \index[general]{Installing and Configuring PostgreSQL } -\addcontentsline{toc}{section}{Installing and Configuring PostgreSQL} - -\subsection*{Installing and Configuring PostgreSQL -- Phase I} -\index[general]{Installing and Configuring PostgreSQL -- Phase I } -\index[general]{Phase I!Installing and Configuring PostgreSQL -- } -\addcontentsline{toc}{subsection}{Installing and Configuring PostgreSQL -- -Phase I} +\index[general]{Upgrading} + +If you are considering using PostreSQL, you should be aware +of their philosophy of upgrades, which could be +destabilizing for a production shop. Basically at every major version +upgrade, you are required to dump your database in an ASCII format, +do the upgrade, and then reload your database (or databases). This is +because they frequently update the "data format" from version to +version, and they supply no tools to automatically do the conversion. +If you forget to do the ASCII dump, your database may become totally +useless because none of the new tools can access it due to the format +change, and the PostgreSQL server will not be able to start. + +If you are building PostgreSQL from source, please be sure to add +the {\bf \verb:--:enable-thread-safety} option when doing the ./configure +for PostgreSQL. + +\section{Installing PostgreSQL} +\index[general]{PostgreSQL!Installing } If you use the {\bf ./configure \verb:--:with-postgresql=PostgreSQL-Directory} -statement for configuring {\bf Bacula}, you will need PostgreSQL version 7.3 -or later installed. NOTE! PostgreSQL versions earlier than 7.3 do not work +statement for configuring {\bf Bacula}, you will need PostgreSQL version 7.4 +or later installed. NOTE! PostgreSQL versions earlier than 7.4 do not work with Bacula. If PostgreSQL is installed in the standard system location, you need only enter {\bf \verb:--:with-postgresql} since the configure program will search all the standard locations. If you install PostgreSQL in your home @@ -36,18 +48,43 @@ If you are using FreeBSD, will be useful. Even if you are not using FreeBSD, the article will contain useful configuration and setup information. +If you configure the Batch Insert code in Bacula (attribute inserts are +10 times faster), you {\bf must} be using a PostgreSQL that was built with +the {\bf \verb:--:enable-thread-safety} option, otherwise you will get +data corruption. Most major Linux distros have thread safety turned on, but +it is better to check. One way is to see if the PostgreSQL library that +Bacula will be linked against references pthreads. This can be done +with a command such as: + +\footnotesize +\begin{verbatim} + nm /usr/lib/libpq.a | grep pthread_mutex_lock +\end{verbatim} +\normalsize + +The above command should print a line that looks like: + +\footnotesize +\begin{verbatim} + U pthread_mutex_lock +\end{verbatim} +\normalsize + +if does, then everything is OK. If it prints nothing, do not enable batch +inserts when building Bacula. + After installing PostgreSQL, you should return to completing the installation of {\bf Bacula}. Later, after Bacula is installed, come back to this chapter to complete the installation. Please note, the installation files used in the second phase of the PostgreSQL installation are created during the Bacula -Installation. -\label{PostgreSQL_phase2} +Installation. You must still come back to complete the second phase of the +PostgreSQL installation even if you installed binaries (e.g. rpm, deb, +...). -\subsection*{Installing and Configuring PostgreSQL -- Phase II} -\index[general]{Phase II!Installing and Configuring PostgreSQL -- } -\index[general]{Installing and Configuring PostgreSQL -- Phase II } -\addcontentsline{toc}{subsection}{Installing and Configuring PostgreSQL -- -Phase II} + +\label{PostgreSQL_configure} +\section{Configuring PostgreSQL} +\index[general]{PostgreSQL!Configuring PostgreSQL -- } At this point, you should have built and installed PostgreSQL, or already have a running PostgreSQL, and you should have configured, built and installed {\bf @@ -84,21 +121,26 @@ user). \item ./create\_bacula\_database This script creates the PostgreSQL {\bf bacula} database. - If it fails, it is probably because the database is owned by a - user other than yourself. On many systems, the database owner is - {\bf pgsql} and on others such as RedHat and Fedora it is {\bf postgres}. - You can find out which it is by examining your /etc/passwd file. - To create a new user under either your name or with say the name + Before running this command, you should carefully think about + what encoding sequence you want for the text fields (paths, files, ...). + Ideally, the encoding should be set to UTF8. However, many Unix systems + have filenames that are not encoded in UTF8, either because you have + not set UTF8 as your default character set or because you have imported + files from elsewhere (e.g. MacOS X). For this reason, Bacula uses + SQL\_ASCII as the default encoding. If you want to change this, + please modify the script before running it. + + If running the script fails, it is probably because the database is + owned by a user other than yourself. On many systems, the database + owner is {\bf pgsql} and on others such as Red Hat and Fedora it is {\bf + postgres}. You can find out which it is by examining your /etc/passwd + file. To create a new user under either your name or with say the name {\bf bacula}, you can do the following: \begin{verbatim} su (enter root password) - password pgsql (or postgres) - (enter a password for this account) - exit su pgsql (or postgres) - (enter password just created) createuser kern (or perhaps bacula) Shall the new user be allowed to create databases? (y/n) y Shall the new user be allowed to create more new users? (y/n) (choose @@ -136,14 +178,14 @@ PostgreSQL-directory/bin/psql --command \\dp bacula \normalsize Also, I had an authorization problem with the password. In the end, -I had to modify my {\bf pg_hba.conf} file (in /var/lib/pgsql on my machine) +I had to modify my {\bf pg\_hba.conf} file (in /var/lib/pgsql/data on my machine) from: \footnotesize \begin{verbatim} - local all all ident + local all all ident sameuser to - local all all trust + local all all trust sameuser \end{verbatim} \normalsize @@ -152,7 +194,7 @@ to do from a security standpoint. However, it allowed me to run my regression scripts without having a password. A more secure way to perform database authentication is with md5 -password hashes. Begin by editing the {\bf pg_hba.conf} file, and +password hashes. Begin by editing the {\bf pg\_hba.conf} file, and just prior the the existing ``local'' and ``host'' lines, add the line: \footnotesize @@ -162,8 +204,8 @@ just prior the the existing ``local'' and ``host'' lines, add the line: \normalsize and restart the Postgres database server (frequently, this can be done -using "/etc/init.d/postgresql restart") to put this new authentication -rule into effect. +using "/etc/init.d/postgresql restart" or "service postgresql restart") to +put this new authentication rule into effect. Next, become the Postgres administrator, postgres, either by logging on as the postgres user, or by using su to become root and then using @@ -179,7 +221,7 @@ database for the bacula user using: \end{verbatim} \normalsize -Next, you'll have to add this password to two locations in the +You'll have to add this password to two locations in the bacula-dir.conf file: once to the Catalog resource and once to the RunBeforeJob entry in the BackupCatalog Job resource. With the password in place, these two lines should look something like: @@ -199,7 +241,7 @@ password is readable only by the root. Even with the files containing the database password properly restricted, there is still a security problem with this approach: on some platforms, the environment variable that is used to supply the -password to Postgres is unavoidable made available to all users of the +password to Postgres is available to all users of the local system. To eliminate this problem, the Postgres team have deprecated the use of the environment variable password-passing mechanism and recommend the use of a .pgpass file instead. To use @@ -219,10 +261,9 @@ programs. The files must then have the owner and group set to match the user (so root:root for the copy in ~root, and so on), and the mode set to 600, limiting access to the owner of the file. -\subsection*{Re-initializing the Catalog Database} +\section{Re-initializing the Catalog Database} \index[general]{Database!Re-initializing the Catalog } \index[general]{Re-initializing the Catalog Database } -\addcontentsline{toc}{subsection}{Re-initializing the Catalog Database} After you have done some initial testing with {\bf Bacula}, you will probably want to re-initialize the catalog database and throw away all the test Jobs @@ -252,29 +293,31 @@ end of file mark on the volume so that Bacula can reuse it. Do so with: Where you should replace {\bf /dev/nst0} with the appropriate tape drive device name for your machine. -\subsection*{Installing PostgreSQL from RPMs} +\section{Installing PostgreSQL from RPMs} \index[general]{PostgreSQL!Installing from RPMs} \index[general]{Installing PostgreSQL from RPMs} -\addcontentsline{toc}{subsection}{Installing PostgreSQL from RPMs} If you are installing PostgreSQL from RPMs, you will need to install both the PostgreSQL binaries and the client libraries. The client -libraries are ususally found in a devel package, so you must +libraries are usually found in a devel package, so you must install: \footnotesize \begin{verbatim} postgresql postgresql-devel + postgresql-server + postgresql-libs \end{verbatim} \normalsize -This will be the same with most other package managers too. +These will be similar with most other package managers too. After +installing from rpms, you will still need to run the scripts that set up +the database and create the tables as described above. -\subsection*{Converting from MySQL to PostgreSQL} +\section{Converting from MySQL to PostgreSQL} \index[general]{PostgreSQL!Converting from MySQL to } \index[general]{Converting from MySQL to PostgreSQL } -\addcontentsline{toc}{subsection}{Converting from MySQL to PostgreSQL} The conversion procedure presented here was worked out by Norm Dressler \lt{}ndressler at dinmar dot com\gt{} @@ -297,7 +340,7 @@ before proceeding with this process! \footnotesize \begin{verbatim} - mysqldump -f -t -n >bacula-backup.dmp> + mysqldump -f -t -n >bacula-backup.dmp \end{verbatim} \normalsize @@ -364,7 +407,7 @@ psql -Ubacula bacula \end{verbatim} \normalsize -\item Reseqence your tables with the following commands: +\item Resequence your tables with the following commands: \footnotesize \begin{verbatim} @@ -397,10 +440,10 @@ SELECT SETVAL('pool_poolid_seq', (SELECT MAX(poolid) FROM pool)); a test backup to make sure everything is working properly. \end{enumerate} -\subsection*{Upgrading PostgreSQL} +\section{Upgrading PostgreSQL} \index[general]{Upgrading PostgreSQL } \index[general]{Upgrading!PostgreSQL } -\addcontentsline{toc}{subsection}{Upgrading PostgreSQL} +\index[general]{Upgrading} If you upgrade PostgreSQL, you must reconfigure, rebuild, and re-install Bacula otherwise you are likely to get bizarre failures. If you to modify the bacula.spec file to account for the new PostgreSQL version. @@ -408,8 +451,7 @@ You can do so by rebuilding from the source rpm. To do so, you may need install from rpms and you upgrade PostgreSQL, you must also rebuild Bacula. -\subsection*{Credits} +\section{Credits} \index[general]{Credits } -\addcontentsline{toc}{subsection}{Credits} Many thanks to Dan Langille for writing the PostgreSQL driver. This will surely become the most popular database that Bacula supports. diff --git a/docs/manual-de/restore.tex b/docs/manual-de/restore.tex index 4443d4c0..1f3a7e2b 100644 --- a/docs/manual-de/restore.tex +++ b/docs/manual-de/restore.tex @@ -1,26 +1,31 @@ %% %% +\chapter{The Restore Command} +\label{RestoreChapter} +\index[general]{Command!Console Restore} +\index[general]{Console Restore Command} -\section*{The Bacula Console Restore Command} -\label{_ChapterStart13} -\index[general]{Command!Bacula Console Restore } -\index[general]{Bacula Console Restore Command } -\addcontentsline{toc}{section}{Bacula Console Restore Command} - -\subsection*{General} +\section{General} \index[general]{General } -\addcontentsline{toc}{subsection}{General} Below, we will discuss restoring files with the Console {\bf restore} command, -which is the recommended way of doing it. However, there is a standalone -program named {\bf bextract}, which also permits restoring files. For more -information on this program, please see the -\ilink{Bacula Utility Programs}{bextract} chapter of this manual. -You will also want to look at the {\bf bls} program in the same chapter, which -allows you to list the contents of your Volumes. Finally, if you have an old -Volume that is no longer in the catalog, you can restore the catalog entries -using the program named {\bf bscan}, documented in the same -\ilink{Bacula Utility Programs}{bextract} chapter. +which is the recommended way of doing restoring files. It is not possible +to restore files by automatically starting a job as you do with Backup, +Verify, ... jobs. However, in addition to the console restore command, +there is a standalone program named {\bf bextract}, which also permits +restoring files. For more information on this program, please see the +\ilink{Bacula Utility Programs}{bextract} chapter of this manual. We +don't particularly recommend the {\bf bextract} program because it +lacks many of the features of the normal Bacula restore, such as the +ability to restore Win32 files to Unix systems, and the ability to +restore access control lists (ACL). As a consequence, we recommend, +wherever possible to use Bacula itself for restores as described below. + +You may also want to look at the {\bf bls} program in the same chapter, +which allows you to list the contents of your Volumes. Finally, if you +have an old Volume that is no longer in the catalog, you can restore the +catalog entries using the program named {\bf bscan}, documented in the same +\ilink{Bacula Utility Programs}{bscan} chapter. In general, to restore a file or a set of files, you must run a {\bf restore} job. That is a job with {\bf Type = Restore}. As a consequence, you will need @@ -45,10 +50,9 @@ restore command prompts you to run the job by selecting the {\bf mod} option. \label{Example1} -\subsection*{The Restore Command} -\index[general]{Command!Restore } -\index[general]{Restore Command } -\addcontentsline{toc}{subsection}{Restore Command} +\section{The Restore Command} +\index[general]{Command!Restore} +\index[general]{Restore Command} Since Bacula maintains a catalog of your files and on which Volumes (disk or tape), they are stored, it can do most of the bookkeeping work, allowing you @@ -63,8 +67,9 @@ interactively walk up and down the file tree selecting individual files to be restored. This mode is somewhat similar to the standard Unix {\bf restore} program's interactive file selection mode. -If your Files have been pruned, the {\bf restore} command will be unable -to find any files to restore. See below for more details on this. +If a Job's file records have been pruned from the catalog, the {\bf +restore} command will be unable to find any files to restore. See below +for more details on this. Within the Console program, after entering the {\bf restore} command, you are presented with the following selection prompt: @@ -92,6 +97,10 @@ Select item: (1-12): \end{verbatim} \normalsize +There are a lot of options, and as a point of reference, most people will +want to slect item 5 (the most recent backup for a client). The details +of the above options are: + \begin{itemize} \item Item 1 will list the last 20 jobs run. If you find the Job you want, you can then select item 3 and enter its JobId(s). @@ -101,20 +110,27 @@ Select item: (1-12): \item Item 3 allows you the enter a list of comma separated JobIds whose files will be put into the directory tree. You may then select which - files from those JobIds to restore. - -\item Item 4 allows you to enter any arbitrary SQL command. This is probably - the most primitive way of finding the desired JobIds, but at the same time, - the most flexible. Once you have found the JobId(s), you can select item 3 - and enter them. - -\item Item 5 will automatically select the most recent Full backup and all + files from those JobIds to restore. Normally, you would use this option + if you have a particular version of a file that you want to restore and + you know its JobId. The most common options (5 and 6) will not select + a job that did not terminate normally, so if you know a file is + backed up by a Job that failed (possibly because of a system crash), you + can access it through this option by specifying the JobId. + +\item Item 4 allows you to enter any arbitrary SQL command. This is + probably the most primitive way of finding the desired JobIds, but at + the same time, the most flexible. Once you have found the JobId(s), you + can select item 3 and enter them. + +\item Item 5 will automatically select the most recent Full backup and all subsequent incremental and differential backups for a specified Client. These are the Jobs and Files which, if reloaded, will restore your system to the most current saved state. It automatically enters the - JobIds found into the directory tree. This is probably the most - convenient of all the above options to use if you wish to restore a - selected Client to its most recent state. + JobIds found into the directory tree in an optimal way such that only + the most recent copy of any particular file found in the set of Jobs + will be restored. This is probably the most convenient of all the above + options to use if you wish to restore a selected Client to its most + recent state. There are two important things to note. First, this automatic selection will never select a job that failed (terminated with an error status). @@ -134,18 +150,24 @@ Select item: (1-12): will then propose doing a full restore (non-selective) of those JobIds. This is possible because Bacula still knows where the beginning of the Job data is on the Volumes, even if it does not know where particular - files are located. + files are located or what their names are. \item Item 6 allows you to specify a date and time, after which Bacula will automatically select the most recent Full backup and all subsequent incremental and differential backups that started before the specified date - and time. + and time. \item Item 7 allows you to specify one or more filenames (complete path required) to be restored. Each filename is entered one at a time or if you prefix a filename with the less-than symbol (\lt{}) Bacula will read that - file and assume it is a list of filenames to be restored. The filename entry - mode is terminated by entering a blank line. + file and assume it is a list of filenames to be restored. If you + prefix the filename with a question mark (?), then the filename will + be interpreted as an SQL table name, and Bacula will include the rows + of that table in the list to be restored. The table must contain the + JobId in the first column and the FileIndex in the second column. + This table feature is intended for external programs that want to build + their own list of files to be restored. + The filename entry mode is terminated by entering a blank line. \item Item 8 allows you to specify a date and time before entering the filenames. See Item 7 above for more details. @@ -175,7 +197,8 @@ Select item: (1-12): \end{itemize} As an example, suppose that we select item 5 (restore to most recent state). -It will then ask for the desired Client, which on my system, will print all +If you have not specified a client=xxx on the command line, it +it will then ask for the desired Client, which on my system, will print all the Clients found in the database as follows: \footnotesize @@ -191,28 +214,27 @@ Defined clients: 8: RufusVerify 9: Watchdog Select Client (File daemon) resource (1-9): - \end{verbatim} \normalsize -You will probably have far fewer Clients than this example, and if you have -only one Client, it will be automatically selected. In this case, I enter +You will probably have far fewer Clients than this example, and if you have +only one Client, it will be automatically selected. In this case, I enter {\bf Rufus} to select the Client. Then Bacula needs to know what FileSet is -to be restored, so it prompts with: +to be restored, so it prompts with: \footnotesize \begin{verbatim} The defined FileSet resources are: 1: Full Set - 2: Kerns Files + 2: Other Files Select FileSet resource (1-2): - \end{verbatim} \normalsize -I choose item 1, which is my full backup. Normally, you will only have a -single FileSet for each Job, and if your machines are similar (all Linux) you -may only have one FileSet for all your Clients. +If you have only one FileSet defined for the Client, it will be selected +automatically. I choose item 1, which is my full backup. Normally, you +will only have a single FileSet for each Job, and if your machines are +similar (all Linux) you may only have one FileSet for all your Clients. At this point, {\bf Bacula} has all the information it needs to find the most recent set of backups. It will then query the database, which may take a bit @@ -266,7 +288,8 @@ prompts with the dollar sign (\$) to indicate that you may enter commands to move around the directory tree and to select files. If you want all the files to automatically be marked when the directory -tree is built, enter the command {\bf restore all}. +tree is built, you could have entered the command {\bf restore all}, or +at the \$ prompt, you can simply enter {\bf mark *}. Instead of choosing item 5 on the first menu (Select the most recent backup for a client), if we had chosen item 3 (Enter list of JobIds to select) and we @@ -341,20 +364,25 @@ prints: \footnotesize \begin{verbatim} Bootstrap records written to /home/kern/bacula/working/restore.bsr -The restore job will require the following Volumes: - - DLT-19Jul02 - DLT-04Aug02 +The job will require the following + Volume(s) Storage(s) SD Device(s) +=========================================================================== + + DLT-19Jul02 Tape DLT8000 + DLT-04Aug02 Tape DLT8000 + 128401 files selected to restore. Run Restore job JobName: kernsrestore Bootstrap: /home/kern/bacula/working/restore.bsr Where: /tmp/bacula-restores Replace: always -FileSet: Kerns Files +FileSet: Other Files Client: Rufus -Storage: SDT-10000 -JobId: *None* +Storage: Tape +When: 2006-12-11 18:20:33 +Catalog: MyCatalog +Priority: 10 OK to run? (yes/mod/no): \end{verbatim} @@ -399,10 +427,9 @@ daemon will first request Volume {\bf DLT-19Jul02} and after the appropriate files have been restored from that volume, it will request Volume {\bf DLT-04Aug02}. -\subsection*{Selecting Files by Filename} +\section{Selecting Files by Filename} \index[general]{Selecting Files by Filename } \index[general]{Filename!Selecting Files by } -\addcontentsline{toc}{subsection}{Selecting Files by Filename} If you have a small number of files to restore, and you know the filenames, you can either put the list of filenames in a file to be read by Bacula, or @@ -492,7 +519,7 @@ JobName: kernsrestore Bootstrap: /home/kern/bacula/working/restore.bsr Where: /tmp/bacula-restores Replace: always -FileSet: Kerns Files +FileSet: Other Files Client: Rufus Storage: DDS-4 When: 2003-09-11 10:20:53 @@ -516,10 +543,9 @@ either a Job number or a Bootstrap file. Simply entering zero will allow you to continue and to select another option to be modified. \label{CommandArguments} -\subsection*{Command Line Arguments} +\section{Command Line Arguments} \index[general]{Arguments!Command Line } \index[general]{Command Line Arguments } -\addcontentsline{toc}{subsection}{Command Line Arguments} If all the above sounds complicated, you will probably agree that it really isn't after trying it a few times. It is possible to do everything that was @@ -551,29 +577,135 @@ The full list of possible command line arguments are: \item {\bf before=YYYY-MM-DD HH:MM:SS} -- specify a date and time to which the system should be restored. Only Jobs started before the specified date/time will be selected, and as is the case for {\bf current} Bacula will -automatically find the most recent prior Full save and all Differential and -Incremental saves run before the date you specify. Note, this command is not -too user friendly in that you must specify the date/time exactly as shown. + automatically find the most recent prior Full save and all Differential and + Incremental saves run before the date you specify. Note, this command is not + too user friendly in that you must specify the date/time exactly as shown. \item {\bf file=filename} -- specify a filename to be restored. You must specify the full path and filename. Prefixing the entry with a less-than -sign + sign (\lt{}) will cause Bacula to assume that the filename is on your system and -contains a list of files to be restored. Bacula will thus read the list from -that file. Multiple file=xxx specifications may be specified on the command -line. + contains a list of files to be restored. Bacula will thus read the list from + that file. Multiple file=xxx specifications may be specified on the command + line. \item {\bf jobid=nnn} -- specify a JobId to be restored. \item {\bf pool=pool-name} -- specify a Pool name to be used for selection of Volumes when specifying options 5 and 6 (restore current system, and restore current system before given date). This permits you to have several Pools, -possibly one offsite, and to select the Pool to be used for restoring. + possibly one offsite, and to select the Pool to be used for restoring. +\item {\bf where=/tmp/bacula-restore} -- restore files in {\bf where} directory. \item {\bf yes} -- automatically run the restore without prompting for modifications (most useful in batch scripts). - \end{itemize} +\item {\bf strip\_prefix=/prod} -- remove a part of the filename when restoring. +\item {\bf add\_prefix=/test} -- add a prefix to all files when restoring (like + where) (can't be used with {\bf where=}). +\item {\bf add\_suffix=.old} -- add a suffix to all your files. +\item {\bf regexwhere=!a.pdf!a.bkp.pdf!} -- do complex filename manipulation + like with sed unix command. Will overwrite other filename manipulation. +\end{itemize} + +\label{restorefilerelocation} +\section{Using File Relocation} +\index[general]{Using File Relocation} +\label{filerelocation} + +\subsection{Introduction} + +The \textbf{where=} option is simple, but not very powerful. With file +relocation, Bacula can restore a file to the same directory, but with a +different name, or in an other directory without recreating the full path. + +You can also do filename and path manipulations, implemented in Bacula +2.1.8 or later, such as adding a suffix to all your files, renaming files +or directories, etc. Theses options will overwrite {\bf where=} option. + + +For example, many users use OS snapshot features so that file +\texttt{/home/eric/mbox} will be backed up from the directory +\texttt{/.snap/home/eric/mbox}, which can complicate restores. If you use +\textbf{where=/tmp}, the file will be restored to +\texttt{/tmp/.snap/home/eric/mbox} and you will have to move the file to +\texttt{/home/eric/mbox.bkp} by hand. In this case, you could use +\textbf{strip\_prefix=/.snap} and \textbf{add\_suffix=.bkp} options and +Bacula will restore the file to its original location -- that is +\texttt{/home/eric/mbox}. + +To use this feature, there are command line options as described in +the \ilink{restore section}{restorefilerelocation} of this manual; +you can modify your restore job before running it; or you can +add options to your restore job in as described in +\ilink{bacula-dir.conf}{confaddprefix}. + +\begin{verbatim} +Parameters to modify: + 1: Level + 2: Storage +.. + 10: File Relocation +.. +Select parameter to modify (1-12): + + +This will replace your current Where value + 1: Strip prefix + 2: Add prefix + 3: Add file suffix + 4: Enter a regexp + 5: Test filename manipulation + 6: Use this ? +Select parameter to modify (1-6): +\end{verbatim} + + +\subsection{RegexWhere format} + +The format is very close to that used by sed or Perl (\texttt{s/replace this/by + that/}) operator. A valid regexwhere expression has three fields : +\begin{itemize} +\item a search expression (with optionnal submatch) +\item a replacement expression (with optionnal back references \$1 to \$9) +\item a set of search options (only case-insensitive ``i'' at this time) +\end{itemize} + +Each field is delimited by a separator specified by the user as the first +character of the expression. The separator can be one of the following: +\begin{verbatim} + = / ! ; % : , ~ # = & +\end{verbatim} + +You can use several expressions separated by a commas. -\subsection*{Restoring Directory Attributes} +\subsection*{Examples} + +\begin{tabular}{|c|c|c|l} +\hline +Orignal filename & Computed filename & RegexWhere & Comments \\ +\hline +\hline +\texttt{c:/system.ini} & \texttt{c:/system.old.ini} & \texttt{/.ini\$/.old.ini/} & use \$ as end of filename\\ +\hline +\texttt{/prod/u01/pdata/} & \texttt{/rect/u01/rdata} & \texttt{/prod/rect/,/pdata/rdata/} & using two regexp\\ +\hline +\texttt{/prod/u01/pdata/} & \texttt{/rect/u01/rdata} & \texttt{!/prod/!/rect/!,/pdata/rdata/} & using \texttt{!} instead of \texttt{/}\\ +\hline +\texttt{C:/WINNT} & \texttt{d:/WINNT} & \texttt{/c:/d:/i} & using case-insensitive pattern matching \\ +\hline + +\end{tabular} + +%\subsubsection{Using group} +% +%Like with Perl or Sed, you can make submatch with \texttt{()}, +% +%\subsubsection*{Examples} + + +%\subsubsection{Options} +% +% i Do case-insensitive pattern matching. + +\section{Restoring Directory Attributes} \index[general]{Attributes!Restoring Directory } \index[general]{Restoring Directory Attributes } -\addcontentsline{toc}{subsection}{Restoring Directory Attributes} Depending how you do the restore, you may or may not get the directory entries back to their original state. Here are a few of the problems you can @@ -582,33 +714,51 @@ encounter, and for same machine restores, how to avoid them. \begin{itemize} \item You backed up on one machine and are restoring to another that is either a different OS or doesn't have the same users/groups defined. Bacula - does the best it can in these situations. -\item You are restoring into a directory that is already created and has file - creation restrictions. Bacula tries to reset everything but without walking - up the full chain of directories and modifying them all during the restore, - which Bacula does and will not do, getting permissions back correctly in -this - situation depends to a large extent on your OS. -\item You selected one or more files in a directory, but did not select the - directory entry to be restored. In that case, if the directory is not on -disk - Bacula simply creates the directory with some default attributes which may - not be the same as the original. If you do not select a directory and all -its - contents to be restored, you can still select items within the directory to - be restored by individually marking those files, but in that case, you -should - individually use the "markdir" command to select all higher level - directory entries (one at a time) to be restored if you want the directory - entries properly restored. + does the best it can in these situations. Note, Bacula has saved the + user/groups in numeric form, which means on a different machine, they + may map to different user/group names. + +\item You are restoring into a directory that is already created and has + file creation restrictions. Bacula tries to reset everything but + without walking up the full chain of directories and modifying them all + during the restore, which Bacula does and will not do, getting + permissions back correctly in this situation depends to a large extent + on your OS. + +\item You are doing a recursive restore of a directory tree. In this case + Bacula will restore a file before restoring the file's parent directory + entry. In the process of restoring the file Bacula will create the + parent directory with open permissions and ownership of the file being + restored. Then when Bacula tries to restore the parent directory Bacula + sees that it already exists (Similar to the previous situation). If you + had set the Restore job's "Replace" property to "never" then Bacula will + not change the directory's permissions and ownerships to match what it + backed up, you should also notice that the actual number of files + restored is less then the expected number. If you had set the Restore + job's "Replace" property to "always" then Bacula will change the + Directory's ownership and permissions to match what it backed up, also + the actual number of files restored should be equal to the expected + number. + +\item You selected one or more files in a directory, but did not select the + directory entry to be restored. In that case, if the directory is not + on disk Bacula simply creates the directory with some default attributes + which may not be the same as the original. If you do not select a + directory and all its contents to be restored, you can still select + items within the directory to be restored by individually marking those + files, but in that case, you should individually use the "markdir" + command to select all higher level directory entries (one at a time) to + be restored if you want the directory entries properly restored. + +\item The {\bf bextract} program does not restore access control lists + (ACLs), nor will it restore non-portable Win32 data (default) to Unix + machines. \end{itemize} \label{Windows} - -\subsection*{Restoring on Windows} +\section{Restoring on Windows} \index[general]{Restoring on Windows } \index[general]{Windows!Restoring on } -\addcontentsline{toc}{subsection}{Restoring on Windows} If you are restoring on WinNT/2K/XP systems, Bacula will restore the files with the original ownerships and permissions as would be expected. This is @@ -620,11 +770,10 @@ File daemon runs under the SYSTEM account, the directory will be created with SYSTEM ownership and permissions. In this case, you may have problems accessing the newly restored files. -To avoid this problem, you should create any alternate directory before doing -the -restore. Bacula will not change the ownership and permissions of the directory -if it is already created as long as it is not one of the directories being -restored (i.e. written to tape). +To avoid this problem, you should create any alternate directory before +doing the restore. Bacula will not change the ownership and permissions of +the directory if it is already created as long as it is not one of the +directories being restored (i.e. written to tape). The default restore location is {\bf /tmp/bacula-restores/} and if you are restoring from drive {\bf E:}, the default will be @@ -638,10 +787,9 @@ Bacula (bacula-fd.exe) runs, from SYSTEM to a Domain Admin userid, resolves the problem. -\subsection*{Restoring Files Can Be Slow} +\section{Restoring Files Can Be Slow} \index[general]{Slow!Restoring Files Can Be } \index[general]{Restoring Files Can Be Slow } -\addcontentsline{toc}{subsection}{Restoring Files Can Be Slow} Restoring files is generally {\bf much} slower than backing them up for several reasons. The first is that during a backup the tape is normally already @@ -663,10 +811,9 @@ the file as Bacula is restoring it. For all the above reasons the restore process is generally much slower than backing up (sometimes it takes three times as long). -\subsection*{Problems Restoring Files} +\section{Problems Restoring Files} \index[general]{Files!Problems Restoring } \index[general]{Problems Restoring Files } -\addcontentsline{toc}{subsection}{Problems Restoring Files} The most frequent problems users have restoring files are error messages such as: @@ -703,28 +850,67 @@ what it is now after each individual test: \begin{enumerate} \item Set "Block Positioning = no" in your Device resource and try the restore. This is a new directive and untested. + \item Set "Minimum Block Size = 512" and "Maximum Block Size = 512" and - try the restore. Again send me the full job report output. If you are able - to - determine the block size your drive was previously using, you should try - that size if 512 does not work. + try the restore. If you are able to determine the block size your drive + was previously using, you should try that size if 512 does not work. + This is a really horrible solution, and it is not at all recommended + to continue backing up your data without correcting this condition. + Please see the Tape Testing chapter for more on this. + \item Try editing the restore.bsr file at the Run xxx yes/mod/no prompt - before starting the restore job and remove all the VolBlock statements. - These - are what causes Bacula to reposition the tape, and where problems occur if - you have a fixed block size set for your drive. The VolFile commands also - cause repositioning, but this will work regardless of the block size. + before starting the restore job and remove all the VolBlock statements. + These are what causes Bacula to reposition the tape, and where problems + occur if you have a fixed block size set for your drive. The VolFile + commands also cause repositioning, but this will work regardless of the + block size. + \item Use bextract to extract the files you want -- it reads the Volume - sequentially if you use the include list feature, or if you use a .bsr file, - but remove all the VolBlock statements after the .bsr file is created (at - the - Run yes/mod/no) prompt but before you start the restore. + sequentially if you use the include list feature, or if you use a .bsr + file, but remove all the VolBlock statements after the .bsr file is + created (at the Run yes/mod/no) prompt but before you start the restore. \end{enumerate} -\subsection*{Example Restore Job Resource} +\section{Restore Errors} +\index[general]{Errors!Restore} +\index[general]{Restore Errors} + +There are a number of reasons why there may be restore errors or +warning messages. Some of the more common ones are: + +\begin{description} + +\item [file count mismatch] + This can occur for the following reasons: + \begin{itemize} + \item You requested Bacula not to overwrite existing or newer + files. + \item A Bacula miscount of files/directories. This is an + on-going problem due to the complications of directories, + soft/hard link, and such. Simply check that all the files you + wanted were actually restored. + \end{itemize} + +\item [file size error] + When Bacula restores files, it checks that the size of the + restored file is the same as the file status data it saved + when starting the backup of the file. If the sizes do not + agree, Bacula will print an error message. This size mismatch + most often occurs because the file was being written as Bacula + backed up the file. In this case, the size that Bacula + restored will be greater than the status size. This often + happens with log files. + + If the restored size is smaller, then you should be concerned + about a possible tape error and check the Bacula output as + well as your system logs. +\end{description} + + + +\section{Example Restore Job Resource} \index[general]{Example Restore Job Resource } \index[general]{Resource!Example Restore Job } -\addcontentsline{toc}{subsection}{Example Restore Job Resource} \footnotesize \begin{verbatim} @@ -745,10 +931,9 @@ If {\bf Where} is not specified, the default location for restoring files will be their original locations. \label{Selection} -\subsection*{File Selection Commands} +\section{File Selection Commands} \index[general]{Commands!File Selection } \index[general]{File Selection Commands } -\addcontentsline{toc}{subsection}{File Selection Commands} After you have selected the Jobs to be restored and Bacula has created the in-memory directory tree, you will enter file selection mode as indicated by @@ -889,24 +1074,41 @@ job. This command is the same as the {\bf help} command. \end{description} -\subsection*{Restoring When Things Go Wrong} +\label{database_restore} +\section{Restoring When Things Go Wrong} \index[general]{Restoring When Things Go Wrong } -\addcontentsline{toc}{subsection}{Restoring When Things Go Wrong} +\index[general]{Restoring Your Database} +\index[general]{Database!Restoring} This and the following sections will try to present a few of the kinds of -problems that can come up making restoring more difficult. I'll try to +problems that can come up making restoring more difficult. We will try to provide a few ideas how to get out of these problem situations. +In addition to what is presented here, there is more specific information +on restoring a \ilink{Client}{restore_client} and your +\ilink{Server}{restore_server} in the \ilink{Disaster Recovery Using +Bacula}{RescueChapter} chapter of this manual. \begin{description} +\item[Problem] + My database is broken. +\item[Solution] For SQLite, use the vacuum command to try to fix the database. For either MySQL or PostgreSQL, see the vendor's documentation. They have specific tools - that check and repair databases. + that check and repair databases, see the \ilink{database + repair}{DatabaseRepair} sections of this manual for links to vendor + information. Assuming the above does not resolve the problem, you will need to restore - or rebuild your catalog. + or rebuild your catalog. Note, if it is a matter of some + inconsistencies in the Bacula tables rather than a broken database, then + running \ilink{dbcheck}{dbcheck} might help, but you will need to ensure + that your database indexes are properly setup. Please see + the \ilink{Database Performance Issues}{DatabasePerformance} sections + of this manual for more details. + \item[Problem] How do I restore my catalog? -\item[Solution] +\item[Solution with a Catalog backup] If you have backed up your database nightly (as you should) and you have made a bootstrap file, you can immediately load back your database (or the ASCII SQL output). Make a copy of your current @@ -923,6 +1125,7 @@ provide a few ideas how to get out of these problem situations. restore job. If you are using the default bacula-dir.conf, this Job will be named {\bf RestoreFiles}. Most likely it will prompt you with something such as: + \footnotesize \begin{verbatim} Run Restore job @@ -939,17 +1142,28 @@ Priority: 10 OK to run? (yes/mod/no): \end{verbatim} \normalsize + A number of the items will be different in your case. What you want to do is: to use the mod option to change the Bootstrap to point to your saved bootstrap file; and to make sure all the other items such as Client, Storage, Catalog, and Where are correct. The FileSet is not used when you specify a bootstrap file. Once you have set all the correct values, run the Job and it will restore the backup of your - database. You will then need to follow the instructions for your + database, which is most likely an ASCII dump. + + You will then need to follow the instructions for your database type to recreate the database from the ASCII backup file. + See the \ilink {Catalog Maintenance}{CatMaintenanceChapter} chapter of + this manual for examples of the command needed to restore a + database from an ASCII dump (they are shown in the Compacting Your + XXX Database sections). + + Also, please note that after you restore your database from an ASCII + backup, you do NOT want to do a {\bf make\_bacula\_tables} command, or + you will probably erase your newly restored database tables. -\item[Solution] +\item[Solution with a Job listing] If you did save your database but did not make a bootstrap file, then recovering the database is more difficult. You will probably need to use bextract to extract the backup copy. First you should locate the @@ -959,9 +1173,9 @@ OK to run? (yes/mod/no): the critical items are the Volume name(s), the Volume Session Id and the Volume Session Time. If you know those, you can easily restore your Catalog. + \footnotesize \begin{verbatim} - 22-Apr 10:22 HeadMan: Start Backup JobId 7510, Job=CatalogBackup.2005-04-22_01.10.0 22-Apr 10:23 HeadMan: Bacula 1.37.14 (21Apr05): 22-Apr-2005 10:23:06 @@ -989,13 +1203,14 @@ Job=CatalogBackup.2005-04-22_01.10.0 FD termination status: OK SD termination status: OK Termination: Backup OK - \end{verbatim} \normalsize + From the above information, you can manually create a bootstrap file, and then follow the instructions given above for restoring your database. A reconstructed bootstrap file for the above backup Job would look like the following: + \footnotesize \begin{verbatim} Volume="DLT-22Apr05" @@ -1004,6 +1219,7 @@ VolSessionTime=1114075126 FileIndex=1-1 \end{verbatim} \normalsize + Where we have inserted the Volume name, Volume Session Id, and Volume Session Time that correspond to the values in the job report. We've also used a FileIndex of one, which will always be the case providing that @@ -1014,6 +1230,7 @@ FileIndex=1-1 specified, so the restore code must search all data in the Volume to find the requested file. A fully specified bootstrap file would have the File and Blocks specified as follows: + \footnotesize \begin{verbatim} Volume="DLT-22Apr05" @@ -1025,6 +1242,29 @@ FileIndex=1-1 \end{verbatim} \normalsize + Once you have restored the ASCII dump of the database, + you will then to follow the instructions for your + database type to recreate the database from the ASCII backup file. + See the \ilink {Catalog Maintenance}{CatMaintenanceChapter} chapter of + this manual for examples of the command needed to restore a + database from an ASCII dump (they are shown in the Compacting Your + XXX Database sections). + + Also, please note that after you restore your database from an ASCII + backup, you do NOT want to do a {\bf make\_bacula\_tables} command, or + you will probably erase your newly restored database tables. + +\item [Solution without a Job Listing] + If you do not have a job listing, then it is a bit more difficult. + Either you use the \ilink{bscan}{bscan} program to scan the contents + of your tape into a database, which can be very time consuming + depending on the size of the tape, or you can use the \ilink{bls}{bls} + program to list everything on the tape, and reconstruct a bootstrap + file from the bls listing for the file or files you want following + the instructions given above. + + There is a specific example of how to use {\bf bls} below. + \item [Problem] I try to restore the last known good full backup by specifying item 3 on the restore menu then the JobId to restore. Bacula @@ -1036,11 +1276,13 @@ FileIndex=1-1 \end{verbatim} \normalsize and restores nothing. + \item[Solution] Most likely the File records were pruned from the database either due to the File Retention period expiring or by explicitly purging the Job. By using the "llist jobid=nn" command, you can obtain all the important information about the job: + \footnotesize \begin{verbatim} llist jobid=120 @@ -1070,12 +1312,14 @@ llist jobid=120 \normalsize Then you can find the Volume(s) used by doing: + \footnotesize \begin{verbatim} sql select VolumeName from JobMedia,Media where JobId=1 and JobMedia.MediaId=Media.MediaId; \end{verbatim} \normalsize + Finally, you can create a bootstrap file as described in the previous problem above using this information. @@ -1091,7 +1335,10 @@ select VolumeName from JobMedia,Media where JobId=1 and JobMedia.MediaId=Media.M know the Volume to which it was backed up. \item [Solution] - Use {\bf bls} to indicate where it is on the tape. For example: + Either bscan the tape (see below for bscanning), or better use {\bf bls} + to find where it is on the tape, then use {\bf bextract} to + restore the database. For example, + \footnotesize \begin{verbatim} @@ -1140,24 +1387,51 @@ Volume "DLT-22Apr05" \begin{verbatim} *query Available queries: - 1: List Job totals: - 2: List up to 20 places where a File is saved regardless of the directory: - 3: List where the most recent copies of a file are saved: - 4: List last 20 Full Backups for a Client: - 5: List all backups for a Client after a specified time - 6: List all backups for a Client - 7: List Volume Attributes for a selected Volume: - 8: List Volumes used by selected JobId: - 9: List Volumes to Restore All Files: - 10: List Pool Attributes for a selected Pool: - 11: List total files/bytes by Job: - 12: List total files/bytes by Volume: - 13: List Files for a selected JobId: - 14: List Jobs stored in a selected MediaId: - 15: List Jobs stored for a given Volume name: -Choose a query (1-15): + 1: List up to 20 places where a File is saved regardless of the +directory + 2: List where the most recent copies of a file are saved + 3: List last 20 Full Backups for a Client + 4: List all backups for a Client after a specified time + 5: List all backups for a Client + 6: List Volume Attributes for a selected Volume + 7: List Volumes used by selected JobId + 8: List Volumes to Restore All Files + 9: List Pool Attributes for a selected Pool + 10: List total files/bytes by Job + 11: List total files/bytes by Volume + 12: List Files for a selected JobId + 13: List Jobs stored on a selected MediaId + 14: List Jobs stored for a given Volume name + 15: List Volumes Bacula thinks are in changer + 16: List Volumes likely to need replacement from age or errors +Choose a query (1-16): \end{verbatim} \normalsize +\item[Problem] + I didn't backup my database. What do I do now? +\item[Solution] + This is probably the worst of all cases, and you will probably have + to re-create your database from scratch and then bscan in all your + Volumes, which is a very long, painful, and inexact process. + +There are basically three steps to take: + +\begin{enumerate} +\item Ensure that your SQL server is running (MySQL or PostgreSQL) + and that the Bacula database (normally bacula) exists. See the + \ilink{Installation}{CreateDatabase} chapter of the manual. +\item Ensure that the Bacula databases are created. This is also + described at the above link. +\item Start and stop the Bacula Director using the propriate + bacula-dir.conf file so that it can create the Client and + Storage records which are not stored on the Volumes. Without these + records, scanning is unable to connect the Job records to the proper + client. +\end{enumerate} + +When the above is complete, you can begin bscanning your Volumes. Please +see the \ilink{bscan}{bscan} section of the Volume Utility Tools of this +chapter for more details. \end{description} diff --git a/docs/manual-de/rpm-faq.tex b/docs/manual-de/rpm-faq.tex index 1a68b3a5..ffa07620 100644 --- a/docs/manual-de/rpm-faq.tex +++ b/docs/manual-de/rpm-faq.tex @@ -1,13 +1,10 @@ %% %% -\section*{Bacula\raisebox{.6ex}{{\footnotesize -\textsuperscript{\textregistered}}} - RPM Packaging FAQ} -\label{_ChapterStart34} +\chapter{Bacula RPM Packaging FAQ} +\label{RpmFaqChapter} \index[general]{FAQ!Bacula\textsuperscript{\textregistered} - RPM Packaging } \index[general]{Bacula\textsuperscript{\textregistered} - RPM Packaging FAQ } -\addcontentsline{toc}{section}{Bacula\textsuperscript{\textregistered} - RPM -Packaging FAQ} \begin{enumerate} \item @@ -22,27 +19,35 @@ Packaging FAQ} packages. Do I need to be root?}{faq4} \item \ilink{I'm building my own rpms but on all platforms and compiles I get an - unresolved dependancy for something called -/usr/afsws/bin/pagsh.}{faq5} + unresolved dependency for something called + /usr/afsws/bin/pagsh.}{faq5} +\item + \ilink{I'm building my own rpms because you don't publish for my platform. + Can I get my packages released to sourceforge for other people to use?}{faq6} +\item + \ilink{Is there an easier way than sorting out all these command line options?}{faq7} +\item + \ilink{I just upgraded from 1.36.x to 1.38.x and now my director daemon won't start. It appears to start but dies silently and I get a "connection refused" error when starting the console. What is wrong?}{faq8} +\item + \ilink{There are a lot of rpm packages. Which packages do I need for what?}{faq9} \end{enumerate} -\subsection*{Answers} +\section{Answers} \index[general]{Answers } -\addcontentsline{toc}{subsection}{Answers} \begin{enumerate} \item \label{faq1} {\bf How do I build Bacula for platform xxx?} -The bacula spec file contains defines to build for several platforms: RedHat -7.x (rh7), RedHat 8.0 (rh8), RedHat 9 (rh9), Fedora Core (fc1), Whitebox -Enterprise Linux (RHEL) 3.0 (wb3), Mandrake 10.x (mdk) and SuSE 9.x (su9). -The package build is controlled by a mandatory define set at the beginning of -the file. These defines basically just control the dependency information that - gets coded into the finished rpm package. -The platform define may be edited in the spec file directly (by default all -defines are set to 0 or "not set"). For example, to build the RedHat 7.x -package find the line in the spec file which reads + The bacula spec file contains defines to build for several platforms: + Red Hat 7.x (rh7), Red Hat 8.0 (rh8), Red Hat 9 (rh9), Fedora Core (fc1, + fc3, fc4, fc5, fc6, fc7), Whitebox Enterprise Linux 3.0 (wb3), Red Hat Enterprise Linux + (rhel3, rhel4), Mandrake 10.x (mdk), Mandriva 2006.x (mdv) CentOS (centos3, centos4) + Scientific Linux (sl3, sl4) and SuSE (su9, su10, su102). The package build is controlled by a mandatory define set at the beginning of the file. These defines basically just control the dependency information that gets coded into the finished rpm package as well + as any special configure options required. The platform define may be edited + in the spec file directly (by default all defines are set to 0 or "not set"). + For example, to build the Red Hat 7.x package find the line in the spec file + which reads \footnotesize \begin{verbatim} @@ -74,13 +79,17 @@ Alternately you may pass the define on the command line when calling rpmbuild: \item \label{faq2} {\bf How do I control which database support gets built?} -Another mandatory build define controls which database support is compiled, -one of build\_sqlite, build\_mysql or build\_postgresql. To get the MySQL -package and support either set the + Another mandatory build define controls which database support is compiled, + one of build\_sqlite, build\_mysql or build\_postgresql. To get the MySQL + package and support either set the \footnotesize \begin{verbatim} %define mysql 0 + OR + %define mysql4 0 + OR + %define mysql5 0 \end{verbatim} \normalsize @@ -90,6 +99,10 @@ to \footnotesize \begin{verbatim} %define mysql 1 + OR + %define mysql4 1 + OR + %define mysql5 1 \end{verbatim} \normalsize @@ -99,6 +112,8 @@ in the spec file directly or pass it to rpmbuild on the command line: \footnotesize \begin{verbatim} rpmbuild -ba --define "build_rh7 1" --define "build_mysql 1" bacula.spec + rpmbuild -ba --define "build_rh7 1" --define "build_mysql4 1" bacula.spec + rpmbuild -ba --define "build_rh7 1" --define "build_mysql5 1" bacula.spec \end{verbatim} \normalsize @@ -106,32 +121,39 @@ in the spec file directly or pass it to rpmbuild on the command line: \item \label{faq3} {\bf What other defines are used?} -Two other building defines of note are the depkgs\_version and tomsrtbt -identifiers. These two defines are set with each release and must match the -version of those sources that are being used to build the packages. You would -not ordinarily need to edit these. + Three other building defines of note are the depkgs\_version, docs\_version and + \_rescuever identifiers. These two defines are set with each release and must + match the version of those sources that are being used to build the packages. + You would not ordinarily need to edit these. See also the Build Options section + below for other build time options that can be passed on the command line. \item \label{faq4} {\bf I'm getting errors about not having permission when I try to build the -packages. Do I need to be root?} -No, you do not need to be root and, in fact, it is better practice to build -rpm packages as a non-root user. Bacula packages are designed to be built by -a regular user but you must make a few changes on your system to do this. If -you are building on your own system then the simplest method is to add write -permissions for all to the build directory (/usr/src/redhat/). To accomplish -this, execute the following command as root: + packages. Do I need to be root?} + No, you do not need to be root and, in fact, it is better practice to + build rpm packages as a non-root user. Bacula packages are designed to + be built by a regular user but you must make a few changes on your + system to do this. If you are building on your own system then the + simplest method is to add write permissions for all to the build + directory (/usr/src/redhat/, /usr/src/RPM or /usr/src/packages). + To accomplish this, execute the following command as root: \footnotesize \begin{verbatim} chmod -R 777 /usr/src/redhat + chmod -R 777 /usr/src/RPM + chmod -R 777 /usr/src/packages \end{verbatim} \normalsize -If you are working on a shared system where you can not use the method above -then you need to recreate the /usr/src/redhat directory tree with all of its -subdirectories inside your home directory. Then create a file named {\tt -.rpmmacros} in your home directory (or edit the file if it already exists) +If you are working on a shared system where you can not use the method +above then you need to recreate the appropriate above directory tree with all +of its subdirectories inside your home directory. Then create a file named + +{\tt .rpmmacros} + +in your home directory (or edit the file if it already exists) and add the following line: \footnotesize @@ -141,23 +163,89 @@ and add the following line: \end{verbatim} \normalsize +Another handy directive for the .rpmmacros file if you wish to suppress the +creation of debug rpm packages is: + +\footnotesize +\begin{verbatim} + %debug_package %{nil} + +\end{verbatim} + +\normalsize + \item \label{faq5} - {\bf I'm building my own rpms but on all platforms and compiles I get an -unresolved dependency for something called /usr/afsws/bin/pagsh.} -This is a shell from the OpenAFS (Andrew File System). If you are seeing this -then you chose to include the docs/examples directory in your package. One of -the example scripts in this directory is a pagsh script. Rpmbuild, when -scanning for dependencies, looks at the shebang line of all packaged scripts -in addition to checking shared libraries. To avoid this do not package the -examples directory. -\end{enumerate} + {\bf I'm building my own rpms but on all platforms and compiles I get an + unresolved dependency for something called /usr/afsws/bin/pagsh.} This + is a shell from the OpenAFS (Andrew File System). If you are seeing + this then you chose to include the docs/examples directory in your + package. One of the example scripts in this directory is a pagsh + script. Rpmbuild, when scanning for dependencies, looks at the shebang + line of all packaged scripts in addition to checking shared libraries. + To avoid this do not package the examples directory. If you are seeing this + problem you are building a very old bacula package as the examples have been + removed from the doc packaging. -\item {\bf Support for RHEL4, CentOS 4 and x86_64} -The examples below -explicit build support for RHEL4 (I think) and CentOS 4. Build support -for x86_64 has also been added. Test builds have been done on CentOS but -not RHEL4. +\item + \label{faq6} + {\bf I'm building my own rpms because you don't publish for my platform. + Can I get my packages released to sourceforge for other people to use?} Yes, + contributions from users are accepted and appreciated. Please examine the + directory platforms/contrib-rpm in the source code for further information. + +\item + \label{faq7} + {\bf Is there an easier way than sorting out all these command line options?} Yes, + there is a gui wizard shell script which you can use to rebuild the src rpm package. + Look in the source archive for platforms/contrib-rpm/rpm\_wizard.sh. This script will + allow you to specify build options using GNOME dialog screens. It requires zenity. + +\item + \label{faq8} + {\bf I just upgraded from 1.36.x to 1.38.x and now my director daemon +won't start. It appears to start but dies silently and I get a "connection +refused" error when starting the console. What is wrong?} Beginning with +1.38 the rpm packages are configured to run the director and storage +daemons as a non-root user. The file daemon runs as user root and group +bacula, the storage daemon as user bacula and group disk, and the director +as user bacula and group bacula. If you are upgrading you will need to +change some file permissions for things to work. Execute the following +commands as root: + +\footnotesize +\begin{verbatim} + chown bacula.bacula /var/bacula/* + chown root.bacula /var/bacula/bacula-fd.9102.state + chown bacula.disk /var/bacula/bacula-sd.9103.state + +\end{verbatim} +\normalsize + +Further, if you are using File storage volumes rather than tapes those +files will also need to have ownership set to user bacula and group bacula. + +\item + \label{faq9} + {\bf There are a lot of rpm packages. Which packages do I need for +what?} For a bacula server you need to select the packsge based upon your +preferred catalog database: one of bacula-mysql, bacula-postgresql or +bacula-sqlite. If your system does not provide an mtx package you also +need bacula-mtx to satisfy that dependancy. For a client machine you need +only install bacula-client. Optionally, for either server or client +machines, you may install a graphical console bacula-gconsole and/or +bacula-wxconsole. The Bacula Administration Tool is installed with the +bacula-bat package. One last package, bacula-updatedb is required only when +upgrading a server more than one database revision level. + + + +\item {\bf Support for RHEL3/4, CentOS 3/4 and x86\_64} + The examples below show + explicit build support for RHEL4 and CentOS 4. Build support + for x86\_64 has also been added. Test builds have been done on CentOS but + not RHEL4. +\end{enumerate} \footnotesize \begin{verbatim} @@ -166,18 +254,17 @@ Build with one of these 3 commands: rpmbuild --rebuild \ --define "build_rhel4 1" \ --define "build_sqlite 1" \ - bacula-1.36.2-4.src.rpm + bacula-1.38.3-1.src.rpm rpmbuild --rebuild \ --define "build_rhel4 1" \ --define "build_postgresql 1" \ - bacula-1.36.2-4.src.rpm + bacula-1.38.3-1.src.rpm rpmbuild --rebuild \ --define "build_rhel4 1" \ - --define "build_mysql 1" \ --define "build_mysql4 1" \ - bacula-1.36.2-4.src.rpm + bacula-1.38.3-1.src.rpm For CentOS substitute '--define "build_centos4 1"' in place of rhel4. @@ -185,44 +272,59 @@ For 64 bit support add '--define "build_x86_64 1"' \end{verbatim} \normalsize -\subsection*{Build Options} +\section{Build Options} \index[general]{Build Options} -\addcontentsline{toc}{subsection}{Build Options} The spec file currently supports building on the following platforms: \footnotesize \begin{verbatim} -# RedHat builds +Red Hat builds --define "build_rh7 1" --define "build_rh8 1" --define "build_rh9 1" -# Fedora Core build +Fedora Core build --define "build_fc1 1" --define "build_fc3 1" --define "build_fc4 1" +--define "build_fc5 1" +--define "build_fc6 1" +--define "build_fc7 1" -# Whitebox Enterprise build +Whitebox Enterprise build --define "build_wb3 1" -# RedHat Enterprise builds +Red Hat Enterprise builds --define "build_rhel3 1" --define "build_rhel4 1" -# CentOS build +CentOS build +--define "build_centos3 1" --define "build_centos4 1" -# SuSE build +Scientific Linux build +--define "build_sl3 1" +--define "build_sl4 1" + +SuSE build --define "build_su9 1" +--define "build_su10 1" +--define "build_su102 1" -# Mandrake build +Mandrake 10.x build --define "build_mdk 1" -MySQL support: +Mandriva build +--define "build_mdv 1" +MySQL support: +for mysql 3.23.x support define this --define "build_mysql 1" -# if using mysql 4.x define this and mysql above -# currently: Mandrake 10.x, SuSE 9.x, RHEL4 +if using mysql 4.x define this, +currently: Mandrake 10.x, Mandriva 2006.0, SuSE 9.x & 10.0, FC4 & RHEL4 --define "build_mysql4 1" +if using mysql 5.x define this, +currently: SuSE 10.1 & FC5 +--define "build_mysql5 1" PostgreSQL support: --define "build_postgresql 1" @@ -230,6 +332,59 @@ PostgreSQL support: Sqlite support: --define "build_sqlite 1" +Build the client rpm only in place of one of the above database full builds: +--define "build_client_only 1" + +X86-64 support: +--define "build_x86_64 1" + +Supress build of bgnome-console: +--define "nobuild_gconsole 1" + +Build the WXWindows console: +requires wxGTK >= 2.6 +--define "build_wxconsole 1" + +Build the Bacula Administration Tool: +requires QT >= 4 +--define "build_bat 1" + +Build python scripting support: +--define "build_python 1" + +Modify the Packager tag for third party packages: +--define "contrib_packager Your Name " + \end{verbatim} \normalsize +\section{RPM Install Problems} +\index[general]{RPM Install Problems} +In general the RPMs, once properly built should install correctly. +However, when attempting to run the daemons, a number of problems +can occur: +\begin{itemize} +\item [Wrong /var/bacula Permissions] + By default, the Director and Storage daemon do not run with + root permission. If the /var/bacula is owned by root, then it + is possible that the Director and the Storage daemon will not + be able to access this directory, which is used as the Working + Directory. To fix this, the easiest thing to do is: +\begin{verbatim} + chown bacula:bacula /var/bacula +\end{verbatim} + Note: as of 1.38.8 /var/bacula is installed root:bacula with + permissions 770. +\item [The Storage daemon cannot Access the Tape drive] + This can happen in some older RPM releases where the Storage + daemon ran under userid bacula, group bacula. There are two + ways of fixing this: the best is to modify the /etc/init.d/bacula-sd + file so that it starts the Storage daemon with group "disk". + The second way to fix the problem is to change the permissions + of your tape drive (usually /dev/nst0) so that Bacula can access it. + You will probably need to change the permissions of the SCSI control + device as well, which is usually /dev/sg0. The exact names depend + on your configuration, please see the Tape Testing chapter for + more information on devices. +\end{itemize} + diff --git a/docs/manual-de/tapetesting.tex b/docs/manual-de/tapetesting.tex index 875ace8f..7281f34e 100644 --- a/docs/manual-de/tapetesting.tex +++ b/docs/manual-de/tapetesting.tex @@ -1,20 +1,15 @@ %% %% -\section*{Testing Your Tape Drive With Bacula} -\label{_ChapterStart27} +\chapter{Testing Your Tape Drive With Bacula} +\label{TapeTestingChapter} \index[general]{Testing Your Tape Drive With Bacula} -\addcontentsline{toc}{section}{Testing Your Tape Drive With Bacula} This chapter is concerned with testing and configuring your tape drive to make sure that it will work properly with Bacula using the {\bf btape} program. \label{summary} -\subsection*{Summary of Steps to Take to Get Your Tape Drive Working} -\index[general]{Working!Summary of Steps to Take to Get Your Tape Drive} -\index[general]{Summary of Steps to Take to Get Your Tape Drive Working} -\addcontentsline{toc}{subsection}{Summary of Steps to Take to Get Your Tape -Drive Working} +\section{Get Your Tape Drive Working} In general, you should follow the following steps to get your tape drive to work with Bacula. Start with a tape mounted in your drive. If you have an @@ -25,6 +20,10 @@ Do not proceed to the next item until you have succeeded with the previous one. \begin{enumerate} +\item Make sure that Bacula (the Storage daemon) is not running + or that you have {\bf unmount}ed the drive you will use + for testing. + \item Use tar to write to, then read from your drive: \footnotesize @@ -37,9 +36,19 @@ one. \end{verbatim} \normalsize -\item Make sure you have a valid and correct Device resource corresponding to - your drive. For Linux users, generally, the default one works. For FreeBSD - users, there are two possible Device configurations (see below). +\item Make sure you have a valid and correct Device resource corresponding + to your drive. For Linux users, generally, the default one works. For + FreeBSD users, there are two possible Device configurations (see below). + For other drives and/or OSes, you will need to first ensure that your + system tape modes are properly setup (see below), then possibly modify + you Device resource depending on the output from the btape program (next + item). When doing this, you should consult the \ilink{Storage Daemon + Configuration}{StoredConfChapter} of this manual. + +\item If you are using a Fibre Channel to connect your tape drive to + Bacula, please be sure to disable any caching in the NSR (network + storage router, which is a Fibre Channel to SCSI converter). + \item Run the btape {\bf test} command: \footnotesize @@ -50,25 +59,32 @@ one. \end{verbatim} \normalsize -It isn't necessary to run the autochanger part of the test at this time, but -do not go past this point until the basic test succeeds. If you do have -an autochanger, please be sure to read the -\ilink{Autochanger chapter}{_ChapterStart18} of this manual. + It isn't necessary to run the autochanger part of the test at this time, + but do not go past this point until the basic test succeeds. If you do + have an autochanger, please be sure to read the \ilink{Autochanger + chapter}{AutochangersChapter} of this manual. \item Run the btape {\bf fill} command, preferably with two volumes. This can take a long time. If you have an autochanger and it is configured, Bacula will automatically use it. If you do not have it configured, you can manually - issue the appopriate {\bf mtx} command, or press the autochanger buttons to + issue the appropriate {\bf mtx} command, or press the autochanger buttons to change the tape when requested to do so. -\item FreeBSD users, run the {\bf tapetest} program, and make sure your - system is patched if necessary. See below for more details. -\item Run Bacula, and backup a reasonably small directory, say 60 Megabytes. - Do three successive backups of this directory. -\item Stop Bacula, then restart it. Do another full backup of the same - directory. Then stop and restart Bacula. + +\item FreeBSD users, if you have a pre-5.0 system run the {\bf tapetest} + program, and make sure your system is patched if necessary. The tapetest + program can be found in the platform/freebsd directory. The instructions + for its use are at the top of the file. + +\item Run Bacula, and backup a reasonably small directory, say 60 + Megabytes. Do three successive backups of this directory. + +\item Stop Bacula, then restart it. Do another full backup of the same + directory. Then stop and restart Bacula. + \item Do a restore of the directory backed up, by entering the following restore command, being careful to restore it to an alternate location: + \footnotesize \begin{verbatim} restore select all done @@ -77,8 +93,11 @@ an autochanger, please be sure to read the \end{verbatim} \normalsize -Do a {\bf diff} on the restored directory to ensure it is identical to the -original directory. + Do a {\bf diff} on the restored directory to ensure it is identical to the + original directory. If you are going to backup multiple different systems + (Linux, Windows, Mac, Solaris, FreeBSD, ...), be sure you test the restore + on each system type. + \item If you have an autochanger, you should now go back to the btape program and run the autochanger test: @@ -90,9 +109,25 @@ original directory. \end{verbatim} \normalsize -Adjust your autochanger as necessary to ensure that it works correctly. See -the Autochanger chapter of this manual for a complete discussion of testing -your autochanger. + Adjust your autochanger as necessary to ensure that it works correctly. See + the Autochanger chapter of this manual for a complete discussion of testing + your autochanger. + +\item We strongly recommend that you use a dedicated SCSI + controller for your tape drives. Scanners are known to induce + serious problems with the SCSI bus, causing it to reset. If the + SCSI bus is reset while Bacula has the tape drive open, it will + most likely be fatal to your tape since the drive will rewind. + These kinds of problems show up in the system log. For example, + the following was most likely caused by a scanner: + +\footnotesize +\begin{verbatim} +Feb 14 17:29:55 epohost kernel: (scsi0:A:2:0): No or incomplete CDB sent to device. +Feb 14 17:29:55 epohost kernel: scsi0: Issued Channel A Bus Reset. 1 SCBs aborted +\end{verbatim} +\normalsize + \end{enumerate} If you have reached this point, you stand a good chance of having everything @@ -102,19 +137,19 @@ bacula-users} email list, but specify which of the steps you have successfully completed. In particular, you may want to look at the \ilink{ Tips for Resolving Problems}{problems1} section below. + \label{NoTapeInDrive} -\subsubsection*{Problems When no Tape in Drive} +\subsection{Problems When no Tape in Drive} \index[general]{Problems When no Tape in Drive} -\addcontentsline{toc}{subsubsection}{Problems When no Tape in Drive} When Bacula was first written the Linux 2.4 kernel permitted opening the drive whether or not there was a tape in the drive. Thus the Bacula code is based on the concept that if the drive cannot be opened, there is a serious problem, and the job is failed. With version 2.6 of the Linux kernel, if there is no tape in the drive, the -OS will wait 2 minutes (default) then return a failure, and consequently, +OS will wait two minutes (default) and then return a failure, and consequently, Bacula version 1.36 and below will fail the job. This is important to keep -in mind, because if you use and option such as {\bf Offline on Unmount = +in mind, because if you use an option such as {\bf Offline on Unmount = yes}, there will be a point when there is no tape in the drive, and if another job starts or if Bacula asks the operator to mount a tape, when Bacula attempts to open the drive (about a 20 minute delay), it will fail @@ -129,12 +164,9 @@ failures, you can also increase the {\bf Maximum Open Wait} time interval, which will give you more time to mount the next tape before the job is failed. - - -\subsubsection*{Specifying the Configuration File} +\subsection{Specifying the Configuration File} \index[general]{File!Specifying the Configuration} \index[general]{Specifying the Configuration File} -\addcontentsline{toc}{subsubsection}{Specifying the Configuration File} Starting with version 1.27, each of the tape utility programs including the {\bf btape} program requires a valid Storage daemon configuration file @@ -146,24 +178,31 @@ properly read and write your drive. By default, they use {\bf bacula-sd.conf} in the current directory, but you may specify a different configuration file using the {\bf -c} option. -\subsubsection*{Specifying a Device Name For a Tape} +\subsection{Specifying a Device Name For a Tape} \index[general]{Tape!Specifying a Device Name For a} \index[general]{Specifying a Device Name For a Tape} -\addcontentsline{toc}{subsubsection}{Specifying a Device Name For a Tape} {\bf btape} {\bf device-name} where the Volume can be found. In the case of a tape, this is the physical device name such as {\bf /dev/nst0} or {\bf /dev/rmt/0ubn} depending on your system that you specify on the Archive Device directive. For the program to work, it must find the identical name in the Device resource of the configuration file. If the name is not found in the -list of phsical names, the utility program will compare the name you entered -to the Device names (rather than the Archive device names). See below for -specifying Volume names. +list of physical names, the utility program will compare the name you entered +to the Device names (rather than the Archive device names). + +When specifying a tape device, it is preferable that the "non-rewind" +variant of the device file name be given. In addition, on systems such as +Sun, which have multiple tape access methods, you must be sure to specify +to use Berkeley I/O conventions with the device. The +{\bf b} in the Solaris (Sun) archive specification {\bf /dev/rmt/0mbn} is +what is needed in this case. Bacula does not support SysV tape drive +behavior. + +See below for specifying Volume names. -\subsubsection*{Specifying a Device Name For a File} +\subsection{Specifying a Device Name For a File} \index[general]{File!Specifying a Device Name For a} \index[general]{Specifying a Device Name For a File} -\addcontentsline{toc}{subsubsection}{Specifying a Device Name For a File} If you are attempting to read or write an archive file rather than a tape, the {\bf device-name} should be the full path to the archive location including @@ -173,10 +212,9 @@ must have the same entry in the configuration file. So, the path is equivalent to the archive device name, and the filename is equivalent to the volume name. -\subsection*{btape} +\section{btape} \label{btape1} \index[general]{Btape} -\addcontentsline{toc}{subsection}{btape} This program permits a number of elementary tape operations via a tty command interface. The {\bf test} command, described below, can be very useful for @@ -211,10 +249,9 @@ Usage: btape [options] device_name \end{verbatim} \normalsize -\subsubsection*{Using btape to Verify your Tape Drive} +\subsection{Using btape to Verify your Tape Drive} \index[general]{Using btape to Verify your Tape Drive} \index[general]{Drive!Using btape to Verify your Tape} -\addcontentsline{toc}{subsubsection}{Using btape to Verify your Tape Drive} An important reason for this program is to ensure that a Storage daemon configuration file is defined so that Bacula will correctly read and write @@ -306,25 +343,91 @@ Got EOF on tape. \normalsize then almost certainly, you are running your drive in fixed block mode rather -than variable block mode. Please see below for help on resolving that. +than variable block mode. See below for more help of resolving fix +versus variable block problems. + +It is also possible that you have your drive +set in SysV tape drive mode. The drive must use BSD tape conventions. +See the section above on setting your {\bf Archive device} correctly. For FreeBSD users, please see the notes below for doing further testing of your tape drive. -\subsubsection*{Linux SCSI Tricks} +\label{SCSITricks} +\subsection{Linux SCSI Tricks} \index[general]{Tricks!Linux SCSI} \index[general]{Linux SCSI Tricks} -\addcontentsline{toc}{subsubsection}{Linux SCSI Tricks} You can find out what SCSI devices you have by doing: +\footnotesize +\begin{verbatim} +lsscsi +\end{verbatim} +\normalsize + +Typical output is: + +\footnotesize +\begin{verbatim} +[0:0:0:0] disk ATA ST3160812AS 3.AD /dev/sda +[2:0:4:0] tape HP Ultrium 2-SCSI F6CH /dev/st0 +[2:0:5:0] tape HP Ultrium 2-SCSI F6CH /dev/st1 +[2:0:6:0] mediumx OVERLAND LXB 0107 - +[2:0:9:0] tape HP Ultrium 1-SCSI E50H /dev/st2 +[2:0:10:0] mediumx OVERLAND LXB 0107 - +\end{verbatim} +\normalsize + +There are two drives in one autochanger: /dev/st0 and /dev/st1 +and a third tape drive at /dev/st2. For using them with Bacula, one +would normally reference them as /dev/nst0 ... /dev/nst2. Not also, +there are two different autochangers identified as "mediumx OVERLAND LXB". +They can be addressed via their /dev/sgN designation, which can be +obtained by counting from the beginning as 0 to each changer. In the +above case, the two changers are located on /dev/sg3 and /dev/sg5. The one +at /dev/sg3, controls drives /dev/nst0 and /dev/nst1; and the one at +/dev/sg5 controles drive /dev/nst2. + +If you do not have the {\bf lsscsi} command, you can obtain the same +information as follows: + \footnotesize \begin{verbatim} cat /proc/scsi/scsi \end{verbatim} \normalsize -For example, I get the following: +For the above example with the three drives and two autochangers, +I get: + +\footnotesize +\begin{verbatim} +Attached devices: +Host: scsi0 Channel: 00 Id: 00 Lun: 00 + Vendor: ATA Model: ST3160812AS Rev: 3.AD + Type: Direct-Access ANSI SCSI revision: 05 +Host: scsi2 Channel: 00 Id: 04 Lun: 00 + Vendor: HP Model: Ultrium 2-SCSI Rev: F6CH + Type: Sequential-Access ANSI SCSI revision: 03 +Host: scsi2 Channel: 00 Id: 05 Lun: 00 + Vendor: HP Model: Ultrium 2-SCSI Rev: F6CH + Type: Sequential-Access ANSI SCSI revision: 03 +Host: scsi2 Channel: 00 Id: 06 Lun: 00 + Vendor: OVERLAND Model: LXB Rev: 0107 + Type: Medium Changer ANSI SCSI revision: 02 +Host: scsi2 Channel: 00 Id: 09 Lun: 00 + Vendor: HP Model: Ultrium 1-SCSI Rev: E50H + Type: Sequential-Access ANSI SCSI revision: 03 +Host: scsi2 Channel: 00 Id: 10 Lun: 00 + Vendor: OVERLAND Model: LXB Rev: 0107 + Type: Medium Changer ANSI SCSI revision: 02 +\end{verbatim} +\normalsize + + +As an additional example, I get the following (on a different machine from the +above example): \footnotesize \begin{verbatim} @@ -396,16 +499,14 @@ the control channel for those two drives is /dev/sg3. \label{problems1} -\subsection*{Tips for Resolving Problems} +\section{Tips for Resolving Problems} \index[general]{Problems!Tips for Resolving} \index[general]{Tips for Resolving Problems} -\addcontentsline{toc}{subsection}{Tips for Resolving Problems} \label{CannotRestore} -\subsubsection*{Bacula Saves But Cannot Restore Files} +\subsection{Bacula Saves But Cannot Restore Files} \index[general]{Files!Bacula Saves But Cannot Restore} \index[general]{Bacula Saves But Cannot Restore Files} -\addcontentsline{toc}{subsubsection}{Bacula Saves But Cannot Restore Files} If you are getting error messages such as: @@ -427,7 +528,7 @@ There are two possible solutions. \item The first and best is to always ensure that your drive is in variable block mode. Note, it can switch back to fixed block mode on a reboot or if another program uses the drive. So on such systems you need to modify the -Bacula startup files to explicitly set: + Bacula startup files to explicitly set: \footnotesize \begin{verbatim} @@ -435,7 +536,11 @@ mt -f /dev/nst0 defblksize 0 \end{verbatim} \normalsize -or whatever is appropriate on your system. +or whatever is appropriate on your system. Note, if you are running a Linux +system, and the above command does not work, it is most likely because you +have not loaded the appropriate {\bf mt} package, which is often called +{\bf mt\_st}, but may differ according to your distribution. + \item The second possibility, especially, if Bacula wrote while the drive was in fixed block mode, is to turn off block positioning in Bacula. This is done by adding: @@ -475,10 +580,9 @@ one of the following things: \label{opendevice} -\subsubsection*{Bacula Cannot Open the Device} +\subsection{Bacula Cannot Open the Device} \index[general]{Device!Bacula Cannot Open the} \index[general]{Bacula Cannot Open the Device} -\addcontentsline{toc}{subsubsection}{Bacula Cannot Open the Device} If you get an error message such as: @@ -501,10 +605,9 @@ driver module (or add it to the local startup script). Thanks to Alan Brown for this tip. \label{IncorrectFiles} -\subsubsection*{Incorrect File Number} +\subsection{Incorrect File Number} \index[general]{Number!Incorrect File} \index[general]{Incorrect File Number} -\addcontentsline{toc}{subsubsection}{Incorrect File Number} When Bacula moves to the end of the medium, it normally uses the {\bf ioctl(MTEOM)} function. Then Bacula uses the {\bf ioctl(MTIOCGET)} function to @@ -535,15 +638,9 @@ medium, and Bacula will keep track of the file number itself. \end{itemize} \label{IncorrectBlocks} - -\subsubsection*{Incorrect Number of Blocks or Positioning Errors during btape -Testing} -\index[general]{Testing!Incorrect Number of Blocks or Positioning Errors -during btape} -\index[general]{Incorrect Number of Blocks or Positioning Errors during btape -Testing} -\addcontentsline{toc}{subsubsection}{Incorrect Number of Blocks or Positioning -Errors during btape Testing} +\subsection{Incorrect Number of Blocks or Positioning Errors} +\index[general]{Testing!Incorrect Number of Blocks or Positioning Errors} +\index[general]{Incorrect Number of Blocks or Positioning Errors} {\bf Bacula's} preferred method of working with tape drives (sequential devices) is to run in variable block mode, and this is what is set by default. @@ -598,12 +695,9 @@ below for the details on checking and setting the default drive block size. To recover files from tapes written in fixed block mode, see below. \label{TapeModes} -\subsubsection*{Ensuring that the Tape Modes Are Properly Set -- {\bf Linux +\subsection{Ensuring that the Tape Modes Are Properly Set -- {\bf Linux Only}} \index[general]{Ensuring that the Tape Modes Are Properly Set -- Linux Only} -\index[general]{Only!Ensuring that the Tape Modes Are Properly Set -- Linux} -\addcontentsline{toc}{subsubsection}{Ensuring that the Tape Modes Are Properly -Set -- Linux Only} If you have a modern SCSI tape drive and you are having problems with the {\bf test} command as noted above, it may be that some program has set one or more @@ -628,6 +722,8 @@ behavior. On systems other than Linux, you will need to consult your {\bf mt} man pages or documentation to figure out how to do the same thing. This should not really be necessary though -- for example, on both Linux and Solaris systems, the default tape driver options are compatible with Bacula. +On Solaris systems, you must take care to specify the correct device +name on the {\bf Archive device} directive. See above for more details. You may also want to ensure that no prior program has set the default block size, as happened to one user, by explicitly turning it off with: @@ -638,6 +734,11 @@ mt -f /dev/nst0 defblksize 0 \end{verbatim} \normalsize +If you are running a Linux +system, and the above command does not work, it is most likely because you +have not loaded the appropriate {\bf mt} package, which is often called +{\bf mt\_st}, but may differ according to your distribution. + If you would like to know what options you have set before making any of the changes noted above, you can now view them on Linux systems, thanks to a tip provided by Willem Riede. Do the following: @@ -673,14 +774,9 @@ OSes permit setting variable block mode, but some OSes do not permit setting the other modes that Bacula needs to function properly. \label{compression} -\subsubsection*{Checking and Setting Tape Hardware Compression and Blocking -Size} -\index[general]{Checking and Setting Tape Hardware Compression and Blocking -Size} -\index[general]{Size!Checking and Setting Tape Hardware Compression and -Blocking} -\addcontentsline{toc}{subsubsection}{Checking and Setting Tape Hardware -Compression and Blocking Size} +\subsection{Tape Hardware Compression and Blocking Size} +\index[general]{Tape Hardware Compression and Blocking Size} +\index[general]{Size!Tape Hardware Compression and Blocking Size} As far as I can tell, there is no way with the {\bf mt} program to check if your tape hardware compression is turned on or off. You can, however, turn it @@ -730,25 +826,28 @@ is non-zero and hence set for a particular block size. Bacula is not likely to work in such a situation because it will normally attempt to write blocks of 64,512 bytes, except the last block of the job which will generally be shorter. The first thing to try is setting the default block size to zero -using the {\bf mt \ -f \ /dev/nst0 \ defblksize \ 0} command as shown above. -On FreeBSD, this would be something like: {\bf mt \ -f \ /dev/nsa0 \ blocksize -\ 0}. +using the {\bf mt -f /dev/nst0 defblksize 0} command as shown above. +On FreeBSD, this would be something like: {\bf mt -f /dev/nsa0 blocksize 0}. On some operating systems with some tape drives, the amount of data that can be written to the tape and whether or not compression is enabled is -determined by the density usually the {\bf mt \ -f \ /dev/nst0 setdensity xxx} command. -Often {\bf mt \ -f \ /dev/nst0 \ status} will print out the current +determined by the density usually the {\bf mt -f /dev/nst0 setdensity xxx} command. +Often {\bf mt -f /dev/nst0 status} will print out the current density code that is used with the drive. Most systems, but unfortunately not all, set the density to the maximum by default. On some systems, you can also get a list of all available density codes with: -{\bf mt \ -f \ /dev/nst0 \ densities} or a similar {\bf mt} command. +{\bf mt -f /dev/nst0 densities} or a similar {\bf mt} command. Note, for DLT and SDLT devices, no-compression versus compression is very often controlled by the density code. On FreeBSD systems, the compression -mode is set using {\bf mt \ -f \ /dev/nsa0 \ comp xxx} where xxx is the +mode is set using {\bf mt -f /dev/nsa0 comp xxx} where xxx is the mode you want. In general, see {\bf man mt} for the options available on your system. - +Note, some of the above {\bf mt} commands may not be persistent depending +on your system configuration. That is they may be reset if a program +other than Bacula uses the drive or, as is frequently the case, on reboot +of your system. + If your tape drive requires fixed block sizes (very unusual), you can use the following records: @@ -774,24 +873,25 @@ ignore that field as well as the {\bf Attached Changer} field. To recover files from tapes written in fixed block mode, see below. \label{FreeBSDTapes} -\subsubsection*{Tape Modes on FreeBSD} +\subsection{Tape Modes on FreeBSD} \index[general]{FreeBSD!Tape Modes on} \index[general]{Tape Modes on FreeBSD} -\addcontentsline{toc}{subsubsection}{Tape Modes on FreeBSD} On most FreeBSD systems such as 4.9 and most tape drives, Bacula should run with: \footnotesize \begin{verbatim} -mt \ -f \ /dev/nsa0 \ seteotmodel \ 2 -mt \ -f \ /dev/nsa0 \ blocksize \ 0 -mt \ -f \ /dev/nsa0 \ comp \ enable +mt -f /dev/nsa0 seteotmodel 2 +mt -f /dev/nsa0 blocksize 0 +mt -f /dev/nsa0 comp enable \end{verbatim} \normalsize You might want to put those commands in a startup script to make sure your -tape driver is properly initialized before running Bacula. +tape driver is properly initialized before running Bacula, because +depending on your system configuration, these modes may be reset if a +program other than Bacula uses the drive or when your system is rebooted. Then according to what the {\bf btape test} command returns, you will probably need to set the following (see below for an alternative): @@ -824,9 +924,9 @@ the correct values to use are: \footnotesize \begin{verbatim} -mt \ -f \ /dev/nsa0 \ seteotmodel \ 1 -mt \ -f \ /dev/nsa0 \ blocksize \ 0 -mt \ -f \ /dev/nsa0 \ comp \ enable +mt -f /dev/nsa0 seteotmodel 1 +mt -f /dev/nsa0 blocksize 0 +mt -f /dev/nsa0 comp enable \end{verbatim} \normalsize @@ -876,18 +976,32 @@ Device { Fast Forward Space File = no TWO EOF = yes } + +The following Device resource works fine with Dell PowerVault 110T and +120T devices on both FreeBSD 5.3 and on NetBSD 3.0. It also works +with Sony AIT-2 drives on FreeBSD. +\footnotesize +\begin{verbatim} +Device { + ... + # FreeBSD/NetBSD Specific Settings + Hardware End of Medium = no + BSF at EOM = yes + Backward Space Record = no + Fast Forward Space File = yes + TWO EOF = yes +} \end{verbatim} \normalsize +On FreeBSD version 6.0, it is reported that you can even set +Backward Space Record = yes. -\subsubsection*{Determining What Tape Drives and Autochangers You Have on -FreeBSD} -\index[general]{FreeBSD!Determining What Tape Drives and Autochangers You Have -} -\index[general]{Determining What Tape Drives and Autochangers You Have on -FreeBSD} -\addcontentsline{toc}{subsubsection}{Determining What Tape Drives and -Autochangers You Have on FreeBSD} + + +\subsection{Finding your Tape Drives and Autochangers on FreeBSD} +\index[general]{FreeBSD!Finding Tape Drives and Autochangers} +\index[general]{Finding Tape Drives and Autochangers on FreeBSD} On FreeBSD, you can do a {\bf camcontrol devlist} as root to determine what drives and autochangers you have. For example, @@ -915,11 +1029,9 @@ tapeinfo -f /dev/pass2 \label{onstream} -\subsubsection*{Using the OnStream driver on Linux Systems} +\subsection{Using the OnStream driver on Linux Systems} \index[general]{Using the OnStream driver on Linux Systems} \index[general]{Systems!Using the OnStream driver on Linux} -\addcontentsline{toc}{subsubsection}{Using the OnStream driver on Linux -Systems} Bacula version 1.33 (not 1.32x) is now working and ready for testing with the OnStream kernel osst driver version 0.9.14 or above. Osst is available from: @@ -967,24 +1079,22 @@ Device { \end{verbatim} \normalsize -\subsection*{Hardware Compresson on EXB-8900} +\section{Hardware Compression on EXB-8900} \index[general]{Hardware Compression on EXB-8900} \index[general]{EXB-8900!Hardware Compression} -\addcontentsline{to}{subsection}{Hardware Compression on EXB-8900} + To active, check, or disable the hardware compression feature on an EXB-8900, use the exabyte MammothTool. You can get it here: \elink{http://www.exabyte.com/support/online/downloads/index.cfm} {http://www.exabyte.com/support/online/downloads/index.cfm}. -There is a solaris version of this tool. With option -C 0 or 1 you +There is a Solaris version of this tool. With option -C 0 or 1 you can disable or activate compression. Start this tool without any options for a small reference. \label{fill} -\subsubsection*{Using btape to Simulate Filling a Tape} +\subsection{Using btape to Simulate Filling a Tape} \index[general]{Using btape to Simulate Filling a Tape} -\index[general]{Tape!Using btape to Simulate Filling a} -\addcontentsline{toc}{subsubsection}{Using btape to Simulate Filling a -Tape} +\index[general]{Tape!Using btape to Simulate Filling} Because there are often problems with certain tape drives or systems when end of tape conditions occur, {\bf btape} has a special command {\bf fill} that @@ -1010,11 +1120,8 @@ tape option does not succeed, you should correct the problem before using Bacula. \label{RecoveringFiles} -\subsection*{Recovering Files Written to Tape With Fixed Block Sizes} -\index[general]{Recovering Files Written to Tape With Fixed Block Sizes} -\index[general]{Sizes!Recovering Files Written to Tape With Fixed Block} -\addcontentsline{toc}{subsection}{Recovering Files Written to Tape With Fixed -Block Sizes} +\section{Recovering Files Written With Fixed Block Sizes} +\index[general]{Recovering Files Written With Fixed Block Sizes} If you have been previously running your tape drive in fixed block mode (default 512) and Bacula with variable blocks (default), then in version @@ -1035,10 +1142,9 @@ and Bacula will run without using block positioning, and it should recover your files. \label{BlockModes} -\subsection*{Tape Blocking Modes} +\section{Tape Blocking Modes} \index[general]{Modes!Tape Blocking} \index[general]{Tape Blocking Modes} -\addcontentsline{toc}{subsection}{Tape Blocking Modes} SCSI tapes may either be written in {\bf variable} or {\bf fixed} block sizes. Newer drives support both modes, but some drives such as the QIC devices @@ -1074,10 +1180,9 @@ assumes that each write causes a single record to be written, and that it can sequentially recover each of the blocks it has written by using the same number of sequential reads as it had written. -\subsection*{Details of Tape Modes} +\section{Details of Tape Modes} \index[general]{Modes!Details} \index[general]{Details of Tape Modes} -\addcontentsline{toc}{subsection}{Details of Tape Modes} Rudolf Cejka has provided the following information concerning certain tape modes and MTEOM. @@ -1105,17 +1210,18 @@ certain tape modes and MTEOM. skipped. File number is always tracked for MTEOM. Linux does support both SCSI SPACE Filemarks and End-of-data: When MTEOM - is called in MT_ST_FAST_MTEOM mode, SCSI SPACE Filemarks with count = - 8388607 is used. In the other case, SCSI SPACE End-of-data is used. + is called in MT\_ST\_FAST\_MTEOM mode, SCSI SPACE End-of-data is used. + In the other case, SCSI SPACE Filemarks with count = + 8388607 is used. There is no real slow mode like in Solaris - I just expect, that for older tape drives Filemarks may be slower than End-of-data, but not so much as in Solaris slow mode. File number is tracked for MTEOM just - without MT_ST_FAST_MTEOM - when MT_ST_FAST_MTEOM is used, it is not. + without MT\_ST\_FAST\_MTEOM - when MT\_ST\_FAST\_MTEOM is used, it is not. FreeBSD does support both SCSI SPACE Filemarks and End-of-data, but when MTEOD (MTEOM) is called, SCSI SPACE End-of-data is always used. FreeBSD never use SCSI SPACE Filemarks for MTEOD. File number is never tracked - for MTOED. + for MTEOD. \item[Bacula level] When {\bf Hardware End of Medium = Yes} is used, MTEOM is called, but it @@ -1134,27 +1240,20 @@ certain tape modes and MTEOM. If I use No, an action depends on Fast Forward Space File. - Considering {\bf Hardware End of Medium = no} + When I set {\bf Hardware End of Medium = no} and {\bf Fast Forward Space File = no} - When I set the two to no, file positioning was very slow - on my LTO-3: -\begin{verbatim} - HEOM = no, FFSF = no: ~ 10 - 100 minutes -\end{verbatime} + file positioning was very slow + on my LTO-3 (about ten to 100 minutes), but -while even with {\bf Hardware End of Medium = no} but -{\bf Fast Forward Space File = yes}, the time is 10 to -100 times faster. -\begin{verbatim} - HEOM = no, FFSF = yes: ~ 1 minute -\end{verbatim} + with {\bf Hardware End of Medium = no} and +{\bf Fast Forward Space File = yes}, the time is ten to +100 times faster (about one to two minutes). \end{description} -\subsection*{Autochanger Errors} +\section{Autochanger Errors} \index[general]{Errors!Autochanger} \index[general]{Autochanger Errors} -\addcontentsline{toc}{subsection}{Autochanger Errors} If you are getting errors such as: @@ -1171,3 +1270,24 @@ your Storage daemon can access the device. You need to ensure that you all access to the proper control device, and if you don't have any SCSI disk drives (including SATA drives), you might want to change the permissions on /dev/sg*. + +\section{Syslog Errors} +\index[general]{Errors!Syslog} +\index[general]{Syslog Errors} + +If you are getting errors such as: + +\footnotesize +\begin{verbatim} +: kernel: st0: MTSETDRVBUFFER only allowed for root +\end{verbatim} +\normalsize + +you are most likely running your Storage daemon as non-root, and +Bacula is attempting to set the correct OS buffering to correspond +to your Device resource. Most OSes allow only root to issue this +ioctl command. In general, the message can be ignored providing +you are sure that your OS parameters are properly configured as +described earlier in this manual. If you are running your Storage daemon +as root, you should not be getting these system log messages, and if +you are, something is probably wrong. diff --git a/docs/manual-de/tips.tex b/docs/manual-de/tips.tex index 25b0e69e..08aeb429 100644 --- a/docs/manual-de/tips.tex +++ b/docs/manual-de/tips.tex @@ -1,30 +1,29 @@ %% %% -\section*{Tips and Suggestions} -\label{_ChapterStart8} +\chapter{Tips and Suggestions} +\label{TipsChapter} \index[general]{Tips and Suggestions } \index[general]{Suggestions!Tips and } -\addcontentsline{toc}{section}{Tips and Suggestions} - -\subsection*{Examples} \label{examples} \index[general]{Examples } -\addcontentsline{toc}{subsection}{Examples} There are a number of example scripts for various things that can be found in the {\bf example} subdirectory and its subdirectories of the Bacula source distribution. -\subsection*{Upgrading Bacula Versions} +For additional tips, please see the \elink{Bacula +wiki}{\url{http://wiki.bacula.org}}. + +\section{Upgrading Bacula Versions} \label{upgrading} \index[general]{Upgrading Bacula Versions } \index[general]{Versions!Upgrading Bacula } -\addcontentsline{toc}{subsection}{Upgrading Bacula Versions} +\index[general]{Upgrading} The first thing to do before upgrading from one version to another is to -ensure that you don't overwrite or delete your production (current) version of Bacula until -you have tested that the new version works. +ensure that you don't overwrite or delete your production (current) version +of Bacula until you have tested that the new version works. If you have installed Bacula into a single directory, this is simple: simply make a copy of your Bacula directory. @@ -50,16 +49,15 @@ made to your configuration files as the installation process will not overwrite them providing that you do not do a {\bf make uninstall}. If the new version of Bacula requires an upgrade to the database, -you can upgrade it with the script {\bf update_bacula_tables}, which +you can upgrade it with the script {\bf update\_bacula\_tables}, which will be installed in your scripts directory (default {\bf /etc/bacula}), or alternatively, you can find it in the {\bf \lt{}bacula-source\gt{}/src/cats} directory. -\subsection*{Getting Notified of Job Completion} +\section{Getting Notified of Job Completion} \label{notification} \index[general]{Getting Notified of Job Completion } \index[general]{Completion!Getting Notified of Job } -\addcontentsline{toc}{subsection}{Getting Notified of Job Completion} One of the first things you should do is to ensure that you are being properly notified of the status of each Job run by Bacula, or at a minimum of each Job @@ -72,7 +70,7 @@ resource of your Director's configuration file. An email is automatically configured in the default configuration files, but you must ensure that the default {\bf root} address is replaced by your email address. -For examples of how I (Kern) configure my system, please take a look at the +For additional examples of how to configure a Bacula, please take a look at the {\bf .conf} files found in the {\bf examples} sub-directory. We recommend the following configuration (where you change the paths and email address to correspond to your setup). Note, the {\bf mailcommand} and {\bf @@ -124,11 +122,10 @@ only if the Job terminates in error. If the Job terminates normally, no email message will be sent, but the output will still be appended to the log file as well as sent to the Console program. -\subsection*{Getting Email Notification to Work} +\section{Getting Email Notification to Work} \label{email} \index[general]{Work!Getting Email Notification to } \index[general]{Getting Email Notification to Work } -\addcontentsline{toc}{subsection}{Getting Email Notification to Work} The section above describes how to get email notification of job status. Occasionally, however, users have problems receiving any email at all. In that @@ -172,11 +169,10 @@ mailcommand = "/home/bacula/bin/bsmtp -f \"root@localhost\" %r" \end{itemize} -\subsection*{Getting Notified that Bacula is Running} +\section{Getting Notified that Bacula is Running} \label{JobNotification} \index[general]{Running!Getting Notified that Bacula is } \index[general]{Getting Notified that Bacula is Running } -\addcontentsline{toc}{subsection}{Getting Notified that Bacula is Running} If like me, you have setup Bacula so that email is sent only when a Job has errors, as described in the previous section of this chapter, inevitably, one @@ -268,16 +264,15 @@ END-OF-DATA \end{verbatim} \normalsize -\subsection*{Maintaining a Valid Bootstrap File} +\section{Maintaining a Valid Bootstrap File} \label{bootstrap} \index[general]{Maintaining a Valid Bootstrap File } \index[general]{File!Maintaining a Valid Bootstrap } -\addcontentsline{toc}{subsection}{Maintaining a Valid Bootstrap File} By using a \ilink{ WriteBootstrap}{writebootstrap} record in each of your Director's Job resources, you can constantly maintain a -\ilink{bootstrap}{_ChapterStart43} file that will enable you to +\ilink{bootstrap}{BootstrapChapter} file that will enable you to recover the state of your system as of the last backup without having the Bacula catalog. This permits you to more easily recover from a disaster that destroys your Bacula catalog. @@ -302,7 +297,7 @@ each {\bf Incremental} backup, and the file is totally rewritten during each Note, one disadvantage of writing to an NFS mounted volume as I do is that if the other machine goes down, the OS will wait forever on the fopen() call that Bacula makes. As a consequence, Bacula will completely stall until -the machine exporting the NSF mounts comes back up. A possible solution to this +the machine exporting the NFS mounts comes back up. A possible solution to this problem was provided by Andrew Hilborne, and consists of using the {\bf soft} option instead of the {\bf hard} option when mounting the NFS volume, which is typically done in {\bf /etc/fstab}/. The NFS documentation explains these @@ -325,7 +320,7 @@ output has been partially truncated to fit on the page here: \footnotesize \begin{verbatim} (in the Console program) -*{\bf restore} +*restore First you select one or more JobIds that contain files to be restored. You will then be presented several methods of specifying the JobIds. Then you will be allowed to @@ -337,14 +332,14 @@ To select the JobIds, you have the following choices: 4: Enter SQL list command 5: Select the most recent backup for a client 6: Cancel -Select item: (1-6): {\bf 5} +Select item: (1-6): 5 The defined Client resources are: 1: Minimatou 2: Rufus 3: Timmy -Select Client (File daemon) resource (1-3): {\bf 2} +Select Client (File daemon) resource (1-3): 2 The defined FileSet resources are: - 1: Kerns Files + 1: Other Files Item 1 selected automatically. +-------+------+-------+---------+---------+------+-------+------------+ | JobId | Levl | Files | StrtTim | VolName | File | SesId | VolSesTime | @@ -360,28 +355,27 @@ You are now entering file selection mode where you add and remove files to be restored. All files are initially added. Enter "done" to leave this mode. cwd is: / -$ {\bf done} +$ done 84 files selected to restore. Run Restore job JobName: kernsrestore Bootstrap: /home/kern/bacula/working/restore.bsr Where: /tmp/bacula-restores -FileSet: Kerns Files +FileSet: Other Files Client: Rufus Storage: File JobId: *None* -OK to run? (yes/mod/no): {\bf no} -{\bf quit} +OK to run? (yes/mod/no): no +quit (in a shell window) -{\bf cp ../working/restore.bsr /mnt/deuter/files/backup/rufus.bsr} +cp ../working/restore.bsr /mnt/deuter/files/backup/rufus.bsr \end{verbatim} \normalsize -\subsection*{Rejected Volumes After a Crash} +\section{Rejected Volumes After a Crash} \label{RejectedVolumes} \index[general]{Crash!Rejected Volumes After a } \index[general]{Rejected Volumes After a Crash } -\addcontentsline{toc}{subsection}{Rejected Volumes After a Crash} Bacula keeps a count of the number of files on each Volume in its Catalog database so that before appending to a tape, it can verify that the number of @@ -440,7 +434,7 @@ catalog. As a consequence, you can just modify the catalog count to eleven, and even if the catalog contains references to files saved in file 11, everything will be OK and nothing will be lost. Note that if the SD had written several file marks to the volume, the difference between the Volume -cound and the Catalog count could be larger than one, but this is unusual. +count and the Catalog count could be larger than one, but this is unusual. If on the other hand the catalog is marked as having more files than Bacula found on the tape, you need to consider the possible negative consequences of @@ -452,12 +446,12 @@ Bacula to append to the tape, you do the following: \footnotesize \begin{verbatim} -{\bf update} +update Update choice: 1: Volume parameters 2: Pool from resource 3: Slots from autochanger -Choose catalog item to update (1-3): {\bf 1} +Choose catalog item to update (1-3): 1 Defined Pools: 1: Default 2: File @@ -467,7 +461,7 @@ Select the Pool (1-2): +-------+---------+--------+---------+-----------+------+----------+------+-----+ | 1 | test01 | DDS-4 | Error | 352427156 | ... | 31536000 | 1 | 0 | +-------+---------+--------+---------+-----------+------+----------+------+-----+ -Enter MediaId or Volume name: {\bf 1} +Enter MediaId or Volume name: 1 \end{verbatim} \normalsize @@ -491,11 +485,11 @@ Parameters to modify: 9: Volume Files 10: Pool 11: Done -Select parameter to modify (1-11): {\bf 9} +Select parameter to modify (1-11): 9 Warning changing Volume Files can result in loss of data on your Volume Current Volume Files is: 10 -Enter new number of Files for Volume: {\bf 11} +Enter new number of Files for Volume: 11 New Volume Files is: 11 Updating Volume "test01" Parameters to modify: @@ -510,7 +504,7 @@ Parameters to modify: 9: Volume Files 10: Pool 11: Done -Select parameter to modify (1-10): {\bf 1} +Select parameter to modify (1-10): 1 \end{verbatim} \normalsize @@ -528,7 +522,7 @@ Possible Values are: 4: Full 5: Used 6: Read-Only -Choose new Volume Status (1-6): {\bf 1} +Choose new Volume Status (1-6): 1 New Volume status is: Append Updating Volume "test01" Parameters to modify: @@ -543,7 +537,7 @@ Parameters to modify: 9: Volume Files 10: Pool 11: Done -Select parameter to modify (1-11): {\bf 11} +Select parameter to modify (1-11): 11 Selection done. \end{verbatim} \normalsize @@ -577,11 +571,10 @@ probably be better off using a new tape. In fact, you might want to see what files the catalog claims are actually stored on that Volume, and back them up to another tape and recycle this tape. -\subsection*{Security Considerations} +\section{Security Considerations} \label{security} \index[general]{Considerations!Security } \index[general]{Security Considerations } -\addcontentsline{toc}{subsection}{Security Considerations} Only the File daemon needs to run with root permission (so that it can access all files). As a consequence, you may run your Director, Storage daemon, and @@ -609,11 +602,10 @@ setup procedure leaves the database open to anyone. At a minimum, you should assign the user {\bf bacula} a userid and add it to your Director's configuration file in the appropriate Catalog resource. -\subsection*{Creating Holiday Schedules} +\section{Creating Holiday Schedules} \label{holiday} \index[general]{Schedules!Creating Holiday } \index[general]{Creating Holiday Schedules } -\addcontentsline{toc}{subsection}{Creating Holiday Schedules} If you normally change tapes every day or at least every Friday, but Thursday is a holiday, you can use a trick proposed by Lutz Kittler to ensure that no @@ -623,11 +615,10 @@ returns zero, so that the Bacula job will normally continue. You can then modify the script to return non-zero on any day when you do not want Bacula to run the job. -\subsection*{Automatic Labeling Using Your Autochanger} +\section{Automatic Labeling Using Your Autochanger} \label{autolabel} \index[general]{Automatic Labeling Using Your Autochanger } \index[general]{Autochanger!Automatic Labeling Using Your } -\addcontentsline{toc}{subsection}{Automatic Labeling Using Your Autochanger} If you have an autochanger but it does not support barcodes, using a "trick" you can make Bacula automatically label all the volumes in your autochanger's @@ -697,11 +688,10 @@ If it seems to work, when it finishes, enter: and you should see all the volumes nicely created. -\subsection*{Backing Up Portables Using DHCP} +\section{Backing Up Portables Using DHCP} \label{DNS} \index[general]{DHCP!Backing Up Portables Using } \index[general]{Backing Up Portables Using DHCP } -\addcontentsline{toc}{subsection}{Backing Up Portables Using DHCP} You may want to backup laptops or portables that are not always connected to the network. If you are using DHCP to assign an IP address to those machines @@ -709,11 +699,10 @@ when they connect, you will need to use the Dynamic Update capability of DNS to assign a name to those machines that can be used in the Address field of the Client resource in the Director's conf file. -\subsection*{Going on Vacation} +\section{Going on Vacation} \label{Vacation} \index[general]{Vacation!Going on } \index[general]{Going on Vacation } -\addcontentsline{toc}{subsection}{Going on Vacation} At some point, you may want to be absent for a week or two and you want to make sure Bacula has enough tape left so that the backups will complete. You @@ -721,7 +710,7 @@ start by doing a {\bf list volumes} in the Console program: \footnotesize \begin{verbatim} -{\bf list volumes} +list volumes Using default Catalog name=BackupDB DB=bacula Pool: Default @@ -758,12 +747,11 @@ tape would fill shortly. Consequently, I manually marked it as {\bf Used} and replaced it with a fresh tape that I labeled as DLT-28Jun03, thus assuring myself that the backups would all complete without my intervention. -\subsection*{How to Excude File on Windows Regardless of Case} +\section{Exclude Files on Windows Regardless of Case} \label{Case} -\index[general]{How to Excude File on Windows Regardless of Case } -\index[general]{Case!How to Excude File on Windows Regardless of } -\addcontentsline{toc}{subsection}{How to Excude File on Windows Regardless of -Case} +\index[general]{Exclude Files on Windows Regardless of Case} +% TODO: should this be put in the win32 chapter? +% TODO: should all these tips be placed in other chapters? This tip was submitted by Marc Brueckner who wasn't sure of the case of some of his files on Win32, which is case insensitive. The problem is that Bacula @@ -782,22 +770,23 @@ As a consequence, the above exclude works for files of any case. Please note that this works only in Bacula Exclude statement and not in Include. -\subsection*{Executing Scripts on a Remote Machine} +\section{Executing Scripts on a Remote Machine} \label{RemoteExecution} \index[general]{Machine!Executing Scripts on a Remote } \index[general]{Executing Scripts on a Remote Machine } -\addcontentsline{toc}{subsection}{Executing Scripts on a Remote Machine} This tip also comes from Marc Brueckner. (Note, this tip is probably outdated by the addition of {\bf ClientRunBeforJob} and {\bf ClientRunAfterJob} Job records, but the technique still could be useful.) First I thought the "Run Before Job" statement in the Job-resource is for executing a script on the -remote machine(the machine to be backed up). It could be usefull to execute +remote machine (the machine to be backed up). (Note, this is possible as mentioned +above by using {\bf ClientRunBeforJob} and {\bf ClientRunAfterJob}). +It could be useful to execute scripts on the remote machine e.g. for stopping databases or other services while doing the backup. (Of course I have to start the services again when the backup has finished) I found the following solution: Bacula could execute -scrips on the remote machine by using ssh. The authentication is done -automatically using a private key. First You have to generate a keypair. I've +scripts on the remote machine by using ssh. The authentication is done +automatically using a private key. First you have to generate a keypair. I've done this by: \footnotesize @@ -829,7 +818,7 @@ enter the following on the machine where Bacula runs: \footnotesize \begin{verbatim} -ssh -i Bacula_key -l root "ls -la" +ssh -i Bacula_key -l root "ls -la" \end{verbatim} \normalsize @@ -848,15 +837,14 @@ Run After Job = ssh -i /etc/bacula/Bacula_key 192.168.1.1 \ \end{verbatim} \normalsize -Even though Bacula version 1.32 has a ClientRunBeforeJob, the ssh method still +Even though Bacula version 1.32 and later has a ClientRunBeforeJob, the ssh method still could be useful for updating all the Bacula clients on several remote machines in a single script. -\subsection*{Recycling All Your Volumes} +\section{Recycling All Your Volumes} \label{recycle} \index[general]{Recycling All Your Volumes } \index[general]{Volumes!Recycling All Your } -\addcontentsline{toc}{subsection}{Recycling All Your Volumes} This tip comes from Phil Stracchino. @@ -866,22 +854,23 @@ care about the data on the tapes) is to add the tape labels using the console {\bf add} command, then go into the catalog and manually set the VolStatus of every tape to {\bf Recycle}. -The SQL command to do this is very simple: +The SQL command to do this is very simple, either use your vendor's +command line interface (mysql, postgres, sqlite, ...) or use the sql +command in the Bacula console: \footnotesize \begin{verbatim} -update Media set VolStatus = "Recycle"; +update Media set VolStatus='Recycle'; \end{verbatim} \normalsize Bacula will then ignore the data already stored on the tapes and just re-use each tape without further objection. -\subsection*{Backing up ACLs on ext3 or XFS filesystems} +\section{Backing up ACLs on ext3 or XFS filesystems} \label{ACLs} \index[general]{Filesystems!Backing up ACLs on ext3 or XFS } \index[general]{Backing up ACLs on ext3 or XFS filesystems } -\addcontentsline{toc}{subsection}{Backing up ACLs on ext3 or XFS filesystems} This tip comes from Volker Sauer. @@ -918,15 +907,14 @@ setfacl --restore/root/acl-backup \end{verbatim} \normalsize -\subsection*{Total Automation of Bacula Tape Handling} +\section{Total Automation of Bacula Tape Handling} \label{automate} \index[general]{Handling!Total Automation of Bacula Tape } \index[general]{Total Automation of Bacula Tape Handling } -\addcontentsline{toc}{subsection}{Total Automation of Bacula Tape Handling} This tip was provided by Alexander Kuehn. -\elink{Bacula}{http://www.bacula.org/} is a really nice backup program except +\elink{Bacula}{\url{http://www.bacula.org/}} is a really nice backup program except that the manual tape changing requires user interaction with the bacula console. @@ -936,10 +924,12 @@ and must change tapes manually.!!!!! Bacula supports a variety of tape changers through the use of mtx-changer scripts/programs. This highly flexible approach allowed me to create -\ilink{this shell script}{mtx-changer.txt} which does the following: +\elink{this shell script}{\url{http://www.bacula.org/rel-manual/mtx-changer.txt}} which does the following: +% TODO: We need to include this in book appendix and point to it. +% TODO: Whenever a new tape is required it sends a mail to the operator to insert the new tape. Then it waits until a tape has been inserted, sends a mail again to -say thank you and let's bacula continue it's backup. +say thank you and let's bacula continue its backup. So you can schedule and run backups without ever having to log on or see the console. To make the whole thing work you need to create a Device resource which looks @@ -976,48 +966,44 @@ VOL-0007 VOL-0008 VOL-0009 VOL-0010 VOL-0011 VOL-0012" \end{verbatim} \normalsize -The above should be all on one line, and it effectivly tells Bacula that +The above should be all on one line, and it effectively tells Bacula that volume "VOL-0001" is located in slot 1 (which is our lowest slot), that volume "VOL-0002" is located in slot 2 and so on.. The script also maintains a logfile (/var/log/mtx.log) where you can monitor its operation. -\subsection*{Running Concurrent Jobs} +\section{Running Concurrent Jobs} \label{ConcurrentJobs} \index[general]{Jobs!Running Concurrent} \index[general]{Running Concurrent Jobs} \index[general]{Concurrent Jobs} -\addcontentsline{toc}{subsection}{Running Concurrent Jobs} Bacula can run multiple concurrent jobs, but the default configuration files -are not set to do so. Using the {\bf Maximum Concurrent Jobs} directive, you -have a lot of control over how many jobs can run at the same time, and which -jobs can run simultaneously. The downside is that it can be a bit tricky to -set it up for the first time as you need to set the concurrency in at least -five different places. - -The Director, the File daemon, and the Storage daemon each have a {\bf Maximum -Concurrent Jobs} directive that determines overall number of concurrent jobs -the daemon will run. The default is one for the Director and ten for both the -File daemon and the Storage daemon, so assuming you will not be running more -than ten concurrent jobs, the only changes that are needed are in the -Director's conf file (bacula-dir.conf). - -Within the Director's configuration file, {\bf Maximum Concurrent Jobs} can be -set in the Direct, Job, Client, and Storage resources. Each one must be set -properly, according to your needs, otherwise your jobs may be run one at a -time. +do not enable it. Using the {\bf Maximum Concurrent Jobs} directive, you +can configure how many and which jobs can be run simultaneously. +The Director's default value for {\bf Maximum Concurrent Jobs} is "1". + +To initially setup concurrent jobs you need to define {\bf Maximum Concurrent Jobs} in +the Director's configuration file (bacula-dir.conf) in the +Director, Job, Client, and Storage resources. + +Additionally the File daemon, and the Storage daemon each have their own +{\bf Maximum Concurrent Jobs} directive that sets the overall maximum +number of concurrent jobs the daemon will run. The default for both the +File daemon and the Storage daemon is "20". For example, if you want two different jobs to run simultaneously backing up -the same Client to the same Storage device, they will run concurrentl only if +the same Client to the same Storage device, they will run concurrently only if you have set {\bf Maximum Concurrent Jobs} greater than one in the Director resource, the Client resource, and the Storage resource in bacula-dir.conf. -We recommend that you carefully test your multiple concurrent backup including -doing thorough restore testing before you put it into production. +We recommend that you read the \ilink{Data +Spooling}{SpoolingChapter} of this manual first, then test your multiple +concurrent backup including restore testing before you put it into +production. Below is a super stripped down bacula-dir.conf file showing you the four -places where the the file has been modified to allow the same job {\bf +places where the the file must be modified to allow the same job {\bf NightlySave} to run up to four times concurrently. The change to the Job resource is not necessary if you want different Jobs to run at the same time, which is the normal case. diff --git a/docs/manual-de/update_version b/docs/manual-de/update_version index 5c2e0092..687c0988 100755 --- a/docs/manual-de/update_version +++ b/docs/manual-de/update_version @@ -3,8 +3,8 @@ # Script file to update the Bacula version # out=/tmp/$$ -VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' /home/kern/bacula/k/src/version.h` -DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' /home/kern/bacula/k/src/version.h` +VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' /home/kern/bacula/Branch-2.2/bacula/src/version.h` +DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' /home/kern/bacula/Branch-2.2/bacula/src/version.h` . ./do_echo sed -f ${out} version.tex.in >version.tex rm -f ${out} diff --git a/docs/manual-de/version.tex b/docs/manual-de/version.tex index 8c768b7b..89963dfc 100644 --- a/docs/manual-de/version.tex +++ b/docs/manual-de/version.tex @@ -1 +1 @@ -2.2.1 (30 August 2007) +2.2.4 (14 September 2007) diff --git a/docs/manual-de/win32.tex b/docs/manual-de/win32.tex index bd7b6900..6b2abe4a 100644 --- a/docs/manual-de/win32.tex +++ b/docs/manual-de/win32.tex @@ -1,70 +1,100 @@ %% %% -\section*{The Windows Version of Bacula} -\label{_ChapterStart7} -\index[general]{Windows Version of Bacula } -\addcontentsline{toc}{section}{Windows Version of Bacula} - -\subsection*{General} -\index[general]{General } -\addcontentsline{toc}{subsection}{General} - -At the current time only the File daemon or Client program has been tested on -Windows. As a consequence, when we speak of the Windows version of Bacula -below, we are referring to the File daemon only. +\chapter{The Windows Version of Bacula} +\label{Win32Chapter} +\index[general]{Windows Version of Bacula} + +At the current time only the File daemon or Client program has +been thouroughly tested on Windows and is suitable for a +production environment. As a consequence, when we +speak of the Windows version of Bacula below, we are referring to +the File daemon (client) only. + +As of Bacula version 1.39.20 or greater, the installer is capable +of installing not just the Client program, but also the Director +and the Storage daemon and all the other programs that were +previously available only on Unix systems. These additional +programs, notably the Director and Storage daemon, have been partially +tested, are reported to have some bugs, and still need to be documented. +They are not yet supported, and we cannot currently accept or fix +bug reports on them. Consequently, please test them carefully before putting +them into a critical production environment. The Windows version of the Bacula File daemon has been tested on Win98, WinMe, -WinNT, and Win2000 systems. We have coded to support Win95, but no longer have -a system for testing. The Windows version of Bacula is a native Win32 port, -but there are very few source code changes to the Unix code, which means that the Windows -version is for the most part running code that has long proved stable on Unix -systems. When running, it is perfectly integrated with Windows and displays -its icon in the system icon tray, and provides a system tray menu to obtain -additional information on how Bacula is running (status and events dialog -boxes). If so desired, it can also be stopped by using the system tray menu, -though this should normally never be necessary. +WinNT, WinXP, Win2000, and Windows 2003 systems. We have coded to support +Win95, but no longer have a system for testing. The Windows version of +Bacula is a native Win32 port, but there are very few source code changes +to the Unix code, which means that the Windows version is for the most part +running code that has long proved stable on Unix systems. When running, it +is perfectly integrated with Windows and displays its icon in the system +icon tray, and provides a system tray menu to obtain additional information +on how Bacula is running (status and events dialog boxes). If so desired, +it can also be stopped by using the system tray menu, though this should +normally never be necessary. Once installed Bacula normally runs as a system service. This means that it is immediately started by the operating system when the system is booted, and runs in the background even if there is no user logged into the system. -\subsection*{Win32 Installation} +\section{Win32 Installation} \label{installation} -\index[general]{Installation } -\index[general]{Win32!Installation } -\addcontentsline{toc}{subsection}{Win32 Installation} +\index[general]{Installation} +\index[general]{Win32!Installation} Normally, you will install the Windows version of Bacula from the binaries. This install is standard Windows .exe that runs an install wizard using the NSIS Free Software installer, so if you have already installed Windows software, it should be very familiar to you. -If you have a previous version Cygwin of Bacula (1.32 or lower) installed, -you should stop the service, uninstall it, and remove the Bacula -installation directory possibly saving your bacula-fd.conf file for use -with the new version you will install. The new native version of Bacula -has far fewer files than the old Cygwin version, so it is better to start -with a clean directory. +If you have a previous version Bacula (1.39.20 or lower) +installed, you should stop the service, uninstall it, and remove +the Bacula installation directory possibly saving your +bacula-fd.conf, bconsole.conf, and bwx-console.conf files +for use with the new version you will install. The Uninstall +program is normally found in {\bf c:\textbackslash{}bacula\textbackslash{}Uninstall.exe}. +We also recommend that you completely remove the directory +{\bf c:\textbackslash{}bacula}, because the current installer +uses a different directory structure (see below). + +Providing you do not already have Bacula installed, +the new installer (1.39.22 and later) installs the binaries and dlls in +c:\textbackslash{}Program Files\textbackslash{}Bacula\textbackslash{}bin +and the configuration files +in c:\textbackslash{}Documents and Settings\textbackslash{}All Users\textbackslash{}Application Data\textbackslash{}Bacula +In addition, the {\bf Start\-\gt{}All Programs\-\gt{}Bacula} menu item +will be created during the installation, and on that menu, you +will find items for editing the configuration files, displaying +the document, and starting bwx-console or bconsole. + Finally, proceed with the installation. \begin{itemize} -\item You must be logged in as Administrator to do a correct installation, - if not, please do so before continuing. +\item You must be logged in as Administrator to the local machine +to do a correct installation, if not, please do so before continuing. +Some users have attempted to install logged in as a domain administrator +account and experienced permissions problems attempting to run +Bacula, so we don't recommend that option. \item Simply double click on the {\bf winbacula-1.xx.0.exe} NSIS install icon. The actual name of the icon will vary from one release version to another. \includegraphics{./win32-nsis.eps} winbacula-1.xx.0.exe -\ + \item Once launched, the installer wizard will ask you if you want to install Bacula. \addcontentsline{lof}{figure}{Win32 Client Setup Wizard} \includegraphics{./win32-welcome.eps} -\ + +\item Next you will be asked to select the installation type. + +\addcontentsline{lof}{figure}{Win32 Installation Type} +\includegraphics{./win32-installation-type.eps} + + \item If you proceed, you will be asked to select the components to be installed. You may install the Bacula program (Bacula File Service) and or the documentation. Both will be installed in sub-directories of the install @@ -73,47 +103,31 @@ Finally, proceed with the installation. \addcontentsline{lof}{figure}{Win32 Component Selection Dialog} \includegraphics{./win32-pkg.eps} +\index[general]{Upgrading} -\item Next you will be asked to select an installation directory. +\item If you are installing for the first time, you will be asked to + enter some very basic information about your configuration. If + you are not sure what to enter, or have previously saved configuration + files, you can put anything you want into the fields, then either + replace the configuration files later with the ones saved, or edit + the file. - \addcontentsline{lof}{figure}{Win32 Directory Selection Dialog} -\includegraphics{./win32-location.eps} + If you are upgrading an existing installation, the following will + not be displayed. -\item If you are installing for the first time, you will be asked if you want - to edit the bacula-fd.conf file, and if you respond with yes, it will be - opened in notepad. Note, if you have installed Bacula to a drive other - than C: you probably should prefix the installation drive name to each - of the directory references in the bacula-fd.conf file, in particular - the {\bf WorkingDirectory} and the {\bf Pid Directory} directives. - Also, if you do not wish to see the full listing of all files restored - in the job output after running a restore job, you can add {\bf , - !restored} to the {\bf director} directive in the {\bf Messages} - resource. +\addcontentsline{lof}{figure}{Win32 Configure} +\includegraphics{./win32-config.eps} -\item Then the installer will ask if you wish to install Bacula as a service. You - should always choose to do so: +\item While the various files are being loaded, you will see the following + dialog: -\addcontentsline{lof}{figure}{Win32 Client Service Selection} -\includegraphics{./win32-service.eps} - - -\item If everything goes well, you will receive the following confirmation: - - \addcontentsline{lof}{figure}{Win32 Client Service Confirmation} - \includegraphics{./win32-service-ok.eps} - - -\item Then you will be asked if you wish to start the service. If you respond - with yes, any running Bacula will be shutdown and the new one started. You - may see a DOS box momentarily appear on the screen as the service is started. - It should disappear in a second or two: - -\addcontentsline{lof}{figure}{Win32 Client Start} -\includegraphics{./win32-start.eps} + \addcontentsline{lof}{figure}{Win32 Install Progress} + \includegraphics{./win32-installing.eps} \item Finally, the finish dialog will appear: + \addcontentsline{lof}{figure}{Win32 Client Setup Completed} \includegraphics{./win32-finish.eps} @@ -133,19 +147,18 @@ cassette icon will change from white to green \includegraphics{./running.eps}, and if there is an error, the holes in the cassette icon will change to red \includegraphics{./error.eps}. -If you are using remote desktop connections between your windows boxes, be +If you are using remote desktop connections between your Windows boxes, be warned that that tray icon does not always appear. It will always be visible when you log into the console, but the remote desktop may not display it. -\subsection*{Post Win32 Installation} -\index[general]{Post Win32 Installation } -\index[general]{Win32!Post Installation } -\addcontentsline{toc}{subsection}{Post Win32 Installation} +\section{Post Win32 Installation} +\index[general]{Post Win32 Installation} +\index[general]{Win32!Post Installation} After installing Bacula and before running it, you should check the contents -of {\bf -c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}bacula-fd.conf} to -ensure that it corresponds to your configuration. +of the configuration files to ensure that they correspond to your +installation. You can get to them by using: +the {\bf Start\-\gt{}All Programs\-\gt{}Bacula} menu item. Finally, but pulling up the Task Manager (ctl-alt-del), verify that Bacula is running as a process (not an Application) with User Name SYSTEM. If this is @@ -153,25 +166,56 @@ not the case, you probably have not installed Bacula while running as Administrator, and hence it will be unlikely that Bacula can access all the system files. -\subsection*{Uninstalling Bacula on Win32} -\index[general]{Win32!Uninstalling Bacula } -\index[general]{Uninstalling Bacula on Win32 } -\addcontentsline{toc}{subsection}{Uninstalling Bacula on Win32} +\section{Uninstalling Bacula on Win32} +\index[general]{Win32!Uninstalling Bacula} +\index[general]{Uninstalling Bacula on Win32} Once Bacula has been installed, it can be uninstalled using the standard Windows Add/Remove Programs dialog found on the Control panel. -\subsection*{Dealing with Win32 Problems} +\section{Dealing with Win32 Problems} \label{problems} -\index[general]{Win32!Dealing with Problems } -\index[general]{Dealing with Win32 Problems } -\addcontentsline{toc}{subsection}{Dealing with Win32 Problems} +\index[general]{Win32!Dealing with Problems} +\index[general]{Dealing with Win32 Problems} + +Sometimes Win32 machines the File daemon may have very slow +backup transfer rates compared to other machines. To you might +try setting the Maximum Network Buffer Size to 32,768 in both the +File daemon and in the Storage daemon. The default size is larger, +and apparently some Windows ethernet controllers do not deal with +a larger network buffer size. + +Many Windows ethernet drivers have a tendency to either run slowly +due to old broken firmware, or because they are running in half-duplex +mode. Please check with the ethernet card manufacturer for the latest +firmware and use whatever techniques are necessary to ensure that the +card is running in duplex. + +If you are not using the portable option, and you have VSS +(Volume Shadow Copy) enabled in the Director, and you experience +problems with Bacula not being able to open files, it is most +likely that you are running an antivirus program that blocks +Bacula from doing certain operations. In this case, disable the +antivirus program and try another backup. If it succeeds, either +get a different (better) antivirus program or use something like +RunClientJobBefore/After to turn off the antivirus program while +the backup is running. + +If turning off anti-virus software does not resolve your VSS +problems, you might have to turn on VSS debugging. The following +link describes how to do this: +\elink{http://support.microsoft.com/kb/887013/en-us}{\url{http://support.microsoft.com/kb/887013/en-us}}. + +In Microsoft Windows Small Business Server 2003 the VSS Writer for Exchange +is turned off by default. To turn it on, please see the following link: +\elink{http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q838183}{\url{ +http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q838183}} + The most likely source of problems is authentication when the Director attempts to connect to the File daemon that you installed. This can occur if the names and the passwords defined in the File daemon's configuration file -{\bf -c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}bacula-fd.conf} on +{\bf bacula-fd.conf} file on the Windows machine do not match with the names and the passwords in the Director's configuration file {\bf bacula-dir.conf} located on your Unix/Linux server. @@ -190,7 +234,9 @@ sides must match for proper authentication. One user had serious problems with the configuration file until he realized that the Unix end of line conventions were used and Bacula wanted them in -Windows format. This has not been confirmed though. +Windows format. This has not been confirmed though, and Bacula version 2.0.0 +and above should now accept all end of line conventions (Win32, +Unix, Mac). Running Unix like programs on Windows machines is a bit frustrating because the Windows command line shell (DOS Window) is rather primitive. As a @@ -202,12 +248,13 @@ on, try the following: \footnotesize \begin{verbatim} Start a DOS shell Window. - cd c:\bacula\bin - bacula-fd -t >out + c:\Program Files\bacula\bin\bacula-fd -t >out type out \end{verbatim} \normalsize +The precise path to bacula-fd depends on where it is installed. The +example above is the default used in 1.39.22 and later. The {\bf -t} option will cause Bacula to read the configuration file, print any error messages and then exit. the {\bf \gt{}} redirects the output to the file named {\bf out}, which you can list with the {\bf type} command. @@ -217,7 +264,7 @@ debug option, you might try starting it as: \footnotesize \begin{verbatim} - bacula-fd -d 100 >out + c:\Program Files\bacula\bin\bacula-fd -d 100 >out \end{verbatim} \normalsize @@ -234,7 +281,8 @@ directory. To enable this, before running a job, use the console, and enter: \normalsize then run the job, and once you have terminated the File daemon, you will find -the debug output in the {\bf bacula.trace} file. +the debug output in the {\bf bacula.trace} file, which will probably be +located in the same directory as bacula-fd.exe. In addition, you should look in the System Applications log on the Control Panel to find any Windows errors that Bacula got during the startup process. @@ -244,22 +292,50 @@ trace=1 on a setdebug command in the Console, Bacula will write the debug information to the file {\bf bacula.trace} in the directory from which Bacula is executing. +If you are having problems with ClientRunBeforeJob scripts randomly dying, +it is possible that you have run into an Oracle bug. See bug number 622 in +the bugs.bacula.org database. The following information has been +provided by a user on this issue: + +\footnotesize +\begin{verbatim} +The information in this document applies to: + Oracle HTTP Server - Version: 9.0.4 + Microsoft Windows Server 2003 + Symptoms + When starting an OC4J instance, the System Clock runs faster, about 7 +seconds per minute. + + Cause + + + This is caused by the Sun JVM bug 4500388, which states that "Calling +Thread.sleep() with a small argument affects the system clock". Although +this is reported as fixed in JDK 1.4.0_02, several reports contradict this +(see the bug in +http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4500388). + + + Also reported by Microsoft as "The system clock may run fast when you +use the ACPI power management timer as a high-resolution counter on Windows +2000-based computers" (See http://support.microsoft.com/?id=821893) +\end{verbatim} +\normalsize + \label{Compatibility} -\subsection*{Windows Compatibility Considerations} -\index[general]{Windows Compatibility Considerations } -\index[general]{Considerations!Windows Compatibility } -\addcontentsline{toc}{subsection}{Windows Compatibility Considerations} - -If any applications are running during the backup and they have files -opened exclusively, Bacula will not be able to backup those files, so be -sure you close your applications (or tell your users to close their -applications) before the backup. Fortunately, -most Microsoft applications do not open -files exclusively so that they can be backed up. However, you will need to -experiment. In any case, if Bacula cannot open the file, it will print an -error message, so you will always know which files were not backed up. -For version 1.37.25 and greater, see the section below on -Volume Shadow Copy Service. +\section{Windows Compatibility Considerations} +\index[general]{Windows Compatibility Considerations} +\index[general]{Considerations!Windows Compatibility} + +If you are not using the VSS (Volume Shadow Copy) option described in the +next section of this chapter, and if any applications are running during +the backup and they have files opened exclusively, Bacula will not be able +to backup those files, so be sure you close your applications (or tell your +users to close their applications) before the backup. Fortunately, most +Microsoft applications do not open files exclusively so that they can be +backed up. However, you will need to experiment. In any case, if Bacula +cannot open the file, it will print an error message, so you will always +know which files were not backed up. For version 1.37.25 and greater, see +the section below on Volume Shadow Copy Service that permits backing up any +file. During backup, Bacula doesn't know about the system registry, so you will either need to write it out to an ASCII file using {\bf regedit~~/e} or use a @@ -272,10 +348,9 @@ gives some distinct advantages and some disadvantages. First, the advantages are that on WinNT/2K/XP systems, the security and ownership information is now backed up. In addition, with the exception of -files in exclusive use by another program (a major disaster for backup -programs on Windows), Bacula can now access all system files. This means -that when you restore files, the security and ownership information will be -restored on WinNT/2K/XP along with the data. +files in exclusive use by another program, Bacula can now access all system +files. This means that when you restore files, the security and ownership +information will be restored on WinNT/2K/XP along with the data. The disadvantage of the Windows backup API calls is that it produces non-portable backups. That is files and their data that are backed up on @@ -285,8 +360,15 @@ WinNT can be restored on WinXP, but this remains to be seen in practice (not yet tested). In addition, the stand-alone tools such as {\bf bls} and {\bf bextract} cannot be used to retrieve the data for those files because those tools are not available on Windows. All restores must use the Bacula -{\bf restore} command. This restriction is mentioned for completeness, but -in practice should not create any problems. +{\bf restore} command. As of Bacula 1.39.x, thanks to Thorsten Engel, this +restriction is removed, and Bacula should be able to read non-portable +backups on any system and restore the data appropriately. However, +on a system that does not have the BackupRead/BackupWrite calls (older +Windows versions and all Unix/Linux machines), though the file data +can be restored, the Windows security and access control data will not be restored. +This means that a standard set of access permissions will be set for +such restored files. + As a default, Bacula backs up Windows systems using the Windows API calls. If you want to backup data on a WinNT/2K/XP system and restore it on a @@ -315,46 +397,46 @@ WinNT/2K/XP specific security and ownership information will be lost. The following matrix will give you an idea of what you can expect. Thanks to Marc Brueckner for doing the tests: -+ - \addcontentsline{lot}{table}{WinNT/2K/XP Restore Portability Status} \begin{longtable}{|l|l|p{2.8in}|} \hline -\multicolumn{1}{|c| }{\bf Backup OS } & \multicolumn{1}{c| }{\bf Restore OS } -& \multicolumn{1}{c| }{\bf Results } \\ - \hline {WinMe } & {WinMe } & {Works } \\ - \hline {WinMe } & {WinNT } & {Works (SYSTEM permissions) } \\ - \hline {WinMe } & {WinXP } & {Works (SYSTEM permissions) } \\ - \hline {WinMe } & {Linux } & {Works (SYSTEM permissions) } \\ - \hline {\ } & {\ } & {\ } \\ - \hline {WinXP } & {WinXP } & {Works } \\ - \hline {WinXP } & {WinNT } & {Works (all files OK, but got "The data is invalid" -message) } \\ - \hline {WinXP } & {WinMe } & {Error: Win32 data stream not supported. } \\ - \hline {WinXP } & {WinMe } & {Works if {\bf Portable=yes} specified during backup.} \\ - \hline {WinXP } & {Linux } & {Error: Win32 data stream not supported. } \\ - \hline {WinXP } & {Linux } & {Works if {\bf Portable=yes} specified during backup.}\\ - \hline {\ } & {\ } & {\ } \\ - \hline {WinNT } & {WinNT } & {Works } \\ - \hline {WinNT } & {WinXP } & {Works } \\ - \hline {WinNT } & {WinMe } & {Error: Win32 data stream not supported. } \\ - \hline {WinNT } & {WinMe } & {Works if {\bf Portable=yes} specified during backup.}\\ - \hline {WinNT } & {Linux } & {Error: Win32 data stream not supported. } \\ - \hline {WinNT } & {Linux } & {Works if {\bf Portable=yes} specified during backup. }\\ - \hline {\ } & {\ } & {\ } \\ - \hline {Linux } & {Linux } & {Works } \\ - \hline {Linux } & {WinNT } & {Works (SYSTEM permissions) } \\ - \hline {Linux } & {WinMe } & {Works } \\ - \hline {Linux } & {WinXP } & {Works (SYSTEM permissions) } +\multicolumn{1}{|c|}{\bf Backup OS} & \multicolumn{1}{c|}{\bf Restore OS} +& \multicolumn{1}{c|}{\bf Results } \\ + \hline {WinMe} & {WinMe} & {Works } \\ + \hline {WinMe} & {WinNT} & {Works (SYSTEM permissions) } \\ + \hline {WinMe} & {WinXP} & {Works (SYSTEM permissions) } \\ + \hline {WinMe} & {Linux} & {Works (SYSTEM permissions) } \\ + \hline {\ } & {\ } & {\ } \\ + \hline {WinXP} & {WinXP} & {Works } \\ + \hline {WinXP} & {WinNT} & {Works (all files OK, but got "The data is invalid" +message) } \\ + \hline {WinXP} & {WinMe} & {Error: Win32 data stream not supported. } \\ + \hline {WinXP} & {WinMe} & {Works if {\bf Portable=yes} specified during backup.} \\ + \hline {WinXP} & {Linux} & {Error: Win32 data stream not supported. } \\ + \hline {WinXP} & {Linux} & {Works if {\bf Portable=yes} specified during backup.}\\ + \hline {\ } & {\ } & {\ } \\ + \hline {WinNT} & {WinNT} & {Works } \\ + \hline {WinNT} & {WinXP} & {Works } \\ + \hline {WinNT} & {WinMe} & {Error: Win32 data stream not supported. } \\ + \hline {WinNT} & {WinMe} & {Works if {\bf Portable=yes} specified during backup.}\\ + \hline {WinNT} & {Linux} & {Error: Win32 data stream not supported. } \\ + \hline {WinNT} & {Linux} & {Works if {\bf Portable=yes} specified during backup. }\\ + \hline {\ } & {\ } & {\ } \\ + \hline {Linux} & {Linux} & {Works } \\ + \hline {Linux} & {WinNT} & {Works (SYSTEM permissions) } \\ + \hline {Linux} & {WinMe} & {Works } \\ + \hline {Linux} & {WinXP} & {Works (SYSTEM permissions)} \\ \hline - \end{longtable} +Note: with Bacula versions 1.39.x and later, non-portable Windows data can +be restore to any machine. + + \label{VSS} -\subsection*{Volume Shadow Copy Service} +\section{Volume Shadow Copy Service} \index[general]{Volume Shadow Copy Service} \index[general]{VSS} -\addcontentsline{toc}{subsection}{Volume Shadow Copy Service} In version 1.37.30 and greater, you can turn on Microsoft's Volume Shadow Copy Service (VSS). @@ -394,13 +476,6 @@ Enable VSS = yes in your FileSet resource. -Important Note!! Under the current implementation, you may only -run a single job at a time in any Win32 File daemon that has VSS -active. Running multiple simultanous jobs in the File daemon -will most likely cause jobs to fail. This restriction does not apply -to the Director, Storage daemons, or any File daemons not running -VSS. - The VSS aware File daemon has the letters VSS on the signon line that it produces when contacted by the console. For example: \begin{verbatim} @@ -441,13 +516,33 @@ Job Report, which will look something like the following: \normalsize In the above Job Report listing, you see that the VSS snapshot was generated for drive C (if other drives are backed up, they will be listed on the {\bf Drive(s)="C"} You also see the -reports from each of the writer program. Here they all report VSS_WS_STABLE, which means +reports from each of the writer program. Here they all report VSS\_WS\_STABLE, which means that you will get a consistent snapshot of the data handled by that writer. -\subsection*{Windows Firewalls} -\index[general]{Firewalls!Windows } -\index[general]{Windows Firewalls } -\addcontentsline{toc}{subsection}{Windows Firewalls} +\section{VSS Problems} +\index[general]{Problems!VSS} +\index[fd] {Problems!VSS} +\index[general]{VSS Problems} +\index[fd]{VSS Problems} + +If you are experiencing problems such as VSS hanging on MSDE, first try +running {\bf vssadmin} to check for problems, then try running {\bf +ntbackup} which also uses VSS to see if it has similar problems. If so, you +know that the problem is in your Windows machine and not with Bacula. + +The FD hang problems were reported with {\bf MSDEwriter} when: +\begin{itemize} +\item a local firewall locked local access to the MSDE TCP port (MSDEwriter +seems to use TCP/IP and not Named Pipes). +\item msdtcs was installed to run under "localsystem": try running msdtcs +under networking account (instead of local system) (com+ seems to work +better with this configuration). +\end{itemize} + + +\section{Windows Firewalls} +\index[general]{Firewalls!Windows} +\index[general]{Windows Firewalls} If you turn on the firewalling feature on Windows (default in WinXP SP2), you are likely to find that the Bacula ports are blocked and you cannot @@ -467,10 +562,9 @@ netsh firewall set opmode disable is purported to disable the firewall, but this command is not accepted on my WinXP Home machine. -\subsection*{Windows Port Usage} -\index[general]{Windows Port Usage } -\index[general]{Usage!Windows Port } -\addcontentsline{toc}{subsection}{Windows Port Usage} +\section{Windows Port Usage} +\index[general]{Windows Port Usage} +\index[general]{Usage!Windows Port} If you want to see if the File daemon has properly opened the port and is listening, you can enter the following command in a shell window: @@ -481,10 +575,12 @@ listening, you can enter the following command in a shell window: \end{verbatim} \normalsize -\subsection*{Windows Disaster Recovery} -\index[general]{Recovery!Windows Disaster } -\index[general]{Windows Disaster Recovery } -\addcontentsline{toc}{subsection}{Windows Disaster Recovery} +TopView is another program that has been recommend, but it is not a +standard Win32 program, so you must find and download it from the Internet. + +\section{Windows Disaster Recovery} +\index[general]{Recovery!Windows Disaster} +\index[general]{Windows Disaster Recovery} We don't currently have a good solution for disaster recovery on Windows as we do on Linux. The main piece lacking is a Windows boot floppy or a Windows boot @@ -506,22 +602,56 @@ suggestion, which looks very promising. It looks like Bart PE Builder, which creates a Windows PE (Pre-installation Environment) Boot-CD, may be just what is needed to build a complete disaster recovery system for Win32. This distribution can be found at -\elink{http://www.nu2.nu/pebuilder/ }{http://www.nu2.nu/pebuilder/}. +\elink{http://www.nu2.nu/pebuilder/}{\url{http://www.nu2.nu/pebuilder/}}. -\subsection*{Windows Restore Problems} +\section{Windows Restore Problems} \index[general]{Problems!Windows Restore} \index[general]{Windows Restore Problems} -\addcontentsline{toc}{subsection}{Windows Restore Problems} Please see the \ilink{Restore Chapter}{Windows} of this manual for problems that you might encounter doing a restore. +section{Windows Backup Problems} +\index[general]{Problems!Windows Backup} +\index[general]{Windows Backup Problems} +If during a Backup, you get the message: +{\bf ERR=Access is denied} and you are using the portable option, +you should try both adding both the non-portable (backup API) and +the Volume Shadow Copy options to your Director's conf file. -\subsection*{Windows Ownership and Permissions Problems} -\index[general]{Problems!Windows Ownership and Permissions } -\index[general]{Windows Ownership and Permissions Problems } -\addcontentsline{toc}{subsection}{Windows Ownership and Permissions -Problems} +In the Options resource: +\footnotesize +\begin{verbatim} +portable = no +\end{verbatim} +\normalsize + +In the FileSet resource: +\footnotesize +\begin{verbatim} +enablevss = yes +\end{verbatim} +\normalsize + +In general, specifying these two options should allow you to backup +any file on a Windows system. However, in some cases, if users +have allowed to have full control of their folders, even system programs +such a Bacula can be locked out. In this case, you must identify +which folders or files are creating the problem and do the following: + +\begin{enumerate} +\item Grant ownership of the file/folder to the Administrators group, +with the option to replace the owner on all child objects. +\item Grant full control permissions to the Administrators group, +and change the user's group to only have Modify permission to +the file/folder and all child objects. +\end{enumerate} + +Thanks to Georger Araujo for the above information. + +\section{Windows Ownership and Permissions Problems} +\index[general]{Problems!Windows Ownership and Permissions} +\index[general]{Windows Ownership and Permissions Problems} If you restore files backed up from WinNT/XP/2K to an alternate directory, Bacula may need to create some higher level directories that were not saved @@ -533,7 +663,7 @@ if you run as administrator. In principle, Microsoft supplies you with the way to cease the ownership of those files and thus change the permissions. However, a much better solution to working with and changing Win32 permissions is the program {\bf SetACL}, which can be found at -\elink{http://setacl.sourceforge.net/ }{http://setacl.sourceforge.net/}. +\elink{http://setacl.sourceforge.net/}{\url{http://setacl.sourceforge.net/}}. If you have not installed Bacula while running as Administrator and if Bacula is not running as a Process with the userid (User Name) SYSTEM, @@ -546,10 +676,9 @@ Bacula (bacula-fd.exe) runs, from SYSTEM to a Domain Admin userid, resolves the problem. -\subsection*{Manually resetting the Permissions} -\index[general]{Manually resetting the Permissions } -\index[general]{Permissions!Manually resetting the } -\addcontentsline{toc}{subsection}{Manually resetting the Permissions} +\section{Manually resetting the Permissions} +\index[general]{Manually resetting the Permissions} +\index[general]{Permissions!Manually resetting the} The following solution was provided by Dan Langille \lt{}dan at langille in the dot org domain\gt{}. The steps are performed using Windows 2000 Server but @@ -605,10 +734,9 @@ directory. In addition to the above methods of changing permissions, there is a Microsoft program named {\bf cacls} that can perform similar functions. -\subsection*{Backing Up the WinNT/XP/2K System State} -\index[general]{State!Backing Up the WinNT/XP/2K System } -\index[general]{Backing Up the WinNT/XP/2K System State } -\addcontentsline{toc}{subsection}{Backing Up the WinNT/XP/2K System State} +\section{Backing Up the WinNT/XP/2K System State} +\index[general]{State!Backing Up the WinNT/XP/2K System} +\index[general]{Backing Up the WinNT/XP/2K System State} A suggestion by Damian Coutts using Microsoft's NTBackup utility in conjunction with Bacula should permit a full restore of any damaged system @@ -637,11 +765,8 @@ documentation says you can't run a command line restore of the systemstate. To the best of my knowledge, this has not yet been tested. If you test it, please report your results to the Bacula email list. -\subsection*{Windows Considerations for Filename Specifications} -\index[general]{Specifications!Windows Considerations for Filename } -\index[general]{Windows Considerations for Filename Specifications } -\addcontentsline{toc}{subsection}{Windows Considerations for Filename -Specifications} +\section{Considerations for Filename Specifications} +\index[general]{Windows!Considerations for Filename Specifications} Please see the \ilink{Director's Configuration chapter}{win32} of this manual @@ -650,23 +775,19 @@ Include and Exclude directives. \index[general]{Unicode} Bacula versions prior to 1.37.28 do not support Windows Unicode filenames. -As of that version, both {\bf bconsole} and {\bf wx-console} support Windows +As of that version, both {\bf bconsole} and {\bf bwx-console} support Windows Unicode filenames. There may still be some problems with multiple byte characters (e.g. Chinese, ...) where it is a two byte character but the displayed character is not two characters wide. -\index[general]{Win32 path length restriction} -Path/filenames longer than 260 characters are not supported. This may be -possible in a future version. +\index[general]{Win32 Path Length Restriction} +Path/filenames longer than 260 characters (up to 32,000) are supported +beginning with Bacula version 1.39.20. Older Bacula versions support +only 260 character path/filenames. -\subsection*{Command Line Options Specific to the Bacula Windows File -Daemon (Client)} -\index[general]{Client!Command Line Options Specific to the Bacula Windows -File Daemon } -\index[general]{Command Line Options Specific to the Bacula Windows File -Daemon (Client) } -\addcontentsline{toc}{subsection}{Command Line Options Specific to the -Bacula Windows File Daemon (Client)} +\section{Win32 Specific File daemon Command Line} +\index[general]{Client!Win32 Specific File daemon Command Line Options} +\index[general]{Win32 Specific File daemon Command Line Options} These options are not normally seen or used by the user, and are documented here only for information purposes. At the current time, to change the default @@ -682,44 +803,40 @@ version. In addition, the following Windows only options are implemented: \begin{description} -\item [/servicehelper ] - \index[fd]{/servicehelper } - Run the service helper application (don't use this it is deprecated.). - \item [/service ] - \index[fd]{/service } + \index[fd]{/service} Start Bacula as a service \item [/run ] - \index[fd]{/run } + \index[fd]{/run} Run the Bacula application \item [/install ] - \index[fd]{/install } + \index[fd]{/install} Install Bacula as a service in the system registry \item [/remove ] - \index[fd]{/remove } + \index[fd]{/remove} Uninstall Bacula from the system registry \item [/about ] - \index[fd]{/about } + \index[fd]{/about} Show the Bacula about dialogue box \item [/status ] - \index[fd]{/status } + \index[fd]{/status} Show the Bacula status dialogue box \item [/events ] - \index[fd]{/events } + \index[fd]{/events} Show the Bacula events dialogue box (not yet implemented) \item [/kill ] - \index[fd]{/kill } + \index[fd]{/kill} Stop any running {\bf Bacula} \item [/help ] - \index[fd]{/help } + \index[fd]{/help} Show the Bacula help dialogue box \end{description} @@ -728,13 +845,13 @@ need to use these options as they are normally handled by the system automatically once Bacula is installed. However, you may note these options in some of the .bat files that have been created for your use. -\subsection*{Shutting down Windows Systems} -\index[general]{Shutting down Windows Systems } -\index[general]{Systems!Shutting down Windows } -\addcontentsline{toc}{subsection}{Shutting down Windows Systems} +\section{Shutting down Windows Systems} +\index[general]{Shutting down Windows Systems} +\index[general]{Systems!Shutting down Windows} -Some users like to shutdown their windows machines after a backup using a +Some users like to shutdown their Windows machines after a backup using a Client Run After Job directive. If you want to do something similar, you might take the shutdown program from the -\elink{apcupsd project}{http://www.apcupsd.com} or one from the -\elink{Sysinternals project}{http://www.sysinternals.com/ntw2k/freeware/psshutdown.shtml}. +\elink{apcupsd project}{\url{http://www.apcupsd.com}} or one from the +\elink{Sysinternals project} +{\url{http://www.sysinternals.com/ntw2k/freeware/psshutdown.shtml}}.