From: Kern Sibbald Date: Sat, 3 Dec 2005 14:49:42 +0000 (+0000) Subject: Updates X-Git-Tag: Release-1.38.3~50 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a5672c7e842d601015b731e6ec687f3ccd3a711f;p=bacula%2Fdocs Updates --- diff --git a/docs/home-page/pages/makedonation.php b/docs/home-page/pages/makedonation.php index 1f46d8de..66547c63 100644 --- a/docs/home-page/pages/makedonation.php +++ b/docs/home-page/pages/makedonation.php @@ -86,6 +86,7 @@ week, if you want me to know sooner that you have contributed, please send me an email directly: kern at sibbald dot com. +

If you need an invoice, I can send you one, but in order to limit my administrative work, I kindly request you to make a donation of at least $200 before requesting an invoice. To obtain one, simply email me the exact diff --git a/docs/manual-de/consoleconf.tex b/docs/manual-de/consoleconf.tex index d2f44e6a..22f4864d 100644 --- a/docs/manual-de/consoleconf.tex +++ b/docs/manual-de/consoleconf.tex @@ -3,12 +3,12 @@ \section*{Console Configuration} \label{_ChapterStart36} -\index[general]{Configuration!Console } -\index[general]{Console Configuration } +\index[general]{Configuration!Console} +\index[general]{Console Configuration} \addcontentsline{toc}{section}{Console Configuration} \subsection*{General} -\index[general]{General } +\index[general]{General} \addcontentsline{toc}{subsection}{General} The Console configuration file is the simplest of all the configuration files, @@ -32,8 +32,8 @@ Console program will ask you which one you want to use. \subsection*{The Director Resource} \label{DirectorResource3} -\index[general]{Director Resource } -\index[general]{Resource!Director } +\index[general]{Director Resource} +\index[general]{Resource!Director} \addcontentsline{toc}{subsection}{Director Resource} The Director resource defines the attributes of the Director running on the @@ -44,16 +44,16 @@ choose one when you start the {\bf Console} program. \begin{description} \item [Director] - \index[console]{Director } + \index[console]{Director} Start of the Director records. \item [Name = \lt{}name\gt{}] - \index[console]{Name } + \index[console]{Name} The director name used to select among different Directors, otherwise, this name is not used. \item [DIRPort = \lt{}port-number\gt{}] - \index[dir]{DIRPort } + \index[dir]{DIRPort} Specify the port to use to connect to the Director. This value will most likely already be set to the value you specified on the {\bf \verb:--:with-base-port} option of the {\bf ./configure} command. This port must be @@ -63,12 +63,12 @@ the default is 9101 so this record is not normally specified. \item [Address = \lt{}address\gt{}] - \index[dir]{Address } + \index[dir]{Address} Where the address is a host name, a fully qualified domain name, or a network address used to connect to the Director. \item [Password = \lt{}password\gt{}] - \index[dir]{Password } + \index[dir]{Password} Where the password is the password needed for the Director to accept the Console connection. This password must be identical to the {\bf Password} specified in the {\bf Director} resource of the @@ -89,8 +89,8 @@ Director { \normalsize \subsection*{The ConsoleFont Resource} -\index[general]{Resource!ConsoleFont } -\index[general]{ConsoleFont Resource } +\index[general]{Resource!ConsoleFont} +\index[general]{ConsoleFont Resource} \addcontentsline{toc}{subsection}{ConsoleFont Resource} The ConsoleFont resource is available only in the GNOME version of the @@ -100,21 +100,21 @@ the main listing window. \begin{description} \item [ConsoleFont] - \index[console]{ConsoleFont } + \index[console]{ConsoleFont} Start of the ConsoleFont records. \item [Name = \lt{}name\gt{}] - \index[console]{Name } + \index[console]{Name} The name of the font. -\item [Font = \lt{}X-Window Font Specification\gt{}] - \index[console]{Font } +\item [Font = \lt{}Pango Font Name\gt{}] + \index[console]{Font} The string value given here defines the desired font. It is specified in the -standard cryptic X Window format. For example, the default specification is: +Pango format. For example, the default specification is: \footnotesize \begin{verbatim} -Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1" +Font = "LucidaTypewriter 9" \end{verbatim} \normalsize @@ -122,21 +122,21 @@ Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1" Thanks to Phil Stracchino for providing the code for this feature. -An actual example might be: +An different example might be: \footnotesize \begin{verbatim} ConsoleFont { Name = Default -Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1" +Font = "Monospace 10" } \end{verbatim} \normalsize \subsection*{The Console Resource} \label{ConsoleResource} -\index[general]{Console Resource } -\index[general]{Resource!Console } +\index[general]{Console Resource} +\index[general]{Resource!Console} \addcontentsline{toc}{subsection}{Console Resource} As of Bacula version 1.33 and higher, there are three different kinds of @@ -190,12 +190,12 @@ perhaps the wx-console.conf file): DIRport = 9101 Address = myserver Password = "XXXXXXXXXXX" # no, really. this is not obfuscation. - } +} Console { Name = restricted-user Password = "UntrustedUser" - } +} \end{verbatim} \normalsize @@ -231,8 +231,8 @@ run} command. In other words, this user is rather limited in what he can see and do with Bacula. \subsection*{Console Commands} -\index[general]{Console Commands } -\index[general]{Commands!Console } +\index[general]{Console Commands} +\index[general]{Commands!Console} \addcontentsline{toc}{subsection}{Console Commands} For more details on running the console and its commands, please see the @@ -240,8 +240,8 @@ For more details on running the console and its commands, please see the \subsection*{Sample Console Configuration File} \label{SampleConfiguration2} -\index[general]{File!Sample Console Configuration } -\index[general]{Sample Console Configuration File } +\index[general]{File!Sample Console Configuration} +\index[general]{Sample Console Configuration File} \addcontentsline{toc}{subsection}{Sample Console Configuration File} An example Console configuration file might be the following: diff --git a/docs/manual-de/dirdconf.tex b/docs/manual-de/dirdconf.tex index 83603369..e3007140 100644 --- a/docs/manual-de/dirdconf.tex +++ b/docs/manual-de/dirdconf.tex @@ -1917,12 +1917,6 @@ The Pool Resource defined in the Director's configuration file The name of the pool. For most applications, you will use the default pool name {\bf Default}. This directive is required. -\item [Number of Volumes = \lt{}number\gt{}] - \index[dir]{Number of Volumes } - This directive specifies the number of volumes (tapes or files) - contained in the pool. Normally, it is defined and updated - automatically by the Bacula catalog handling routines. - \label{MaxVolumes} \item [Maximum Volumes = \lt{}number\gt{}] \index[dir]{Maximum Volumes } @@ -2119,14 +2113,16 @@ must use the {\bf update} command in the Console. \label{PoolRecycle} \item [Recycle = \lt{}yes|no\gt{}] \index[dir]{Recycle } - This directive specifies whether or not Purged Volumes will be recycled. + This directive specifies whether or not Purged Volumes may be recycled. If it is set to {\bf yes} (default) and Bacula needs a volume but finds none that are appendable, it will search for and recycle (reuse) Purged Volumes (i.e. volumes with all the Jobs and Files expired and thus deleted from the Catalog). If the Volume is recycled, all previous data written to that Volume will be overwritten. If Recycle is set to {\bf - no} you must manually set the recycle flag (update command) for - a Volume to be reused. + no}, the Volume will not be recycled, and hence, the data will remain + valid. If you want to reuse (re-write) the Volume, and the recycle flag + is no (0 in the catalog), you may manually set the recycle flag (update + command) for a Volume to be reused. Please note that the value defined by this directive in the bacula-dir.conf file is the default value used when a Volume is created. @@ -2155,7 +2151,7 @@ must use the {\bf update} command in the Console. However, if you use this directive and have only one Volume in the Pool, you will immediately recycle your Volume if you fill it and Bacula needs another one. Thus your backup will be totally invalid. - Please use this directive with care. The default is {\no}. + Please use this directive with care. The default is {\bf no}. \label{RecycleCurrent} @@ -2177,7 +2173,7 @@ must use the {\bf update} command in the Console. However, if you use this directive and have only one Volume in the Pool, you will immediately recycle your Volume if you fill it and Bacula needs another one. Thus your backup will be totally invalid. Please use this - directive with care. The default is {\no}. + directive with care. The default is {\bf no}. \label{PurgeOldest} @@ -2207,7 +2203,7 @@ must use the {\bf update} command in the Console. We {\bf highly} recommend against using this directive, because it is sure that some day, Bacula will recycle a Volume that contains current - data. The default is {\no}. + data. The default is {\bf no}. \item [Cleaning Prefix = \lt{}string\gt{}] \index[dir]{Cleaning Prefix } diff --git a/docs/manual-de/postgresql.tex b/docs/manual-de/postgresql.tex index c5768c5d..e8df71a7 100644 --- a/docs/manual-de/postgresql.tex +++ b/docs/manual-de/postgresql.tex @@ -86,7 +86,7 @@ user). 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 postgre}. + {\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 {\bf bacula}, you can do the following: @@ -94,10 +94,10 @@ user). \begin{verbatim} su (enter root password) - password pgsql (or postgre) + password pgsql (or postgres) (enter a password for this account) exit - su pgsql (or postgre) + 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 @@ -151,6 +151,73 @@ This solved the problem for me, but it is not always a good thing 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 +just prior the the existing ``local'' and ``host'' lines, add the line: + +\footnotesize +\begin{verbatim} + local bacula bacula md5 +\end{verbatim} +\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. + +Next, become the Postgres administrator, postgres, either by logging +on as the postgres user, or by using su to become root and then using +su - postgres to become postgres. Add a password to the bacula +database for the bacula user using: + +\footnotesize +\begin{verbatim} + \$ psql bacula + bacula=# alter user bacula with password 'secret'; + ALTER USER + bacula=# \\q +\end{verbatim} +\normalsize + +Next, 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: + +\footnotesize +\begin{verbatim} + dbname = bacula; user = bacula; password = "secret" + ... and ... + RunBeforeJob = "/etc/make_catalog_backup bacula bacula secret" +\end{verbatim} +\normalsize + +Naturally, you should choose your own significantly more random +password, and ensure that the bacula-dir.conf file containing this +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 +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 +this mechanism, create a file named .pgpass containing the single +line: + +\footnotesize +\begin{verbatim} + localhost:5432:bacula:bacula:secret +\end{verbatim} +\normalsize + +This file should be copied into the home directory of all accounts +that will need to gain access to the database: typically, root, +bacula, and any users who will make use of any of the console +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} \index[general]{Database!Re-initializing the Catalog } diff --git a/docs/manual-de/tapetesting.tex b/docs/manual-de/tapetesting.tex index b2ee2e83..875ace8f 100644 --- a/docs/manual-de/tapetesting.tex +++ b/docs/manual-de/tapetesting.tex @@ -1078,7 +1078,7 @@ number of sequential reads as it had written. \index[general]{Modes!Details} \index[general]{Details of Tape Modes} \addcontentsline{toc}{subsection}{Details of Tape Modes} -Rudolf Cejkar has provided the following information concerning +Rudolf Cejka has provided the following information concerning certain tape modes and MTEOM. \begin{description} diff --git a/docs/manual-de/tls.tex b/docs/manual-de/tls.tex index 237a165f..4174aa3b 100644 --- a/docs/manual-de/tls.tex +++ b/docs/manual-de/tls.tex @@ -123,6 +123,10 @@ valid for 10 years can be made with the following: The above script will ask you a number of questions. You may simply answer each of them by entering a return, or if you wish you may enter your own data. +An alternative is to generate your self-signed certificates with TinyCA, +which has a very nice Graphical User Interface. TinyCA can be found at +\elink{http://tinyca.sm-zone.net/}{http://tinyca.sm-zone.net/}. + \subsection*{Getting a CA Signed Certificate} \index[general]{Certificate!Getting a CA Signed } @@ -242,4 +246,3 @@ files, which should help you setting up your own. \normalsize - diff --git a/docs/manual-de/version.tex b/docs/manual-de/version.tex index 5ac2412b..2b9ec090 100644 --- a/docs/manual-de/version.tex +++ b/docs/manual-de/version.tex @@ -1 +1 @@ -1.38.2 (20 November 2005) +1.38.3 (27 November 2005) diff --git a/docs/manual-fr/autochangers.tex b/docs/manual-fr/autochangers.tex index 29acf734..e05fb068 100644 --- a/docs/manual-fr/autochangers.tex +++ b/docs/manual-fr/autochangers.tex @@ -1,73 +1,90 @@ %% %% -\section*{Autochangers Support} +\section*{Autochanger Support} \label{_ChapterStart18} -\index[general]{Support!Autochangers } -\index[general]{Autochangers Support } -\addcontentsline{toc}{section}{Autochangers Support} +\index[general]{Support!Autochanger } +\index[general]{Autochanger Support } +\addcontentsline{toc}{section}{Autochanger Support} \subsection*{Autochangers -- General} \index[general]{General!Autochangers -- } \index[general]{Autochangers -- General } \addcontentsline{toc}{subsection}{Autochangers -- General} -Beginning with version 1.23, Bacula provides autochanger support for reading -and writing tapes. In order to work with an autochanger, Bacula requires three -things, each of which is explained in more detail after this list: +Bacula provides autochanger support for reading and writing tapes. In +order to work with an autochanger, Bacula requires three things, each of +which is explained in more detail after this list: \begin{itemize} \item A script that actually controls the autochanger according to commands sent by Bacula. We furnish such a script that works with {\bf mtx} found in the {\bf depkgs} distribution. This script works only with single drive -autochangers. + autochangers. \item That each Volume (tape) to be used must be defined in the Catalog and have a Slot number assigned to it so that Bacula knows where the Volume is in the autochanger. This is generally done with the {\bf label} command. See -below for more details. + below for more details. You must pre-label the tapes manually before + using them. \item Modifications to your Storage daemon's Device configuration resource to identify that the device is a changer, as well as a few other parameters. -\item Optionally, you can modify your Storage resource definition in the - Director's configuration file so that you are automatically prompted for the +\item You should also modify your Storage resource definition in the + Director's configuration file so that you are automatically prompted for the Slot when labeling a Volume. +\item You need to ensure that your Storage daemon (if not running as root) + has access permissions to both the tape drive and the control device. +\item You need to have {\bf Autochanger = yes} in your Storage resource + in your bacula-dir.conf file so that you will be prompted for the + slot number when you label Volumes. \end{itemize} -Bacula uses its own {\bf mtx-changer} script to interface with a a program -that actually does the tape changing. Thus in principle, {\bf mtx-changer} can -be adapted to function with any autochanger program. The current version of -{\bf mtx-changer} works with the {\bf mtx} program. +In version 1.37, there is a new \ilink{Autochanger +resource}{AutochangerRes} that permits you to group Device resources thus +creating a multi-drive autochanger. If you have a multi-drive autochanger, +you must use this new resource. If you have a single drive autochanger, +it is recommended, but not required. -As of version 1.30 and later, Bacula supports autochangers with barcode -readers. This support includes two new Console commands: {\bf label barcodes} -and {\bf update slots}. For more details on these commands, see the ``Barcode -Support'' section below. +Bacula uses its own {\bf mtx-changer} script to interface with a program +that actually does the tape changing. Thus in principle, {\bf mtx-changer} +can be adapted to function with any autochanger program. The current +version of {\bf mtx-changer} works with the {\bf mtx} program. However, +FreeBSD users have provided a script in the {\bf examples/autochangers} +directory that allows Bacula to use the {\bf chio} program. + +Bacula also supports autochangers with barcode +readers. This support includes two Console commands: {\bf label barcodes} +and {\bf update slots}. For more details on these commands, see the "Barcode +Support" section below. Current Bacula autochanger support does not include cleaning, stackers, or -silos. However, under certain conditions, you may be able to make Bacula work -with stackers (gravity feed and such). Bacula supports only single drive -autochangers. Bacula does have code to operate multi-drive autochangers. -However, the implementation is only partial. See below for more details. +silos. However, under certain conditions, you may be able to make Bacula +work with stackers (gravity feed and such). Support for multi-drive +autochangers requires the \ilink{Autochanger resource}{AutochangerRes} +introduced in version 1.37. This resource is also recommended for single +drive autochangers. In principle, if {\bf mtx} will operate your changer correctly, then it is just a question of adapting the {\bf mtx-changer} script (or selecting one already adapted) for proper interfacing. You can find a list of autochangers supported by {\bf mtx} at the following link: \elink{http://mtx.badtux.net/compatibility.php} -{http://mtx.badtux.net/compatibility.php}. The home page for the {\bf mtx} -project can be found at: -\elink{ http://mtx.badtux.net/}{http://mtx.badtux.net/}. +{http://mtx.badtux.net/compatibility.php}. +The home page for the {\bf mtx} project can be found at: +\elink{http://mtx.badtux.net/}{http://mtx.badtux.net/}. If you are having troubles, please use the {\bf auto} command in the {\bf btape} program to test the functioning of your autochanger with Bacula. When -Bacula is running, pleas remember that for many distributions (e.g. FreeBSD, +Bacula is running, please remember that for many distributions (e.g. FreeBSD, Debian, ...) the Storage daemon runs as {\bf bacula.tape} rather than {\bf root.root}, so you will need to ensure that the Storage daemon has sufficient permissions to access the autochanger. -\label{devices} +\label{SCSI devices} \subsection*{Knowing What SCSI Devices You Have} \index[general]{Have!Knowing What SCSI Devices You } \index[general]{Knowing What SCSI Devices You Have } +\index[general]{SCSI devices} +\index[general]{devices!SCSI} \addcontentsline{toc}{subsection}{Knowing What SCSI Devices You Have} Under Linux, you can @@ -100,6 +117,32 @@ camcontrol devlist To list the SCSI devices as well as the {\bf /dev/passn} that you will use on the Bacula {\bf Changer Device = } directive. + +Please check that your Storage daemon has permission to access this +device. + +The following tip for FreeBSD users comes from Danny Butroyd: +n reboot bacula will NOT have permissions to +control the device /dev/pass0 (assuming this is your changer device). +To get around this just edit the /etc/devfs.conf file and add the +following to the bottom of the config file: +\footnotesize +\begin{verbatim} +own pass0 root:bacula +perm pass0 0666 +own nsa0.0 root:bacula +perm nsa0.0 0666 +\end{verbatim} +\normalsize +I have given the bacula group permission to write to the nsa0.0 device +too just to be on the safe side. To bring these changes into effect +just run:- + +/etc/rc.d/devfs restart + +Basically this will stop you having to change permissions on these +devices to make bacula work when operating the AutoChanger after a reboot. + \label{scripts} \subsection*{Example Scripts} @@ -115,6 +158,7 @@ of configuration files and scripts, please look in the {\bf example {\bf HP-autoloader.conf} Bacula Device resource, and several {\bf mtx-changer} scripts that have been modified to work with different autochangers. + \label{Slots} \subsection*{Slots} @@ -126,8 +170,9 @@ To properly address autochangers, Bacula must know which Volume is in each when not loaded into the drive. Bacula numbers these slots from one to the number of cartridges contained in the autochanger. -Bacula will not automatically use a Volume in your auotchanger unless it is -labeled and the slot number is stored in the catalog. For each Volume in your +Bacula will not automatically use a Volume in your autochanger unless it is +labeled and the slot number is stored in the catalog and the Volume is marked +as InChanger. For each Volume in your changer, you will, using the Console program, assign a slot. This information is kept in {\bf Bacula's} catalog database along with the other data for the volume. If no slot is given, or the slot is set to zero, Bacula will not @@ -135,39 +180,42 @@ attempt to use the autochanger even if all the necessary configuration records are present. In addition, the console {\bf mount} command does not cause Bacula to operate the autochanger, it only tells Bacula to read any tape that may be in the drive. -\label{mult} +You can check if the Slot number and InChanger flag are set by doing a: +\begin{verbatim} +list Volumes +\end{verbatim} + +in the Console program. + +\label{mult} \subsection*{Multiple Devices} \index[general]{Devices!Multiple } \index[general]{Multiple Devices } \addcontentsline{toc}{subsection}{Multiple Devices} -Some autochangers have more than one read/write device (drive). The current -implementation has limited support for multiple devices by using the {\bf +Some autochangers have more than one read/write device (drive). The +new +\ilink{Autochanger resource}{AutochangerRes} introduced in version +1.37 permits you to group Device resources, where each device +represents a drive. The Director may still reference the Devices (drives) +directly, but doing so, bypasses the proper functioning of the +drives together. Instead, the Director (in the Storage resource) +should reference the Autochanger resource name. Doing so permits +the Storage daemon to ensure that only one drive uses the mtx-changer +script at a time, and also that two drives don't reference the +same Volume. + +Multi-drive requires the use of the {\bf Drive Index} directive in the Device resource of the Storage daemon's configuration file. Drive numbers or the Device Index are numbered beginning at zero, which is the default. To use the second Drive in an autochanger, you -need to define a second Device resource and set the Drive Index to one for +need to define a second Device resource and set the Drive Index to 1 for that device. In general, the second device will have the same {\bf Changer Device} (control channel) as the first drive, but a different {\bf Archive Device}. -The current implementation of Bacula does not coordinate between the two -drives, so you must make sure that Bacula doesn't attempt to mount the same -Volume on both drives at the same time. There are a number of ways to do this. -One was is to use different pools for each drive. - -Worse than the above, the {\bf mtx} program apparently does not prevent two -accesses to the same control device at the same time, which means that if -Bacula happens to attempt to call the mtx-changer script for two drives -simultaneously, something will break. - -A user supplied modified version of the mtx-changer script, which does locking -to avoid this problem can be found in {\bf -examples/autochangers/locking-mtx-changer}. If you are using multiple drives, -you will probably want to modify this script to work for you. \label{ConfigRecords} - \subsection*{Device Configuration Records} \index[general]{Records!Device Configuration } \index[general]{Device Configuration Records } @@ -179,39 +227,44 @@ the Storage daemon. Four records: {\bf Autochanger}, {\bf Changer Device}, the autochanger. These four records, permitted in {\bf Device} resources, are described in -detail below: +detail below. Note, however, that the {\bf Changer Device} and the +{\bf Changer Command} directives are not needed in the Device resource +if they are present in the {\bf Autochanger} resource. \begin{description} \item [Autochanger = {\it Yes|No} ] - \index[console]{Autochanger } + \index[sd]{Autochanger } The {\bf Autochanger} record specifies that the current device is or is not an autochanger. The default is {\bf no}. \item [Changer Device = \lt{}device-name\gt{}] - \index[console]{Changer Device } + \index[sd]{Changer Device } In addition to the Archive Device name, you must specify a {\bf Changer Device} name. This is because most autochangers are controlled through a different device than is used for reading and writing the cartridges. For -example, on Linux, one normally uses the generic SCSI interface for -controlling the autochanger, but the standard SCSI interface for reading and +example, on Linux, one normally uses the generic SCSI interface for +controlling the autochanger, but the standard SCSI interface for reading and writing the tapes. On Linux, for the {\bf Archive Device = /dev/nst0}, you would typically have {\bf Changer Device = /dev/sg0}. Note, some of the more -advanced autochangers will locate the changer device on {\bf /dev/sg1}. Such +advanced autochangers will locate the changer device on {\bf /dev/sg1}. Such devices typically have several drives and a large number of tapes. -On FreeBSD systems, the changer device will typically be on {\bf /dev/pass0} +On FreeBSD systems, the changer device will typically be on {\bf /dev/pass0} through {\bf /dev/passn}. -On Solaris, the changer device will typically be some file under {\bf +On Solaris, the changer device will typically be some file under {\bf /dev/rdsk}. +Please ensure that your Storage daemon has permission to access this +device. + \item [Changer Command = \lt{}command\gt{}] - \index[fd]{Changer Command } + \index[sd]{Changer Command } This record is used to specify the external program to call and what arguments to pass to it. The command is assumed to be a standard program or shell script that can be executed by the operating system. This command is -invoked each time that Bacula wishes to manipulate the autochanger. The +invoked each time that Bacula wishes to manipulate the autochanger. The following substitutions are made in the {\bf command} before it is sent to the operating system for execution: @@ -227,17 +280,15 @@ the operating system for execution: %s = Slot base 0 %S = Slot base 1 %v = Volume name - \end{verbatim} \normalsize An actual example for using {\bf mtx} with the {\bf mtx-changer} script (part -of the Bacula distribution) is: +of the Bacula distribution) is: \footnotesize \begin{verbatim} Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" - \end{verbatim} \normalsize @@ -248,20 +299,20 @@ output expected by Bacula are give in the {\bf Bacula Autochanger Interface} section below. \item [Maximum Changer Wait = \lt{}time\gt{}] - \index[fd]{Maximum Changer Wait } - This record is used to define the maximum amount of time that Bacula will -wait for an autoloader to respond to a command (e.g. load). The default is -set to 120 seconds. If you have a slow autoloader you may want to set it -longer. + \index[sd]{Maximum Changer Wait } + This record is used to define the maximum amount of time that Bacula + will wait for an autoloader to respond to a command (e.g. load). The + default is set to 120 seconds. If you have a slow autoloader you may + want to set it longer. If the autoloader program fails to respond in this time, it will be killed -and Bacula will request operator intervention. +and Bacula will request operator intervention. \item [Drive Index = \lt{}number\gt{}] - \index[fd]{Drive Index } - This record allows you to tell Bacula to use the second or subsequent drive -in an autochanger with multiple drives. Since the drives are numbered from -zero, the second drive is defined by + \index[sd]{Drive Index } + This record allows you to tell Bacula to use the second or subsequent + drive in an autochanger with multiple drives. Since the drives are + numbered from zero, the second drive is defined by \footnotesize \begin{verbatim} @@ -275,29 +326,83 @@ Bacula configuration file. See the Multiple Drive section above in this chapter for more information. \end{description} -\label{example} +In addition, for proper functioning of the Autochanger, you must +define an Autochanger resource. +\input{autochangerres} +\label{example} \subsection*{An Example Configuration File} \index[general]{Example Configuration File } \index[general]{File!Example Configuration } \addcontentsline{toc}{subsection}{Example Configuration File} -The following {\bf Device} resource implements an autochanger: +The following two resources implement an autochanger: \footnotesize \begin{verbatim} -Device { +Autochanger { Name = "Autochanger" + Device = DDS-4 + Changer Device = /dev/sg0 + Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" +} + +Device { + Name = DDS-4 Media Type = DDS-4 Archive Device = /dev/nst0 # Normal archive device - Changer Device = /dev/sg0 # Generic SCSI device name + Autochanger = yes + LabelMedia = no; + AutomaticMount = yes; + AlwaysOpen = yes; + Mount Anonymous Volumes = no; +} +\end{verbatim} +\normalsize + +where you will adapt the {\bf Archive Device}, the {\bf Changer Device}, and +the path to the {\bf Changer Command} to correspond to the values used on your +system. + +\subsection*{A Multi-drive Example Configuration File} +\index[general]{Multi-drive Example Configuration File } +\addcontentsline{toc}{subsection}{A Multi-drive Example Configuration File} + +The following resources implement a multi-drive autochanger: + +\footnotesize +\begin{verbatim} +Autochanger { + Name = "Autochanger" + Device = Drive-1, Drive-2 + Changer Device = /dev/sg0 Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" +} + +Device { + Name = Drive-1 + Drive Index = 0 + Media Type = DDS-4 + Archive Device = /dev/nst0 # Normal archive device + Autochanger = yes + LabelMedia = no; + AutomaticMount = yes; + AlwaysOpen = yes; + Mount Anonymous Volumes = no; +} + +Device { + Name = Drive-2 + Drive Index = 1 + Media Type = DDS-4 + Archive Device = /dev/nst1 # Normal archive device Autochanger = yes LabelMedia = no; AutomaticMount = yes; AlwaysOpen = yes; Mount Anonymous Volumes = no; } + \end{verbatim} \normalsize @@ -305,12 +410,7 @@ where you will adapt the {\bf Archive Device}, the {\bf Changer Device}, and the path to the {\bf Changer Command} to correspond to the values used on your system. -The above {\bf Device} resource will work equally well for any standard tape -drive (with device name {\bf /dev/nst0}) since the extra autochanger commands -will not be used unless a {\bf slot} has been specified in the catalog record -for the Volume to be used. See below for more details on the {\bf slot}. \label{SpecifyingSlots} - \subsection*{Specifying Slots When Labeling} \index[general]{Specifying Slots When Labeling } \index[general]{Labeling!Specifying Slots When } @@ -318,9 +418,14 @@ for the Volume to be used. See below for more details on the {\bf slot}. If you add an {\bf Autochanger = yes} record to the Storage resource in your Director's configuration file, the Bacula Console will automatically prompt -you for the slot number and whether or not the Volume is in the changer when -you {\bf add} or {\bf label} tapes for that Storage device. You must also set -{\bf Autochanger = yes} in the Device resource as we have described above in +you for the slot number when the Volume is in the changer when +you {\bf add} or {\bf label} tapes for that Storage device. If your +{\bf mtx-changer} script is properly installed, Bacula will automatically +load the correct tape during the label command. + +You must also set +{\bf Autochanger = yes} in the Storage daemon's Device resource +as we have described above in order for the autochanger to be used. Please see the \ilink{Storage Resource}{Autochanger1} in the Director's chapter and the @@ -335,14 +440,18 @@ Even though all the above configuration statements are specified and correct, Bacula will attempt to access the autochanger only if a {\bf slot} is non-zero in the catalog Volume record (with the Volume name). -p>If your autochanger has barcode labels, you can label all the Volumes in +If your autochanger has barcode labels, you can label all the Volumes in your autochanger one after another by using the {\bf label barcodes} command. For each tape in the changer containing a barcode, Bacula will mount the tape and then label it with the same name as the barcode. An appropriate Media record will also be created in the catalog. Any barcode that begins with the -same characters as specified on the ``CleaningPrefix=xxx'' command, will be +same characters as specified on the "CleaningPrefix=xxx" command, will be treated as a cleaning tape, and will not be labeled. For example with: +Please note that Volumes must be pre-labeled to be automatically used in +the autochanger during a backup. If you do not have a barcode reader, this +is done manually (or via a script). + \footnotesize \begin{verbatim} Pool { @@ -353,7 +462,8 @@ Pool { \normalsize Any slot containing a barcode of CLNxxxx will be treated as a cleaning tape -and will not be mounted. +and will not be mounted. + \label{Magazines} \subsection*{Dealing with Multiple Magazines} @@ -362,7 +472,7 @@ and will not be mounted. \addcontentsline{toc}{subsection}{Dealing with Multiple Magazines} If you have several magazines or if you insert or remove cartridges from a -magazine, you will need to notify Bacula of this. By doing so, Bacula will as +magazine, you should notify Bacula of this. By doing so, Bacula will as a preference, use Volumes that it knows to be in the autochanger before accessing Volumes that are not in the autochanger. This prevents unneeded operator intervention. @@ -400,10 +510,10 @@ update slots scan \end{verbatim} \normalsize -command that will cause Bacula to read the label on each of the cartridges in -the magazine in turn and update the information (Slot, InChanger flag) in the -catalog. This is quite effective but does take time to load each cartridge -into the drive in turn and read the Volume label. + command that will cause Bacula to read the label on each of the cartridges in + the magazine in turn and update the information (Slot, InChanger flag) in the + catalog. This is quite effective but does take time to load each cartridge + into the drive in turn and read the Volume label. \item You can modify the mtx-changer script so that it simulates an autochanger with barcodes. See below for more details. \end{enumerate} @@ -474,7 +584,7 @@ update slots=n1,n2,n3-n4, ... where the keyword {\bf scan} can be appended or not. The n1,n2, ... represent Slot numbers to be updated and the form n3-n4 represents a range of Slot -numbers to be updates (e.g. 4-7 will update Slots 4,5,6, and 7). +numbers to be updated (e.g. 4-7 will update Slots 4,5,6, and 7). This form is particularly useful if you want to do a scan (time expensive) and restrict the update to one or two slots. @@ -513,7 +623,7 @@ the message is {\bf Device not configured}, this is because FreeBSD has made the tape device {\bf /dev/nsa1} disappear when there is no tape mounted in the autochanger slot. As a consequence, Bacula is unable to open the device. The solution to the problem is to make sure that some tape is loaded into the tape -drive before starting Bacula. This problem is correct in Bacula versions +drive before starting Bacula. This problem is corrected in Bacula versions 1.32f-5 and later. Please see the @@ -529,17 +639,17 @@ autochanger testing. mtx-changer Script} Before attempting to use the autochanger with Bacula, it is preferable to -``hand-test'' that the changer works. To do so, we suggest you do the +"hand-test" that the changer works. To do so, we suggest you do the following commands (assuming that the {\bf mtx-changer} script is installed in {\bf /etc/bacula/mtx-changer}): \begin{description} \item [Make sure Bacula is not running.] - \index[fd]{Make sure Bacula is not running. } + \index[sd]{Make sure Bacula is not running. } \item [/etc/bacula/mtx-changer \ /dev/sg0 \ list \ 0 \ /dev/nst0 \ 0] - \index[fd]{/etc/bacula/mtx-changer \ /dev/sg0 \ list \ 0 \ /dev/nst0 \ 0 + \index[sd]{/etc/bacula/mtx-changer \ /dev/sg0 \ list \ 0 \ /dev/nst0 \ 0 } This command should print: @@ -561,27 +671,27 @@ if {\bf /dev/sg0} is incorrect. For example, on FreeBSD systems, the autochanger SCSI control device is generally {\bf /dev/pass2}. \item [/etc/bacula/mtx-changer \ /dev/sg0 \ slots \ 0 \ /dev/nst0 \ 0] - \index[fd]{/etc/bacula/mtx-changer \ /dev/sg0 \ slots \ 0 \ /dev/nst0 \ 0 + \index[sd]{/etc/bacula/mtx-changer \ /dev/sg0 \ slots \ 0 \ /dev/nst0 \ 0 } This command should return the number of slots in your autochanger. \item [/etc/bacula/mtx-changer \ /dev/sg0 \ unload \ ] - \index[fd]{/etc/bacula/mtx-changer \ /dev/sg0 \ unload \ } + \index[sd]{/etc/bacula/mtx-changer \ /dev/sg0 \ unload \ } If a tape is loaded, this should cause it to be unloaded. \item [/etc/bacula/mtx-changer \ /dev/sg0 \ load \ 3 \ /dev/nst0 \ 0 ] - \index[fd]{/etc/bacula/mtx-changer \ /dev/sg0 \ load \ 3 \ /dev/nst0 \ 0 + \index[sd]{/etc/bacula/mtx-changer \ /dev/sg0 \ load \ 3 \ /dev/nst0 \ 0 } Assuming you have a tape in slot 3, it will be loaded into the read slot (0). \item [/etc/bacula/mtx-changer \ /dev/sg0 \ loaded \ 0 \ /dev/nst0 \ 0] - \index[fd]{/etc/bacula/mtx-changer \ /dev/sg0 \ loaded \ 0 \ /dev/nst0 \ + \index[sd]{/etc/bacula/mtx-changer \ /dev/sg0 \ loaded \ 0 \ /dev/nst0 \ 0 } -It should print ``3'' +It should print "3" \item [/etc/bacula/mtx-changer \ /dev/sg0 \ unload] - \index[fd]{/etc/bacula/mtx-changer \ /dev/sg0 \ unload } + \index[sd]{/etc/bacula/mtx-changer \ /dev/sg0 \ unload } \end{description} Once all the above commands work correctly, assuming that you have the right @@ -609,7 +719,7 @@ mt -f /dev/st0 weof \normalsize If the above script runs, you probably have no timing problems. If it does not -run, start by putting a {\bf sleep 30} or possibly a {\bf sleep 60} in the the +run, start by putting a {\bf sleep 30} or possibly a {\bf sleep 60} in the script just after the mtx-changer load command. If that works, then you should move the sleep into the actual {\bf mtx-changer} script so that it will be effective when Bacula runs. @@ -640,9 +750,10 @@ As noted earlier, there are several scripts in {\bf \lt{}bacula-source\gt{}/examples/devices} that implement the above features, so they may be a help to you in getting your script to work. -If Bacula complains ``Rewind error on /dev/nst0. ERR=Input/output error.'' you +If Bacula complains "Rewind error on /dev/nst0. ERR=Input/output error." you most likely need more sleep time in your {\bf mtx-changer} before returning to -Bacula after a load command has been completed. +Bacula after a load command has been completed. + \label{using} \subsection*{Using the Autochanger} @@ -666,7 +777,7 @@ with the Console program, enter the {\bf label} command: ./console Connecting to Director rufus:8101 1000 OK: rufus-dir Version: 1.26 (4 October 2002) -*{\bf label} +*label \end{verbatim} \normalsize @@ -678,7 +789,7 @@ Using default Catalog name=BackupDB DB=bacula The defined Storage resources are: 1: Autochanger 2: File -Select Storage resource (1-2): {\bf 1} +Select Storage resource (1-2): 1 \end{verbatim} \normalsize @@ -686,8 +797,8 @@ I select the autochanger (1), and it prints: \footnotesize \begin{verbatim} -Enter new Volume name: {\bf TestVolume1} -Enter slot (0 for none): {\bf 1} +Enter new Volume name: TestVolume1 +Enter slot (0 for none): 1 \end{verbatim} \normalsize @@ -699,7 +810,7 @@ slot. It then asks: Defined Pools: 1: Default 2: File -Select the Pool (1-2): {\bf 1} +Select the Pool (1-2): 1 \end{verbatim} \normalsize @@ -729,7 +840,7 @@ before loading the next volume to be labeled. Once all your Volumes are labeled, Bacula will automatically load them as they are needed. -To ``see'' how you have labeled your Volumes, simply enter the {\bf list +To "see" how you have labeled your Volumes, simply enter the {\bf list volumes} command from the Console program, which should print something like the following: @@ -740,7 +851,7 @@ Using default Catalog name=BackupDB DB=bacula Defined Pools: 1: Default 2: File -Select the Pool (1-2): {\bf 1} +Select the Pool (1-2): 1 +-------+----------+--------+---------+-------+--------+----------+-------+------+ | MedId | VolName | MedTyp | VolStat | Bites | LstWrt | VolReten | Recyc | Slot | +-------+----------+--------+---------+-------+--------+----------+-------+------+ @@ -760,7 +871,7 @@ Select the Pool (1-2): {\bf 1} \addcontentsline{toc}{subsection}{Barcode Support} Bacula provides barcode support with two Console commands, {\bf label -barcodes} and {\bf update slots}. +barcodes} and {\bf update slots}. The {\bf label barcodes} will cause Bacula to read the barcodes of all the cassettes that are currently installed in the magazine (cassette holder) using @@ -769,16 +880,17 @@ labeled with the same Volume name as the barcode. The {\bf update slots} command will first obtain the list of cassettes and their barcodes from {\bf mtx-changer}. Then it will find each volume in turn -in the catalog database corresponding to to the barcodes and set its Slot to +in the catalog database corresponding to the barcodes and set its Slot to correspond to the value just read. If the Volume is not in the catalog, then nothing will be done. This command is useful for synchronizing Bacula with the current magazine in case you have changed magazines or in case you have moved -cassettes from one slot to another. +cassettes from one slot to another. The {\bf Cleaning Prefix} statement can be used in the Pool resource to define a Volume name prefix, which if it matches that of the Volume (barcode) will cause that Volume to be marked with a VolStatus of {\bf Cleaning}. This will -prevent Bacula from attempting to write on the Volume. +prevent Bacula from attempting to write on the Volume. + \label{interface} \subsection*{Bacula Autochanger Interface} @@ -789,16 +901,16 @@ prevent Bacula from attempting to write on the Volume. Bacula calls the autochanger script that you specify on the {\bf Changer Device} statement. Normally this script will be the {\bf mtx-changer} script that we can provide, but it can in fact be any program. The only requirements -are that the ``commands'' that Bacula uses are {\bf loaded}, {\bf load}, {\bf -unload} and {\bf list} ({\bf slots} may be used in the future). In addition, +are that the "commands" that Bacula uses are {\bf loaded}, {\bf load}, {\bf +unload}, {\bf list}, and {\bf slots}. In addition, each of those commands must return the information in the precise format as specified below: \footnotesize \begin{verbatim} - Currently the changer commands used are: - loaded -- returns number of the slot that is loaded in - the drive or 0 if the drive is empty. + loaded -- returns number of the slot that is loaded, base 1, + in the drive or 0 if the drive is empty. load -- loads a specified slot (note, some autochangers require a 30 second pause after this command) into the drive. @@ -810,7 +922,6 @@ specified below: associated with the cassette if it exists and if you autoloader supports barcodes. Otherwise the barcode field is blank. -- Other changer commands defined but not yet used: slots -- returns total number of slots in the autochanger. \end{verbatim} \normalsize diff --git a/docs/manual-fr/bootstrap.tex b/docs/manual-fr/bootstrap.tex index e7f18ea1..e343b105 100644 --- a/docs/manual-fr/bootstrap.tex +++ b/docs/manual-fr/bootstrap.tex @@ -79,7 +79,7 @@ This allows the Storage daemon to know when to stop reading the Volume. \item [VolFile] \index[fd]{VolFile } The value is a file number, a list of file numbers, or a range of file -numbers numbers to match on the current Volume. The file number represents +numbers to match on the current Volume. The file number represents the physical file on the Volume where the data is stored. For a tape volume, this record is used to position to the correct starting file, and once the tape is past the last specified file, reading will stop. @@ -87,7 +87,7 @@ tape is past the last specified file, reading will stop. \item [VolBlock] \index[fd]{VolBlock } The value is a block number, a list of block numbers, or a range of block -numbers numbers to match on the current Volume. The block number represents +numbers to match on the current Volume. The block number represents the physical block on the Volume where the data is stored. This record is currently not used. diff --git a/docs/manual-fr/catmaintenance.tex b/docs/manual-fr/catmaintenance.tex index 35590839..b4f2708c 100644 --- a/docs/manual-fr/catmaintenance.tex +++ b/docs/manual-fr/catmaintenance.tex @@ -16,7 +16,7 @@ deleting old expired records (dates older than the Retention period), your database size will remain constant. If you started with the default configuration files, they already contain -reasonable defaults for a small number of machines (less that 5), so if you +reasonable defaults for a small number of machines (less than 5), so if you fall into that case, catalog maintenance will not be urgent if you have a few hundred megabytes of disk space free. Whatever the case may be, some knowledge of retention periods will be useful. @@ -43,41 +43,56 @@ of this manual. \index[dir]{File Retention } The File Retention record defines the length of time that Bacula will keep File records in the Catalog database. When this time period expires, and if -{\bf AutoPrune} is set to {\bf yes}, Bacula will prune (remove) File records +{\bf AutoPrune} is set to {\bf yes}, Bacula will prune (remove) File records that are older than the specified File Retention period. The pruning will occur at the end of a backup Job for the given Client. Note that the Client database record contains a copy of the File and Job retention periods, but Bacula uses the current values found in the Director's Client resource to do the pruning. -Retention periods are specified in seconds, but as a convenience, there are a -number of modifiers that permit easy specification in terms of minutes, -hours, days, weeks, months, quarters, or years on the record. See the -\ilink{ Configuration chapter}{Time} of this manual for -additional details of modifier specification. +Since File records in the database account for probably 80 percent of the +size of the database, you should carefully determine exactly what File +Retention period you need. Once the File records have been removed from +the database, you will no longer be able to restore individual files +in a Job. However, with Bacula version 1.37 and later, as long as the +Job record still exists, you will be able to restore all files in the +job. -The default is 60 days. +Retention periods are specified in seconds, but as a convenience, there are +a number of modifiers that permit easy specification in terms of minutes, +hours, days, weeks, months, quarters, or years on the record. See the +\ilink{ Configuration chapter}{Time} of this manual for additional details +of modifier specification. + +The default File retention period is 60 days. \item [Job Retention = \lt{}time-period-specification\gt{}] \index[dir]{Job Retention } - The Job Retention record defines the length of time that {\bf Bacula} will -keep Job records in the Catalog database. When this time period expires, and -if {\bf AutoPrune} is set to {\bf yes} Bacula will prune (remove) Job records -that are older than the specified File Retention period. Note, if a Job -record is selected for pruning, all associated File and JobMedia records -will also be pruned regardless of the File Retention period set. As a -consequence, you normally will set the File retention period to be less than -the Job retention period. - -The retention period is specified in seconds, but as a convenience, there are -a number of modifiers that permit easy specification in terms of minutes, -hours, days, weeks, months, quarters, or years. See the -\ilink{ Configuration chapter}{Time} of this manual for -additional details of modifier specification. - -The default is 180 days. - -\item [AutoPrune = \lt{}yes|no\gt{}] + The Job Retention record defines the length of time that {\bf Bacula} +will keep Job records in the Catalog database. When this time period +expires, and if {\bf AutoPrune} is set to {\bf yes} Bacula will prune +(remove) Job records that are older than the specified Job Retention +period. Note, if a Job record is selected for pruning, all associated File +and JobMedia records will also be pruned regardless of the File Retention +period set. As a consequence, you normally will set the File retention +period to be less than the Job retention period. + +As mentioned above, once the File records are removed from the database, +you will no longer be able to restore individual files from the Job. +However, as long as the Job record remains in the database, you will be +able to restore all the files backuped for the Job (on version 1.37 and +later). As a consequence, it is generally a good idea to retain the Job +records much longer than the File records. + +The retention period is specified in seconds, but as a convenience, there +are a number of modifiers that permit easy specification in terms of +minutes, hours, days, weeks, months, quarters, or years. See the \ilink{ +Configuration chapter}{Time} of this manual for additional details of +modifier specification. + +The default Job Retention period is 180 days. + +\item [AutoPrune = \lt{}yes/no\gt{}] \index[dir]{AutoPrune } If AutoPrune is set to {\bf yes} (default), Bacula will automatically apply the File retention period and the Job retention period for the Client at the @@ -106,7 +121,7 @@ explore the utility of the {\bf OPTIMIZE TABLE} command in MySQL. All database programs have some means of writing the database out in ASCII format and then reloading it. Doing so will re-create the database from scratch producing a compacted result, so below, we show you how you can do -this for both MySQL and SQLite. +this for MySQL, PostgreSQL and SQLite. For a {\bf MySQL} database, you could write the Bacula database as an ASCII file (bacula.sql) then reload it by doing the following: @@ -158,9 +173,9 @@ http://www.mysql.com/doc/en/Repair.html} If the errors you are getting are simply SQL warnings, then you might try running dbcheck before (or possibly after) using the MySQL database repair -program. It can clean up many of the orphanned record problems, and certain +program. It can clean up many of the orphaned record problems, and certain other inconsistencies in the Bacula database. -\label{ReparingPSQL} +\label{RepairingPSQL} \subsection*{Repairing Your PostgreSQL Database} \index[general]{Database!Repairing Your PostgreSQL } @@ -173,6 +188,50 @@ consider using Bacula's dbcheck program if the conditions are reasonable for using (see above). \label{CompactingPostgres} +\subsection*{Performance Issues} +\index[general]{Database Performance Issues} +\index[general]{Performance!Database} +\addcontentsline{toc}{subsection}{Database Performance Issues} + +There are a considerable number of ways each of the databases can be +tuned to improve the performance. Going from an untuned database to one +that is properly tuned can make a difference of a factor of 100 or more +in the time to insert or search for records. + +For each of the databases, you may get significant improvements by adding +additional indexes. The comments in the Bacula make_xxx_tables give some +indications as to what indexes may be appropriate. + +For MySQL, what seems to be very important is to use the examine the +my.cnf file. You may obtain significant performances by switching to +the my-large.cnf or my-huge.cnf files that come with the MySQL source +code. + +For SQLite3, one significant factor in improving the performance is +to ensure that there is a "PRAGMA synchronous = NORMAL;" statement. +This reduces the number of times that the database flushes the in memory +cache to disk. There are other settings for this PRAGMA that can +give even further performance improvements at the risk of a database +corruption if your system crashes. + +For PostgreSQL, you might want to consider turning fsync off. Of course +doing so can cause corrupted databases in the even of a machine crash. +There are many different ways that you can tune PostgreSQL, the +following document discusses a few of them: +\elink{ +http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html} +{http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html}. + +There is also a PostgreSQL FAQ question number 3.3 that may +answer some of your questions about how to improve performance +of the PostgreSQL engine: +\elink{ +http://www.postgresql.org/docs/faqs.FAQ.html#3.3} +{http://www.postgresql.org/docs/faqs.FAQ.html#3.3}. + + + + \subsection*{Compacting Your PostgreSQL Database} \index[general]{Database!Compacting Your PostgreSQL } \index[general]{Compacting Your PostgreSQL Database } @@ -216,7 +275,7 @@ command for compacting the database. \footnotesize \begin{verbatim} cd {\bf working-directory} -echo 'vacuum' | sqlite bacula.db +echo 'vacuum;' | sqlite bacula.db \end{verbatim} \normalsize @@ -246,35 +305,35 @@ version. You may begin using Bacula with SQLite then later find that you want to switch to MySQL for any of a number of reasons: SQLite tends to use more disk than MySQL, SQLite apparently does not handle database sizes greater than 2GBytes, -... Several users have done so by first producing an ASCII ``dump'' of the +... Several users have done so by first producing an ASCII "dump" of the SQLite database, then creating the MySQL tables with the {\bf create\_mysql\_tables} script that comes with Bacula, and finally feeding the SQLite dump into MySQL using the {\bf -f} command line option to continue past the errors that are generated by the DDL statements that SQLite's dump creates. Of course, you could edit the dump and remove the offending statements. Otherwise, MySQL accepts the SQL produced by SQLite. -\label{BackingUpBacula} +\label{BackingUpBacula} \subsection*{Backing Up Your Bacula Database} \index[general]{Backing Up Your Bacula Database } \index[general]{Database!Backing Up Your Bacula } \addcontentsline{toc}{subsection}{Backing Up Your Bacula Database} -If ever the machine on which you Bacula database crashes, and you need to +If ever the machine on which your Bacula database crashes, and you need to restore from backup tapes, one of your first priorities will probably be to recover the database. Although Bacula will happily backup your catalog database if it is specified in the FileSet, this is not a very good way to do -it because the database will be saved while Bacula is modifying it. Thus the -database may be in and instable state. Worse yet, you will backup the database +it, because the database will be saved while Bacula is modifying it. Thus the +database may be in an instable state. Worse yet, you will backup the database before all the Bacula updates have been applied. -To resolve these problems, you need backup the database after all the backup +To resolve these problems, you need to backup the database after all the backup jobs have been run. In addition, you will want to make a copy while Bacula is not modifying it. To do so, you can use two scripts provided in the release {\bf make\_catalog\_backup} and {\bf delete\_catalog\_backup}. These files will be automatically generated along with all the other Bacula scripts. The first script will make an ASCII copy of your Bacula database into {\bf -bacula.sql} in the working directory you specified on your configuration, and +bacula.sql} in the working directory you specified in your configuration, and the second will delete the {\bf bacula.sql} file. The basic sequence of events to make this work correctly is as follows: @@ -306,6 +365,7 @@ Job { Pool = Default RunBeforeJob = "/home/kern/bacula/bin/make_catalog_backup" RunAfterJob = "/home/kern/bacula/bin/delete_catalog_backup" + Write Bootstrap = "/home/kern/bacula/working/BackupCatalog.bsr" } # This schedule does the catalog. It starts after the WeeklyCycle Schedule { @@ -322,8 +382,13 @@ FileSet { \end{verbatim} \normalsize -\label{BackingUPOtherDBs} +Be sure to write a bootstrap file as in the above example. It is preferable +to write or copy the bootstrap file to another computer. It will allow +you to quickly recover the database backup should that be necessary. If +you do not have a bootstrap file, it is still possible to recover your +database backup, but it will be more work and take longer. +\label{BackingUPOtherDBs} \subsection*{Backing Up Third Party Databases} \index[general]{Backing Up Third Party Databases } \index[general]{Databases!Backing Up Third Party } diff --git a/docs/manual-fr/console.tex b/docs/manual-fr/console.tex index dc8bf058..6b68dfc6 100644 --- a/docs/manual-fr/console.tex +++ b/docs/manual-fr/console.tex @@ -2,13 +2,15 @@ %% \section*{Bacula Console} -\label{_ChapterStart23} +\label{_ConsoleChapter} \index[general]{Console!Bacula } \index[general]{Bacula Console } +\index[console]{Console!Bacula } +\index[console]{Bacula Console } \addcontentsline{toc}{section}{Bacula Console} \subsection*{General} -\index[general]{General } +\index[general]{General} \addcontentsline{toc}{subsection}{General} The {\bf Bacula Console} (sometimes called the User Agent) is a program that @@ -23,9 +25,9 @@ manipulations with the Console program. In addition, there is a wx-console built with wxWidgets that allows a graphic restore of files. As of version 1.34.1 it is in an early stage of development, -but it quite useful. +but it already is quite useful. -Since the Console program interacts with the Director by the network, your +Since the Console program interacts with the Director through the network, your Console and Director programs do not necessarily need to run on the same machine. @@ -34,9 +36,12 @@ for Bacula to be able to write on more than one tape, because when Bacula requests a new tape, it waits until the user, via the Console program, indicates that the new tape is mounted. -\subsection*{Configuration} -\index[general]{Configuration } -\addcontentsline{toc}{subsection}{Configuration} +\subsection*{Console Configuration} +\index[general]{Console Configuration} +\index[general]{Configuration!Console} +\index[console]{Console Configuration} +\index[console]{Configuration!Console} +\addcontentsline{toc}{subsection}{Console Configuration} When the Console starts, it reads a standard Bacula configuration file named {\bf bconsole.conf} or {\bf gnome-console.conf} in the case of the GNOME @@ -50,6 +55,8 @@ this document. \subsection*{Running the Console Program} \index[general]{Running the Console Program } \index[general]{Program!Running the Console } +\index[console]{Running the Console Program } +\index[console]{Program!Running the Console } \addcontentsline{toc}{subsection}{Running the Console Program} After launching the Console program (bconsole), it will prompt you for the @@ -95,6 +102,8 @@ will display all the Pool resource records. \subsection*{Stopping the Console Program} \index[general]{Program!Stopping the Console } \index[general]{Stopping the Console Program } +\index[console]{Program!Stopping the Console } +\index[console]{Stopping the Console Program } \addcontentsline{toc}{subsection}{Stopping the Console Program} Normally, you simply enter {\bf quit} or {\bf exit} and the Console program @@ -104,7 +113,7 @@ some time. If you want to immediately terminate the Console program, enter the {\bf .quit} command. There is currently no way to interrupt a Console command once issued (i.e. -ctl-C does not work). However, if you are at a prompt that is asking you to +Ctrl-C does not work). However, if you are at a prompt that is asking you to select one of several possibilities and you would like to abort the command, you can enter a period ({\bf .}), and in most cases, you will either be returned to the main command prompt or if appropriate the previous prompt (in @@ -116,15 +125,16 @@ will most likely be able to cancel at the next prompt. \subsection*{Alphabetic List of Console Commands} \index[general]{Commands!Alphabetic List of Console } \index[general]{Alphabetic List of Console Commands } +\index[console]{Commands!Alphabetic List of Console } +\index[console]{Alphabetic List of Console Commands } \addcontentsline{toc}{subsection}{Alphabetic List of Console Commands} The following commands are currently implemented: \begin{description} - \item [{add [pool=\lt{}pool-name\gt{} storage=\lt{}storage\gt{} - jobid=\lt{}JobId\gt{}] }] - \index[console]{add [pool } + jobid=\lt{}JobId\gt{}]} ] + \index[console]{add} This command is used to add Volumes to an existing Pool. The Volume names entered are placed in the Catalog and thus become available for backup operations. Normally, the {\bf label} command is used rather than this @@ -138,74 +148,77 @@ if you are importing a tape from another site. Please see the {\bf label} command below for the list of legal characters in a Volume name. \item [autodisplay on/off] - \index[console]{autodisplay on/off } - This command accepts {\bf on} or {\bf off} as an argument, and turns -auto-display of messages on or off respectively. The default for the console -program is {\bf off}, which means that you will be notified when there are -console messages pending, but they will not automatically be displayed. The -default for the gnome-console program is {\bf on}, which means that messages -will be displayed when they are received (usually within 5 seconds of them -being generated). - -When autodisplay is turned off, you must explicitly retrieve the messages -with the {\bf messages} command. When autodisplay is turned on, the messages -will be displayed on the console as they are received. + \index[console]{autodisplay on/off} + This command accepts {\bf on} or {\bf off} as an argument, and turns + auto-display of messages on or off respectively. The default for the + console program is {\bf off}, which means that you will be notified when + there are console messages pending, but they will not automatically be + displayed. The default for the gnome-console program is {\bf on}, which + means that messages will be displayed when they are received (usually + within 5 seconds of them being generated). + + When autodisplay is turned off, you must explicitly retrieve the + messages with the {\bf messages} command. When autodisplay is turned + on, the messages will be displayed on the console as they are received. \item [automount on/off] - \index[console]{automount on/off } - This command accepts {\bf on} or {\bf off} as the argument, and turns -auto-mounting of the tape after a {\bf label} command on or off respectively. -The default is {\bf on}. If {\bf automount} is turned off, you must -explicitly {\bf mount} the tape after a label command to use it. + \index[console]{automount on/off} + This command accepts {\bf on} or {\bf off} as the argument, and turns + auto-mounting of the tape after a {\bf label} command on or off + respectively. The default is {\bf on}. If {\bf automount} is turned + off, you must explicitly {\bf mount} the tape after a label command to + use it. \item [{cancel [jobid=\lt{}number\gt{} job=\lt{}job-name\gt{}]}] - \index[console]{cancel [jobid } - This command is used to cancel a job and accepts {\bf jobid=nnn} or {\bf -job=xxx} as an argument where nnn is replaced by the JobId and xxx is -replaced by the job name. If you do not specify a keyword, the Console -program will prompt you with the names of all the active jobs allowing you to -choose one. - -Once a Job is marked to be canceled, it may take a bit of time (generally -within a minute) before it actually terminates, depending on what operations -it is doing. - -\item [{create [pool=\lt{}pool-name\gt{}]}] - \index[console]{create [pool } - This command is used to create a Pool record in the database using the Pool -resource record defined in the Director's configuration file. So in a sense, -this command simply transfers the information from the Pool resource in the -configuration file into the Catalog. Normally this command is done -automatically for you when the Director starts providing the Pool is -referenced within a Job resource. If you use this command on an existing -Pool, it will automatically update the Catalog to have the same information -as the Pool resource. After creating a Pool, you will most likely use the -{\bf label} command to label one or more volumes and add their names to the -Media database. - -When starting a Job, if Bacula determines that there is no Pool record in the -database, but there is a Pool resource of the appropriate name, it will -create it for you. If you want the Pool record to appear in the database -immediately, simply use this command to force it to be created. - -\item [{delete [volume=\lt{}vol-name\gt{} pool=\lt{}pool-name\gt{} job + \index[console]{cancel jobid} + This command is used to cancel a job and accepts {\bf jobid=nnn} or {\bf + job=xxx} as an argument where nnn is replaced by the JobId and xxx is + replaced by the job name. If you do not specify a keyword, the Console + program will prompt you with the names of all the active jobs allowing + you to choose one. + + Once a Job is marked to be canceled, it may take a bit of time + (generally within a minute) before it actually terminates, depending on + what operations it is doing. + +\item [{ create [pool=\lt{}pool-name\gt{}]}] + \index[console]{create pool} + This command is used to create a Pool record in the database using the + Pool resource record defined in the Director's configuration file. So + in a sense, this command simply transfers the information from the Pool + resource in the configuration file into the Catalog. Normally this + command is done automatically for you when the Director starts providing + the Pool is referenced within a Job resource. If you use this command + on an existing Pool, it will automatically update the Catalog to have + the same information as the Pool resource. After creating a Pool, you + will most likely use the {\bf label} command to label one or more + volumes and add their names to the Media database. + + When starting a Job, if Bacula determines that there is no Pool record + in the database, but there is a Pool resource of the appropriate name, + it will create it for you. If you want the Pool record to appear in the + database immediately, simply use this command to force it to be created. + +\item [{ delete [volume=\lt{}vol-name\gt{} pool=\lt{}pool-name\gt{} job jobid=\lt{}id\gt{}] }] - \index[fd]{delete [volume } -The delete command is used to delete a Volume, Pool or Job record from the -Catalog as well as all associated Volume records that were created. This -command operates only on the Catalog database and has no effect on the actual -data written to a Volume. This command can be dangerous and we strongly -recommend that you do not use it unless you know what you are doing. - -If the keyword {\bf Volume} appears on the command line, the named Volume -will be deleted from the catalog, if the keyword {\bf Pool} appears on the -command line, a Pool will be deleted, and if the keyword {\bf Job} appears on -the command line, a Job and all its associated records (File and JobMedia) -will be deleted from the catalog. The full form of this command is: + \index[console]{delete} + The delete command is used to delete a Volume, Pool or Job record from + the Catalog as well as all associated catalog Volume records that were + created. This command operates only on the Catalog database and has no + effect on the actual data written to a Volume. This command can be + dangerous and we strongly recommend that you do not use it unless you + know what you are doing. + + If the keyword {\bf Volume} appears on the command line, the named + Volume will be deleted from the catalog, if the keyword {\bf Pool} + appears on the command line, a Pool will be deleted, and if the keyword + {\bf Job} appears on the command line, a Job and all its associated + records (File and JobMedia) will be deleted from the catalog. The full + form of this command is: delete pool=\lt{}pool-name\gt{} -or + or delete volume=\lt{}volume-name\gt{} pool=\lt{}pool-name\gt{} or @@ -213,36 +226,39 @@ delete JobId=\lt{}job-id\gt{} JobId=\lt{}job-id2\gt{} ... or delete Job JobId=n,m,o-r,t ... -The first form deletes a Pool record from the catalog database. The second -form deletes a Volume record from the specified pool in the catalog database. -The third form delete the specified Job record from the catalog database. -The last form deletes JobId records for JobIds n,m,o,p, q,r, and t. When each -one of the n,m,... is, of course, a number. -\label{estimate} + The first form deletes a Pool record from the catalog database. The + second form deletes a Volume record from the specified pool in the + catalog database. The third form deletes the specified Job record from + the catalog database. The last form deletes JobId records for JobIds + n,m,o,p, q,r, and t. Where each one of the n,m,... is, of course, a + number. +\label{estimate} \item [estimate] - \index[fd]{estimate } - Using this command, you can get an idea how many files will be backed up, or -if you are unsure about your Include statements in your FileSet, you can test -them without doing an actual backup. The default is to assume a Full backup. -However, you can override this by specifying a {\bf level=Incremental} or -{\bf level=Differential} on the command line. A Job name must be specified -or you will be prompted for one, and optionally a Client and FileSet may be -specified on the command line. It then contacts the client which computes -the number of files and bytes that would be backed up. Please note that this -is an estimated calculated from the number of blocks in the file rather than -by reading the actual bytes. As such, the estimated backup size will -generally be larger than an actual backup. - -Optionally you may specify the keyword {\bf listing} in which case, all the -files to be backed up will be listed. Note, it could take quite some time to -display them if the backup is large. The full form is: + \index[console]{estimate} + Using this command, you can get an idea how many files will be backed + up, or if you are unsure about your Include statements in your FileSet, + you can test them without doing an actual backup. The default is to + assume a Full backup. However, you can override this by specifying a + {\bf level=Incremental} or {\bf level=Differential} on the command line. + A Job name must be specified or you will be prompted for one, and + optionally a Client and FileSet may be specified on the command line. + It then contacts the client which computes the number of files and bytes + that would be backed up. Please note that this is an estimate + calculated from the number of blocks in the file rather than by reading + the actual bytes. As such, the estimated backup size will generally be + larger than an actual backup. + + Optionally you may specify the keyword {\bf listing} in which case, all the + files to be backed up will be listed. Note, it could take quite some time to + display them if the backup is large. The full form is: estimate job=\lt{}job-name\gt{} listing client=\lt{}client-name\gt{} fileset=\lt{}fileset-name\gt{} level=\lt{}level-name\gt{} -Specification of the {\bf job} is sufficient, but you can also override the -client, fileset and/or level by specifying them on the estimate command line. + Specification of the {\bf job} is sufficient, but you can also override + the client, fileset and/or level by specifying them on the estimate + command line. As an example, you might do: @@ -252,7 +268,6 @@ As an example, you might do: @output /tmp/listing estimate job=NightlySave listing level=Incremental @output - \end{verbatim} \normalsize @@ -261,33 +276,37 @@ NightlySave} during an Incremental save and put it in the file {\bf /tmp/listing}. \item [help] - \index[fd]{help } + \index[console]{help} This command displays the list of commands available. \item [label] - \index[fd]{label } + \index[console]{label} + \index[console]{relabel} + \index[general]{label} + \index[general]{relabel} This command is used to label physical volumes. The full form of this command -is: + is: label storage=\lt{}storage-name\gt{} volume=\lt{}volume-name\gt{} slot=\lt{}slot\gt{} -If you leave out any part, you will be prompted for it. The media type is -automatically taken from the Storage resource definition that you supply. -Once the necessary information is obtained, the Console program contacts the -specified Storage daemon and requests that the tape be labeled. If the tape -labeling is successful, the Console program will create a Volume record in -the appropriate Pool. + If you leave out any part, you will be prompted for it. The media type + is automatically taken from the Storage resource definition that you + supply. Once the necessary information is obtained, the Console program + contacts the specified Storage daemon and requests that the tape be + labeled. If the tape labeling is successful, the Console program will + create a Volume record in the appropriate Pool. -The Volume name is restricted to letters, numbers, and the special characters -hyphen ({\bf -}), underscore ({\bf \_}), colon ({\bf :}), and period ({\bf -.}). All other characters including a space are illegal. This restriction is -to ensure good readability of Volume names to reduce operator errors. + The Volume name is restricted to letters, numbers, and the special + characters hyphen ({\bf -}), underscore ({\bf \_}), colon ({\bf :}), and + period ({\bf .}). All other characters including a space are illegal. + This restriction is to ensure good readability of Volume names to reduce + operator errors. -Please note, when labeling a blank tape, Bacula will get read I/O error when -it attempts to ensure that the tape is already labeled. If you wish to avoid -getting these messages, please write and EOF mark on your tape before -attempting to label it: + Please note, when labeling a blank tape, Bacula will get {\bf read I/O + error} when it attempts to ensure that the tape is already labeled. If + you wish to avoid getting these messages, please write and EOF mark on + your tape before attempting to label it: \footnotesize \begin{verbatim} @@ -305,12 +324,12 @@ The label command can fail for a number of reasons: case you must {\bf unmount} the device, insert a blank tape, then do the {\bf label} command. \item The tape in the device is already a Bacula labeled tape. (Bacula will - never relabel a Bacula labeled tape unless it is recycled and you use the + never relabel a Bacula labeled tape unless it is recycled and you use the {\bf relabel} command). \item There is no tape in the drive. - \end{enumerate} +\end{enumerate} -There are two ways to relabel a volume that already has a Bacula label. The +There are two ways to relabel a volume that already has a Bacula label. The brute force method is to write an end of file mark on the tape using the system {\bf mt} program, something like the following: @@ -318,7 +337,6 @@ system {\bf mt} program, something like the following: \begin{verbatim} mt -f /dev/st0 rewind mt -f /dev/st0 weof - \end{verbatim} \normalsize @@ -334,8 +352,11 @@ autochanger one after another by using the {\bf label barcodes} command. For each tape in the changer containing a barcode, Bacula will mount the tape and then label it with the same name as the barcode. An appropriate Media record will also be created in the catalog. Any barcode that begins with the same -characters as specified on the ``CleaningPrefix=xxx'' command, will be -treated as a cleaning tape, and will not be labeled. For example with: +characters as specified on the "CleaningPrefix=xxx" directive in the +Director's Pool resource, will be +treated as a cleaning tape, and will not be labeled. However, +an entry for the cleaning tape will be created in +the catalog. For example with: \footnotesize \begin{verbatim} @@ -352,72 +373,79 @@ and will not be mounted. Note, the full form of the command is: \footnotesize \begin{verbatim} - update storage=xxx pool=yyy slots=1-5,10 barcodes \end{verbatim} \normalsize \item [list] - \index[fd]{list } - The list command lists the requested contents of the Catalog. The various -fields of each record are listed on a single line. If there The various forms -of the list command are: - -list jobs - -list jobid=\lt{}id\gt{} - -list job=\lt{}job-name\gt{} - -list jobmedia - -list jobmedia jobid=\lt{}id\gt{} - -list jobmedia job=\lt{}job-name\gt{} - -list files jobid=\lt{}id\gt{} - -list files job=\lt{}job-name\gt{} - -list pools - -list clients - -list jobtotals - -list volumes - -list volumes jobid=\lt{}id\gt{} - -list volumes pool=\lt{}pool-name\gt{} - -list volumes job=\lt{}job-name\gt{} - -list volume=\lt{}volume-name\gt{} list nextvolume job=\lt{}job-name\gt{} - -list nextvol job=\lt{}job-name\gt{} - -What most of the above commands do should be more or less obvious. In general -if you do not specify all the command line arguments, the command will prompt -you for what is needed. - -The {\bf list nextvol} command will print the Volume name to be used by the -specified job. You should be aware that exactly what Volume will be used -depends on a lot of factors including the time and what a prior job will do. -It may fill a tape that is not full when you issue this command. As a -consequence, this command will give you a good estimate of what Volume will -be used but not a definitive answer. In addition, this command may have -certain side effect because it runs through the same algorithm as a job, -which means it may automatically purge or recycle a Volume. + \index[console]{list} + The list command lists the requested contents of the Catalog. The + various fields of each record are listed on a single line. The various + forms of the list command are: +\footnotesize +\begin{verbatim} + list jobs + + list jobid=\lt{}id\gt{} + + list job=\lt{}job-name\gt{} + + list jobmedia + + list jobmedia jobid=\lt{}id\gt{} + + list jobmedia job=\lt{}job-name\gt{} + + list files jobid=\lt{}id\gt{} + + list files job=\lt{}job-name\gt{} + + list pools + + list clients + + list jobtotals + + list volumes + + list volumes jobid=\lt{}id\gt{} + + list volumes pool=\lt{}pool-name\gt{} + + list volumes job=\lt{}job-name\gt{} + + list volume=\lt{}volume-name\gt{} + + list nextvolume job=\lt{}job-name\gt{} + + list nextvol job=\lt{}job-name\gt{} -If you wish to add specialized commands that list the contents of the -catalog, you can do so by adding them to the {\bf query.sql} file. However, -this takes some knowledge of programming SQL. Please see the {\bf query} -command below for additional information. See below for listing the full -contents of a catalog record with the {\bf llist} command. +\end{verbatim} +\normalsize -As an example, the command {\bf list pools} might produce the following -output: + What most of the above commands do should be more or less obvious. In + general if you do not specify all the command line arguments, the + command will prompt you for what is needed. + + The {\bf list nextvol} command will print the Volume name to be used by + the specified job. You should be aware that exactly what Volume will be + used depends on a lot of factors including the time and what a prior job + will do. It may fill a tape that is not full when you issue this + command. As a consequence, this command will give you a good estimate + of what Volume will be used but not a definitive answer. In addition, + this command may have certain side effect because it runs through the + same algorithm as a job, which means it may automatically purge or + recycle a Volume. + + If you wish to add specialized commands that list the contents of the + catalog, you can do so by adding them to the {\bf query.sql} file. + However, this takes some knowledge of programming SQL. Please see the + {\bf query} command below for additional information. See below for + listing the full contents of a catalog record with the {\bf llist} + command. + + As an example, the command {\bf list pools} might produce the following + output: \footnotesize \begin{verbatim} @@ -430,31 +458,32 @@ output: \end{verbatim} \normalsize -As mentioned above, the {\bf list} command lists what is in the database. -Some things are put into the database immediately when Bacula starts up, but -in general, most things are put in only when they are first used, which is -the case for a Client as with Job records, etc. + As mentioned above, the {\bf list} command lists what is in the + database. Some things are put into the database immediately when Bacula + starts up, but in general, most things are put in only when they are + first used, which is the case for a Client as with Job records, etc. -Bacula should create a client record in the database the first time you run a -job for that client. Doing a {\bf status} will not cause a database record to -be created. The client database record will be created whether or not job -fails, but it must at least start. When the Client is actually contacted, -additional info from the client will be added to the client record (a ``uname --a'' output). + Bacula should create a client record in the database the first time you + run a job for that client. Doing a {\bf status} will not cause a + database record to be created. The client database record will be + created whether or not the job fails, but it must at least start. When + the Client is actually contacted, additional info from the client will + be added to the client record (a "uname -a" output). -If you want to see what Client resources you have available in your conf -file, you use the Console command {\bf show clients}. + If you want to see what Client resources you have available in your conf + file, you use the Console command {\bf show clients}. \item [llist] - \index[fd]{llist } - The llist or ``long list'' command takes all the same arguments that the list -command described above does. The difference is that the llist command list -the full contents of each database record selected. It does so by listing the -various fields of the record vertically, with one field per line. It is -possible to produce a very large number of output lines with this command. + \index[console]{llist} + The llist or "long list" command takes all the same arguments that the + list command described above does. The difference is that the llist + command list the full contents of each database record selected. It + does so by listing the various fields of the record vertically, with one + field per line. It is possible to produce a very large number of output + lines with this command. -If instead of the {\bf list pools} as in the example above, you enter {\bf -llist pools} you might get the following output: + If instead of the {\bf list pools} as in the example above, you enter + {\bf llist pools} you might get the following output: \footnotesize \begin{verbatim} @@ -493,57 +522,71 @@ llist pools} you might get the following output: \normalsize \item [messages] - \index[fd]{messages } + \index[console]{messages} This command causes any pending console messages to be immediately displayed. \item [mount] - \index[console]{mount } - The mount command is used to get Bacula to read a volume on a physical -device. It is a way to tell Bacula that you have mounted a tape and that -Bacula should examine the tape. This command is used only after there was no -Volume in a drive and Bacula requests you to mount a new Volume or when you -have specifically unmounted a Volume with the {\bf unmount} console command, -which causes Bacula to close the drive. If you have an autoloader, the mount -command will not cause Bacula to operate the autoloader. The various forms of -the mount command are: + \index[console]{mount} + The mount command is used to get Bacula to read a volume on a physical + device. It is a way to tell Bacula that you have mounted a tape and + that Bacula should examine the tape. This command is used only after + there was no Volume in a drive and Bacula requests you to mount a new + Volume or when you have specifically unmounted a Volume with the {\bf + unmount} console command, which causes Bacula to close the drive. If + you have an autoloader, the mount command will not cause Bacula to + operate the autoloader. The various forms of the mount command are: mount storage=\lt{}storage-name\gt{} mount [ jobid=\lt{}id\gt{} | job=\lt{}job-name\gt{} ] -If you have specified {\bf Automatic Mount = yes} in the Storage daemon's -Device resource, under most circumstances, Bacula will automatically access -the Volume unless you have explicitly {\bf unmount}ed it in the Console -program. -\label{ManualPruning} + If you have specified {\bf Automatic Mount = yes} in the Storage daemon's + Device resource, under most circumstances, Bacula will automatically access + the Volume unless you have explicitly {\bf unmount}ed it in the Console + program. + +\item[python] + \index[console]{python} + The python command takes a single argument {\bf restart}: + +python restart + This causes the Python interpreter in the Director to be reinitialized. + This can be helpful for testing because once the Director starts and the + Python interpreter is initialized, there is no other way to make it + accept any changes to the startup script {\bf DirStartUp.py}. For more + details on Python scripting, please see the \ilink{Python + Scripting}{_ChapterStart60} chapter of this manual. + +\label{ManualPruning} \item [prune] - \index[console]{prune } - The Prune command allows you to safely remove expired database records from -Jobs and Volumes. This command works only on the Catalog database and does -not affect data written to Volumes. In all cases, the Prune command applies -a retention period to the specified records. You can Prune expired File -entries from Job records; you can Prune expired Job records from the -database, and you can Prune both expired Job and File records from specified -Volumes. + \index[console]{prune} + The Prune command allows you to safely remove expired database records + from Jobs and Volumes. This command works only on the Catalog database + and does not affect data written to Volumes. In all cases, the Prune + command applies a retention period to the specified records. You can + Prune expired File entries from Job records; you can Prune expired Job + records from the database, and you can Prune both expired Job and File + records from specified Volumes. prune files|jobs|volume client=\lt{}client-name\gt{} volume=\lt{}volume-name\gt{} -For a Volume to be pruned, the {\bf VolStatus} must be Full, Used, or Append, -otherwise the pruning will not take place. + For a Volume to be pruned, the {\bf VolStatus} must be Full, Used, or + Append, otherwise the pruning will not take place. \item [purge] - \index[console]{purge } - The Purge command will delete associated Catalog database records from Jobs -and Volumes without considering the retention period. {\bf Purge} works only -on the Catalog database and does not affect data written to Volumes. This -command can be dangerous because you can delete catalog records associated -with current backups of files, and we recommend that you do not use it -unless you know what you are doing. The permitted forms of {\bf purge} are: -purge files -jobid=\lt{}jobid\gt{}|job=\lt{}job-name\gt{}|client=\lt{}client-name\gt{} + \index[console]{purge} + The Purge command will delete associated Catalog database records from + Jobs and Volumes without considering the retention period. {\bf Purge} + works only on the Catalog database and does not affect data written to + Volumes. This command can be dangerous because you can delete catalog + records associated with current backups of files, and we recommend that + you do not use it unless you know what you are doing. The permitted + forms of {\bf purge} are: + +purge files jobid=\lt{}jobid\gt{}|job=\lt{}job-name\gt{}|client=\lt{}client-name\gt{} purge jobs client=\lt{}client-name\gt{} (of all jobs) @@ -555,77 +598,104 @@ For the {\bf purge} command to work on Volume Catalog database records the The actual data written to the Volume will be unaffected by this command. \item [relabel] - \index[console]{relabel } - This command is used to label physical volumes. The full form of this command -is: - -relabel storage=\lt{}storage-name\gt{} volume=\lt{}newvolume-name\gt{} -name=\lt{}old-volume-name\gt{} + \index[console]{relabel} + \index[general]{relabel} + This command is used to label physical volumes. The full form of this + command is: -If you leave out any part, you will be prompted for it. In order for the -Volume (old-volume-name) to be relabeled, it must be in the catalog, and the -volume status must be marked {\bf Purged} or {\bf Recycle}. This happens -automatically as a result of applying retention periods, or you may -explicitly purge the volume using the {\bf purge} command. +relabel storage=\lt{}storage-name\gt{} oldvolume=\lt{}old-volume-name\gt{} + volume=\lt{}newvolume-name\gt{} + + If you leave out any part, you will be prompted for it. In order for + the Volume (old-volume-name) to be relabeled, it must be in the catalog, + and the volume status must be marked {\bf Purged} or {\bf Recycle}. + This happens automatically as a result of applying retention periods, or + you may explicitly purge the volume using the {\bf purge} command. -Once the volume is physically relabeled, the old data written on the Volume -is lost and cannot be recovered. + Once the volume is physically relabeled, the old data previously written + on the Volume is lost and cannot be recovered. \item [release] - \index[console]{release } - This command is used to cause the Storage daemon to rewind (release) the -current tape in the drive, and to re-read the Volume label the next time the -tape is used. + \index[console]{release} + This command is used to cause the Storage daemon to rewind (release) the + current tape in the drive, and to re-read the Volume label the next time + the tape is used. release storage=\lt{}storage-name\gt{} -After a release command, the device is still kept open by Bacula (unless -Always Open is set to No in the Storage Daemon's configuration) so it cannot -be used by another program. However, with some tape drives, the operator can -remove the current tape and to insert a different one, and when the next Job -starts, Bacula will know to re-read the tape label to find out what tape is -mounted. If you want to be able to use the drive with another program (e.g. -{\bf mt}), you must use the {\bf unmount} command to cause Bacula to -completely release (close) the device. + After a release command, the device is still kept open by Bacula (unless + Always Open is set to No in the Storage Daemon's configuration) so it + cannot be used by another program. However, with some tape drives, the + operator can remove the current tape and to insert a different one, and + when the next Job starts, Bacula will know to re-read the tape label to + find out what tape is mounted. If you want to be able to use the drive + with another program (e.g. {\bf mt}), you must use the {\bf unmount} + command to cause Bacula to completely release (close) the device. + +\item [reload] + \index[console]{reload} + The reload command causes the Director to re-read its configuration + file and apply the new values. The new values will take effect + immediately for all new jobs. However, if you change schedules, + be aware that the scheduler pre-schedules jobs up to two hours in + advance, so any changes that are to take place during the next two + hours may be delayed. Jobs that have already been scheduled to run + (i.e. surpassed their requested start time) will continue with the + old values. New jobs will use the new values. Each time you issue + a reload command while jobs are running, the prior config values + will queued until all jobs that were running before issuing + the reload terminate, at which time the old config values will + be released from memory. The Directory permits keeping up to + 10 prior set of configurations before it will refuse a reload + command. Once at least one old set of config values has been + released it will again accept new reload commands. + + While it is possible to reload the Director's configuration on the fly, + even while jobs are executing, this is a complex operation and not + without side effects. Accordingly, if you have to reload the Director's + configuration while Bacula is running, it is advisable to restart the + Director at the next convenient opportunity. + \item [restore] - \index[console]{restore } - The restore command allows you to select one or more Jobs (JobIds) to be -restored using various methods. Once the JobIds are selected, the File -records for those Jobs are placed in an internal Bacula directory tree, and -the restore enters a file selection mode that allows you to 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. + \index[console]{restore} + The restore command allows you to select one or more Jobs (JobIds) to be + restored using various methods. Once the JobIds are selected, the File + records for those Jobs are placed in an internal Bacula directory tree, + and the restore enters a file selection mode that allows you to + 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. restore storage=\lt{}storage-name\gt{} client=\lt{}client-name\gt{} -where=\lt{}path\gt{} pool=\lt{}pool-name\gt{} fileset=\lt{}fileset-name\gt{} -select current all done + where=\lt{}path\gt{} pool=\lt{}pool-name\gt{} fileset=\lt{}fileset-name\gt{} + select current all done -Where {\bf current}, if specified, tells the restore command to automatically -select a restore to the most current backup. If not specified, you will be -prompted. The {\bf all} specification tells the restore command to restore -all files. If it is not specified, you will be prompted for the files to -restore. For details of the {\bf restore} command, please see the -\ilink{Restore Chapter}{_ChapterStart13} of this manual. + Where {\bf current}, if specified, tells the restore command to + automatically select a restore to the most current backup. If not + specified, you will be prompted. The {\bf all} specification tells the + restore command to restore all files. If it is not specified, you will + be prompted for the files to restore. For details of the {\bf restore} + command, please see the \ilink{Restore Chapter}{_ChapterStart13} of this + manual. \item [run] - \index[fd]{run } + \index[console]{run} This command allows you to schedule jobs to be run immediately. The full form -of the command is: + of the command is: run job=\lt{}job-name\gt{} client=\lt{}client-name\gt{} -fileset=\lt{}FileSet-name\gt{} level=\lt{}level-keyword\gt{} -storage=\lt{}storage-name\gt{} where=\lt{}directory-prefix\gt{} -when=\lt{}universal-time-specification\gt{} yes + fileset=\lt{}FileSet-name\gt{} level=\lt{}level-keyword\gt{} + storage=\lt{}storage-name\gt{} where=\lt{}directory-prefix\gt{} + when=\lt{}universal-time-specification\gt{} yes -Any information that is needed but not specified will be listed for -selection, and before starting the job, you will be prompted to accept, -reject, or modify the parameters of the job to be run, unless you have -specified {\bf yes}, in which case the job will be immediately sent to the -scheduler. + Any information that is needed but not specified will be listed for + selection, and before starting the job, you will be prompted to accept, + reject, or modify the parameters of the job to be run, unless you have + specified {\bf yes}, in which case the job will be immediately sent to + the scheduler. -On my system, when I enter a run command, I get the following prompt: + On my system, when I enter a run command, I get the following prompt: \footnotesize \begin{verbatim} @@ -685,70 +755,73 @@ time. Use the {\bf mod} option and select {\bf When} (no. 6). Then enter the desired start time in YYYY-MM-DD HH:MM:SS format. \item [setdebug] - \index[dir]{setdebug } + \index[dir]{setdebug} This command is used to set the debug level in each daemon. The form of this -command is: + command is: setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | -storage=\lt{}storage-name\gt{} | all] + storage=\lt{}storage-name\gt{} | all] -If trace=1 is set, then the tracing will be enabled, and the daemon where the -setdebug applies will be placed in trace mode, and all debug output will go -to the file {\bf bacula.trace} in the current directory of the daemon. -Normally, tracing is used only for Win32 clients where the debug output -cannot be written to a terminal or redirected to a file. When tracing, each -debug output message is appended to the trace file. You must explicitly -delete the file when you are done. + If trace=1 is set, then the tracing will be enabled, and the daemon + where the setdebug applies will be placed in trace mode, and all debug + output will go to the file {\bf bacula.trace} in the current directory + of the daemon. Normally, tracing is used only for Win32 clients where + the debug output cannot be written to a terminal or redirected to a + file. When tracing, each debug output message is appended to the trace + file. You must explicitly delete the file when you are done. \item [show] - \index[fd]{show } - The show command will list the Director's resource records as defined in the -Director's configuration file (normally {\bf bacula-dir.conf}). This command -is used mainly for debugging purposes by developers. The following keywords -are accepted on the show command line: directors, clients, counters, jobs, -storages, catalogs, schedules, filesets, groups, pools, messages, all, help. -Please don't confuse this command with the {\bf list}, which displays the -contents of the catalog. + \index[console]{show} + The show command will list the Director's resource records as defined in + the Director's configuration file (normally {\bf bacula-dir.conf}). + This command is used mainly for debugging purposes by developers. The + following keywords are accepted on the show command line: directors, + clients, counters, jobs, storages, catalogs, schedules, filesets, + groups, pools, messages, all, help. Please don't confuse this command + with the {\bf list}, which displays the contents of the catalog. \item [sqlquery] - \index[dir]{sqlquery } - The sqlquery command puts the Console program into SQL query mode where each -line you enter is concatenated to the previous line until a semicolon (;) is -seen. The semicolon terminates the command, which is then passed directly to -the SQL database engine. When the output from the SQL engine is displayed, -the formation of a new SQL command begins. To terminate SQL query mode and -return to the Console command prompt, you enter a period (.) in column 1. - -Using this command, you can query the SQL catalog database directly. Note you -should really know what you are doing otherwise you could damage the catalog -database. See the {\bf query} command below for simpler and safer way of -entering SQL queries. - -Depending on what database engine you are using (MySQL or SQLite), you will -have somewhat different SQL commands available. For more detailed -information, please refer to the MySQL or SQLite documentation. + \index[dir]{sqlquery} + The sqlquery command puts the Console program into SQL query mode where + each line you enter is concatenated to the previous line until a + semicolon (;) is seen. The semicolon terminates the command, which is + then passed directly to the SQL database engine. When the output from + the SQL engine is displayed, the formation of a new SQL command begins. + To terminate SQL query mode and return to the Console command prompt, + you enter a period (.) in column 1. + + Using this command, you can query the SQL catalog database directly. + Note you should really know what you are doing otherwise you could + damage the catalog database. See the {\bf query} command below for + simpler and safer way of entering SQL queries. + + Depending on what database engine you are using (MySQL, PostgreSQL or + SQLite), you will have somewhat different SQL commands available. For + more detailed information, please refer to the MySQL, PostgreSQL or + SQLite documentation. \item [status] - \index[dir]{status } - This command will display the status of the next jobs that are scheduled -during the next twenty-four hours as well as the status of currently running -jobs. The full form of this command is: + \index[dir]{status} + This command will display the status of the next jobs that are scheduled + during the next twenty-four hours as well as the status of currently + running jobs. The full form of this command is: status [all | dir=\lt{}dir-name\gt{} | director | -client=\lt{}client-name\gt{} | storage=\lt{}storage-name\gt{}] + client=\lt{}client-name\gt{} | storage=\lt{}storage-name\gt{}] -If you do a {\bf status dir}, the console will list any currently running -jobs, a summary of all jobs scheduled to be run in the next 24 hours, and a -listing of the last 10 terminated jobs with their statuses. The scheduled -jobs summary will include the Volume name to be used. You should be aware of -two things: 1. to obtain the volume name, the code goes through the same code -that will be used when the job runs, which means that it may prune or recycle -a Volume; 2. The Volume listed is only a best guess. The Volume actually -used may be different because of the time difference (more durations may -expire when the job runs) and another job could completely fill the Volume -requiring a new one. + If you do a {\bf status dir}, the console will list any currently + running jobs, a summary of all jobs scheduled to be run in the next 24 + hours, and a listing of the last 10 terminated jobs with their statuses. + The scheduled jobs summary will include the Volume name to be used. You + should be aware of two things: 1. to obtain the volume name, the code + goes through the same code that will be used when the job runs, which + means that it may prune or recycle a Volume; 2. The Volume listed is + only a best guess. The Volume actually used may be different because of + the time difference (more durations may expire when the job runs) and + another job could completely fill the Volume requiring a new one. -In the Running Jobs listing, you may find the following types of information: + In the Running Jobs listing, you may find the following types of + information: \footnotesize @@ -761,33 +834,40 @@ In the Running Jobs listing, you may find the following types of information: \end{verbatim} \normalsize -Looking at the above listing from bottom to top, obviously JobId 5343 (Rufus) -is running. JobId 5348 (Minou) is waiting for JobId 5343 to finish because it -is using the Storage resource, hence the ``waiting on max Storage jobs''. -JobId 5349 has a lower priority than all the other jobs so it is waiting for -higher priority jobs to finish, and finally, JobId 2508 (MatouVerify) is -waiting because only one job can run at a time, hence it is simply ``waiting -execution\". + Looking at the above listing from bottom to top, obviously JobId 5343 + (Rufus) is running. JobId 5348 (Minou) is waiting for JobId 5343 to + finish because it is using the Storage resource, hence the "waiting on + max Storage jobs". JobId 5349 has a lower priority than all the other + jobs so it is waiting for higher priority jobs to finish, and finally, + JobId 2508 (MatouVerify) is waiting because only one job can run at a + time, hence it is simply "waiting execution" \item [unmount] - \index[console]{unmount } + \index[console]{unmount} This command causes the indicated Bacula Storage daemon to unmount the -specified device. The forms of the command are the same as the mount command: - + specified device. The forms of the command are the same as the mount command: +\footnotesize +\begin{verbatim} unmount storage=\lt{}storage-name\gt{} unmount [ jobid=\lt{}id\gt{} | job=\lt{}job-name\gt{} ] +\end{verbatim} +\normalsize +\label{UpdateCommand} \item [update] - \index[console]{update } - This command will update catalog for either a specific Pool record, a Volume -record, or the Slots in an autochanger with barcode capability. In the case -of updating a Pool record, the new information will be automatically taken -from the corresponding Director's configuration resource record. It can be -used to increase the maximum number of volumes permitted or to set a maximum -number of volumes. The following main keywords may be specified: - -media, volume, pool, slots + \index[console]{update} + This command will update the catalog for either a specific Pool record, a Volume + record, or the Slots in an autochanger with barcode capability. In the case + of updating a Pool record, the new information will be automatically taken + from the corresponding Director's configuration resource record. It can be + used to increase the maximum number of volumes permitted or to set a maximum + number of volumes. The following main keywords may be specified: +\footnotesize +\begin{verbatim} + media, volume, pool, slots +\end{verbatim} +\normalsize In the case of updating a Volume, you will be prompted for which value you wish to change. The following Volume parameters may be changed: @@ -795,46 +875,47 @@ wish to change. The following Volume parameters may be changed: \footnotesize \begin{verbatim} - Volume Status - Volume Retention Period - Volume Use Duration - Maximum Volume Jobs - Maximum Volume Files - Maximum Volume Bytes - Recycle Flag - Slot - InChanger Flag - Pool - Volume Files - Volume from Pool - All Volumes from Pool - + Volume Status + Volume Retention Period + Volume Use Duration + Maximum Volume Jobs + Maximum Volume Files + Maximum Volume Bytes + Recycle Flag + Slot + InChanger Flag + Pool + Volume Files + Volume from Pool + All Volumes from Pool + \end{verbatim} \normalsize -For slots {\bf update slots}, Bacula will obtain a list of slots and their -barcodes from the Storage daemon, and for each barcode found, it will -automatically update the slot in the catalog Media record to correspond to -the new value. This is very useful if you have moved cassettes in the -magazine, or if you have removed the magazine and inserted a different one. -As the slot of each Volume is updated, the InChanger flag for that Volume -will also be set, and any other Volumes in the Pool will have their InChanger -flag turned off. This permits Bacula to know what magazine (tape holder) is -currently in the autochanger. + For slots {\bf update slots}, Bacula will obtain a list of slots and + their barcodes from the Storage daemon, and for each barcode found, it + will automatically update the slot in the catalog Media record to + correspond to the new value. This is very useful if you have moved + cassettes in the magazine, or if you have removed the magazine and + inserted a different one. As the slot of each Volume is updated, the + InChanger flag for that Volume will also be set, and any other Volumes + in the Pool will have their InChanger flag turned off. This permits + Bacula to know what magazine (tape holder) is currently in the + autochanger. -If you do not have barcodes, you can accomplish the same thing in version -1.33 and later by using the {\bf update slots scan} command. The {\bf scan} -keyword tells Bacula to physically mount each tape and to read its -VolumeName. + If you do not have barcodes, you can accomplish the same thing in + version 1.33 and later by using the {\bf update slots scan} command. + The {\bf scan} keyword tells Bacula to physically mount each tape and to + read its VolumeName. -For Pool {\bf update pool}, Bacula will move the Volume record from its -existing poole to the pool specified. + For Pool {\bf update pool}, Bacula will move the Volume record from its + existing pool to the pool specified. -For {\bf Volume from Pool} and {\bf All Volumes from Pool}, the following -values are updated from the Pool record: Recycle, VolRetention, -VolUseDuration, MaxVolJobs, MaxVolFiles, and MaxVolBytes. + For {\bf Volume from Pool} and {\bf All Volumes from Pool}, the + following values are updated from the Pool record: Recycle, + VolRetention, VolUseDuration, MaxVolJobs, MaxVolFiles, and MaxVolBytes. -The full form of the update command with all command line arguments is: + The full form of the update command with all command line arguments is: \footnotesize \begin{verbatim} @@ -854,17 +935,16 @@ to switch from one to another. use \lt{}database-name\gt{} -\item [ +\item [var] \label{var} - var] -\index[console]{a name } -This command takes a string or quoted string and does variable expansion on -it the same way variable expansion is done on the {\bf LabelFormat} string. -Thus, for the most part, you can test your LabelFormat strings. The -difference between the {\bf var} command and the actual LabelFormat process -is that during the var command, no job is running so ''dummy`` values are -used in place of Job specific variables. Generally, however, you will get a -good idea of what is going to happen in the real case. + \index[console]{var name } + This command takes a string or quoted string and does variable expansion on + it the same way variable expansion is done on the {\bf LabelFormat} string. + Thus, for the most part, you can test your LabelFormat strings. The + difference between the {\bf var} command and the actual LabelFormat process + is that during the var command, no job is running so "dummy" values are + used in place of Job specific variables. Generally, however, you will get a + good idea of what is going to happen in the real case. \item [version] \index[console]{version } @@ -881,10 +961,10 @@ command (i.e. quit preceded by a period). \item [query] \index[console]{query } This command reads a predefined SQL query from the query file (the name and -location of the query file is defined with the QueryFile resource record in -the Director's configuration file). You are prompted to select a query from -the file, and possibly enter one or more parameters, then the command is -submitted to the Catalog database SQL engine. + location of the query file is defined with the QueryFile resource record in + the Director's configuration file). You are prompted to select a query from + the file, and possibly enter one or more parameters, then the command is + submitted to the Catalog database SQL engine. The following queries are currently available (version 1.24): @@ -906,7 +986,7 @@ Choose a query (1-9): \normalsize \item [exit] - \index[fd]{exit } + \index[console]{exit } This command terminates the console program. \item [wait] @@ -932,13 +1012,23 @@ is the list of dot commands: \footnotesize \begin{verbatim} -.die cause the Director to segment fault (for debugging) -.jobs list all job names -.filesets list all fileset names -.clients list all client names -.msgs return any queued messages -.quit quit -.exit quit +.backups job=xxx list backups for specified job +.defaults client=xxx fileset=yyy list defaults for specified client +.die cause the Director to segment fault (for debugging) +.dir when in tree mode prints the equivalent to the dir command, + but with fields separated by commas rather than spaces. +.jobs list all job names +.levels list all levels +.filesets list all fileset names +.clients list all client names +.pools list all pool names +.types list job types +.msgs return any queued messages +.messages get quick messages +.help help command output +.quit quit +.status get status output +.exit quit \end{verbatim} \normalsize @@ -951,7 +1041,7 @@ is the list of dot commands: Normally, all commands entered to the Console program are immediately forwarded to the Director, which may be on another machine, to be executed. -However, there is a small list of {\bf at} commands, all beginning with a at +However, there is a small list of {\bf at} commands, all beginning with an at character (@), that will not be sent to the Director, but rather interpreted by the Console program directly. Note, these commands are implemented only in the tty console program and not in the GNOME Console. These commands are: @@ -963,7 +1053,7 @@ the tty console program and not in the GNOME Console. These commands are: Read and execute the commands contained in the file specified. \item [@output \lt{}filename\gt{} w/a] - \index[fd]{@output \lt{}filename\gt{} w/a } + \index[console]{@output \lt{}filename\gt{} w/a } Send all following output to the filename specified either overwriting the file (w) or appending to the file (a). To redirect the output to the terminal, simply enter {\bf @output} without a filename specification. @@ -980,20 +1070,20 @@ regression test might be: \normalsize \item [@tee \lt{}filename\gt{} w/a] - \index[fd]{@tee \lt{}filename\gt{} w/a } + \index[console]{@tee \lt{}filename\gt{} w/a } Send all subsequent output to both the specified file and the terminal. It is -turned off by specifying {\bf @tee} or {\bf @output} without a filename. + turned off by specifying {\bf @tee} or {\bf @output} without a filename. \item [@sleep \lt{}seconds\gt{}] - \index[fd]{@sleep \lt{}seconds\gt{} } + \index[console]{@sleep \lt{}seconds\gt{} } Sleep the specified number of seconds. \item [@time] - \index[fd]{@time } + \index[console]{@time } Print the current time and date. \item [@version] - \index[fd]{@version } + \index[console]{@version } Print the console's version. \item [@quit] @@ -1102,11 +1192,11 @@ you will need to label it. Before adding a volume, you must know the following information: \begin{enumerate} -\item The name of the Pool (normally ''Default``) +\item The name of the Pool (normally "Default") \item The Media Type as specified in the Storage Resource in the Director's - configuration file (e.g. ''DLT8000``) + configuration file (e.g. "DLT8000") \item The number and names of the Volumes you wish to create. - \end{enumerate} +\end{enumerate} For example, to add media to a Pool, you would issue the following commands to the console program: @@ -1149,6 +1239,6 @@ To see what you have added, enter: Notice that the console program automatically appended a number to the base Volume name that you specify (Save in this case). If you don't want it to -append a number, you can simply answer 0 (zero) to the question ''Enter number -of Media volumes to create. Max=1000:``, and in this case, it will create a +append a number, you can simply answer 0 (zero) to the question "Enter number +of Media volumes to create. Max=1000:", and in this case, it will create a single Volume with the exact name you specify. diff --git a/docs/manual-fr/consoleconf.tex b/docs/manual-fr/consoleconf.tex index 304c95af..22f4864d 100644 --- a/docs/manual-fr/consoleconf.tex +++ b/docs/manual-fr/consoleconf.tex @@ -3,12 +3,12 @@ \section*{Console Configuration} \label{_ChapterStart36} -\index[general]{Configuration!Console } -\index[general]{Console Configuration } +\index[general]{Configuration!Console} +\index[general]{Console Configuration} \addcontentsline{toc}{section}{Console Configuration} \subsection*{General} -\index[general]{General } +\index[general]{General} \addcontentsline{toc}{subsection}{General} The Console configuration file is the simplest of all the configuration files, @@ -32,8 +32,8 @@ Console program will ask you which one you want to use. \subsection*{The Director Resource} \label{DirectorResource3} -\index[general]{Director Resource } -\index[general]{Resource!Director } +\index[general]{Director Resource} +\index[general]{Resource!Director} \addcontentsline{toc}{subsection}{Director Resource} The Director resource defines the attributes of the Director running on the @@ -44,31 +44,31 @@ choose one when you start the {\bf Console} program. \begin{description} \item [Director] - \index[console]{Director } + \index[console]{Director} Start of the Director records. \item [Name = \lt{}name\gt{}] - \index[console]{Name } + \index[console]{Name} The director name used to select among different Directors, otherwise, this name is not used. \item [DIRPort = \lt{}port-number\gt{}] - \index[dir]{DIRPort } + \index[dir]{DIRPort} Specify the port to use to connect to the Director. This value will most likely already be set to the value you specified on the {\bf -\verb{--{with-base-port} option of the {\bf ./configure} command. This port must be +\verb:--:with-base-port} option of the {\bf ./configure} command. This port must be identical to the {\bf DIRport} specified in the {\bf Director} resource of the \ilink{Director's configuration}{_ChapterStart40} file. The default is 9101 so this record is not normally specified. \item [Address = \lt{}address\gt{}] - \index[dir]{Address } + \index[dir]{Address} Where the address is a host name, a fully qualified domain name, or a network address used to connect to the Director. \item [Password = \lt{}password\gt{}] - \index[dir]{Password } + \index[dir]{Password} Where the password is the password needed for the Director to accept the Console connection. This password must be identical to the {\bf Password} specified in the {\bf Director} resource of the @@ -89,8 +89,8 @@ Director { \normalsize \subsection*{The ConsoleFont Resource} -\index[general]{Resource!ConsoleFont } -\index[general]{ConsoleFont Resource } +\index[general]{Resource!ConsoleFont} +\index[general]{ConsoleFont Resource} \addcontentsline{toc}{subsection}{ConsoleFont Resource} The ConsoleFont resource is available only in the GNOME version of the @@ -100,21 +100,21 @@ the main listing window. \begin{description} \item [ConsoleFont] - \index[console]{ConsoleFont } + \index[console]{ConsoleFont} Start of the ConsoleFont records. \item [Name = \lt{}name\gt{}] - \index[console]{Name } + \index[console]{Name} The name of the font. -\item [Font = \lt{}X-Window Font Specification\gt{}] - \index[console]{Font } +\item [Font = \lt{}Pango Font Name\gt{}] + \index[console]{Font} The string value given here defines the desired font. It is specified in the -standard cryptic X Window format. For example, the default specification is: +Pango format. For example, the default specification is: \footnotesize \begin{verbatim} -Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1" +Font = "LucidaTypewriter 9" \end{verbatim} \normalsize @@ -122,21 +122,21 @@ Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1" Thanks to Phil Stracchino for providing the code for this feature. -An actual example might be: +An different example might be: \footnotesize \begin{verbatim} ConsoleFont { Name = Default -Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1" +Font = "Monospace 10" } \end{verbatim} \normalsize \subsection*{The Console Resource} \label{ConsoleResource} -\index[general]{Console Resource } -\index[general]{Resource!Console } +\index[general]{Console Resource} +\index[general]{Resource!Console} \addcontentsline{toc}{subsection}{Console Resource} As of Bacula version 1.33 and higher, there are three different kinds of @@ -151,7 +151,7 @@ levels. kind of console that was initially implemented in versions prior to 1.33 and remains valid. Typically you would use it only for administrators. \item The second type of console, and new to version 1.33 and higher is a - ``named'' console defined within a Console resource in both the Director's + "named" console defined within a Console resource in both the Director's configuration file and in the Console's configuration file. Both the names and the passwords in these two entries must match much as is the case for Client programs. @@ -171,7 +171,7 @@ directive, is the same as a Client name, the user of that console is permitted to use the {\bf SetIP} command to change the Address directive in the Director's client resource to the IP address of the Console. This permits portables or other machines using DHCP (non-fixed IP addresses) to -``notify'' the Director of their current IP address. +"notify" the Director of their current IP address. \end{itemize} The Console resource is optional and need not be specified. However, if it is @@ -190,12 +190,12 @@ perhaps the wx-console.conf file): DIRport = 9101 Address = myserver Password = "XXXXXXXXXXX" # no, really. this is not obfuscation. - } +} Console { Name = restricted-user Password = "UntrustedUser" - } +} \end{verbatim} \normalsize @@ -231,20 +231,20 @@ run} command. In other words, this user is rather limited in what he can see and do with Bacula. \subsection*{Console Commands} -\index[general]{Console Commands } -\index[general]{Commands!Console } +\index[general]{Console Commands} +\index[general]{Commands!Console} \addcontentsline{toc}{subsection}{Console Commands} For more details on running the console and its commands, please see the -\ilink{Bacula Console}{_ChapterStart23} chapter of this manual. +\ilink{Bacula Console}{_ConsoleChapter} chapter of this manual. \subsection*{Sample Console Configuration File} \label{SampleConfiguration2} -\index[general]{File!Sample Console Configuration } -\index[general]{Sample Console Configuration File } +\index[general]{File!Sample Console Configuration} +\index[general]{Sample Console Configuration File} \addcontentsline{toc}{subsection}{Sample Console Configuration File} -A example Console configuration file might be the following: +An example Console configuration file might be the following: \footnotesize \begin{verbatim} diff --git a/docs/manual-fr/copy.tex b/docs/manual-fr/copy.tex index 06622f91..b2ffc9ec 100644 --- a/docs/manual-fr/copy.tex +++ b/docs/manual-fr/copy.tex @@ -1,6 +1,6 @@ \vspace*{6cm} \begin{center} - \copyright\ Copyright 2000-2004 --\pubyear\ \company + \copyright\ Copyright 2000-2005 --\pubyear\ \company \end{center} \begin{center} @@ -13,7 +13,7 @@ method, for any purpose. \company\ makes no warranty, either express or implied, including but not limited to any implied warranties of merchantability and fitness for a particular purpose, regarding these materials and makes such materials -available solely on an ``as-is'' basis. +available solely on an "as-is" basis. In no event shall \company\ be liable to anyone for special, collateral, incidental, or consequential damages in connection with or arising out of diff --git a/docs/manual-fr/critical.tex b/docs/manual-fr/critical.tex index 43dacb8a..de4d1549 100644 --- a/docs/manual-fr/critical.tex +++ b/docs/manual-fr/critical.tex @@ -14,15 +14,16 @@ Production} We recommend you take your time before implementing a Bacula backup system since Bacula is a rather complex program, and if you make a mistake, you may -suddenly find that you cannot restore the your files in case of a disaster. +suddenly find that you cannot restore your files in case of a disaster. This is especially true if you have not previously used a major backup product. If you follow the instructions in this chapter, you will have covered most of -the major problems that can occur. It goes without saying that if ever you -find that we have left out an important point, please point it out to us, so +the major problems that can occur. It goes without saying that if you ever +find that we have left out an important point, please inform us, so that we can document it to the benefit of everyone. +\label{Critical} \subsection*{Critical Items} \index[general]{Critical Items } \index[general]{Items!Critical } @@ -30,22 +31,23 @@ that we can document it to the benefit of everyone. The following assumes that you have installed Bacula, you more or less understand it, you have at least worked through the tutorial or have -equivalent experience, and that you have setup a basic production -configuration. If you haven't done the above, please do so then come back -here. The following is a sort of checklist that points you elsewhere in the -manual with perhaps a brief explaination of why you should do it. The order is -more or less the order you would use in setting up a production system (if you -already are in production, use the checklist anyway). +equivalent experience, and that you have set up a basic production +configuration. If you haven't done the above, please do so and then come back +here. The following is a sort of checklist that points with perhaps a brief +explanation of why you should do it. You will find the details elsewhere in the +manual. The order is more or less the order you would use in setting up a +production system (if you already are in production, use the checklist anyway). \begin{itemize} -\item Test your tape drive with compatibility with Bacula by using the test - command in the - \ilink{btape}{btape} program. +\item Test your tape drive for compatibility with Bacula by using the test + command in the \ilink{btape}{btape} program. \item Better than doing the above is to walk through the nine steps in the \ilink{Tape Testing}{_ChapterStart27} chapter of the manual. It may take you a bit of time, but it will eliminate surprises. -\item Make sure that /lib/tls is disabled. Bacula does not work with this - library. See the second point under +\item Test your the end of tape handling of your tape drive by using the + fill command in the \ilink{btape}{btape} program. +\item If you are using a 2.4 kernel, make sure that /lib/tls is disabled. Bacula + does not work with this library. See the second point under \ilink{ Supported Operating Systems.}{SupportedOSes} \item Do at least one restore of files. If you backup both Unix and Win32 systems, restore files from each system type. The @@ -53,23 +55,25 @@ already are in production, use the checklist anyway). \item Write a bootstrap file to a separate system for each backup job. The Write Bootstrap directive is described in the \ilink{Director Configuration}{writebootstrap} chapter of the -manual, and more details are available in the -\ilink{Bootstrap File}{_ChapterStart43} chapter. Also, the default -bacula-dir.conf comes with a Write Bootstrap directive defined. This allows -you to recover the state of your system as of the last backup. + manual, and more details are available in the + \ilink{Bootstrap File}{_ChapterStart43} chapter. Also, the default + bacula-dir.conf comes with a Write Bootstrap directive defined. This allows + you to recover the state of your system as of the last backup. \item Backup your catalog. An example of this is found in the default bacula-dir.conf file. The backup script is installed by default and should handle any database, though you may want to make your own local -modifications. -\item Write a bootstrap file for the catalog. An example of this is found in - the default bacula-dir.conf file. This will allow you to quickly restore your + modifications. +\item Write a bootstrap file for the catalog. An example of this is found in + the default bacula-dir.conf file. This will allow you to quickly restore your catalog in the event it is wiped out -- otherwise it is many excruciating -hours of work. + hours of work. \item Make a Bacula Rescue CDROM! See the \ilink{Disaster Recovery Using a Bacula Rescue CDROM}{_ChapterStart38} chapter. It is trivial to make such a CDROM, -and it can make system recovery in the event of a lost hard disk infinitely -easier. + and it can make system recovery in the event of a lost hard disk infinitely + easier. +\item After doing your first backup restore some or all the data. Do this for + at least one client on each different OS (e.g. Linux, FreeBSD, Solaris, Win32). \end{itemize} \subsection*{Recommended Items} @@ -81,19 +85,37 @@ Although these items may not be critical, they are recommended and will help you avoid problems. \begin{itemize} -\item Read the - \ilink{Quick Start Guide to Bacula}{_ChapterStart37} +\item Read the \ilink{Quick Start Guide to Bacula}{_ChapterStart37} \item After installing and experimenting with Bacula, read and work carefully through the examples in the \ilink{Tutorial}{_ChapterStart1} chapter of this manual. -\item Learn what each of the - \ilink{Bacula Utility Programs}{_ChapterStart9} does. +\item Learn what each of the \ilink{Bacula Utility Programs}{_ChapterStart9} +does. \item Set up reasonable retention periods so that your catalog does not grow - to be too big. See the following three chapters: - \ilink{Recycling your Volumes}{_ChapterStart22}, -\ilink{Basic Volume Management}{_ChapterStart39}, -\ilink{Using Pools to Manage Volumes}{_ChapterStart11}. + to be too big. See the following three chapters:\\ + \ilink{Recycling your Volumes}{_ChapterStart22},\\ + \ilink{Basic Volume Management}{_ChapterStart39},\\ + \ilink{Using Pools to Manage Volumes}{_ChapterStart11}. \item Perform a bare metal recovery using the Bacula Rescue CDROM. See the - \ilink{Disaster Recovery Using a Bacula Rescue - CDROM}{_ChapterStart38} chapter. + \ilink{Disaster Recovery Using a Bacula Rescue CDROM}{_ChapterStart38} + chapter. +\end{itemize} + +If you absolutely must implement a system where you write a different +tape each night and take it offsite in the morning. We recommend that you do +several things: +\begin{itemize} +\item Write a bootstrap file of your backed up data and a bootstrap file + of your catalog backup to a floppy disk or a CDROM, and take that with + the tape. If this is not possible, try to write those files to another + computer or offsite computer, or send them as email to a friend. If none + of that is possible, at least print the bootstrap files and take that + offsite with the tape. Having the bootstrap files will make recovery + much easier. +\item It is better not to force Bacula to load a particular tape each day. + Instead, let Bacula choose the tape. If you need to know what tape to + mount, you can print a list of recycled and appendable tapes daily, and + select any tape from that list. Bacula may propose a particular tape + for use that it considers optimal, but it will accept any valid tape + from the correct pool. \end{itemize} diff --git a/docs/manual-fr/disk.tex b/docs/manual-fr/disk.tex index a9c99a33..dda7a1ce 100644 --- a/docs/manual-fr/disk.tex +++ b/docs/manual-fr/disk.tex @@ -3,14 +3,15 @@ \section*{Basic Volume Management} \label{_ChapterStart39} -\index[general]{Basic Volume Management } -\index[general]{Management!Basic Volume } +\index[general]{Basic Volume Management} +\index[general]{Management!Basic Volume} +\index[general]{Disk Volumes} \addcontentsline{toc}{section}{Basic Volume Management} This chapter presents most all the features needed to do Volume management. Most of the concepts apply equally well to both tape and disk Volumes. However, the chapter was originally written to explain backing up to disk, so -you will see it is slanted in that direction, but that all the directives +you will see it is slanted in that direction, but all the directives presented here apply equally well whether your volume is disk or tape. If you have a lot of hard disk storage or you absolutely must have your @@ -18,8 +19,8 @@ backups run within a small time window, you may want to direct Bacula to backup to disk Volumes rather than tape Volumes. This chapter is intended to give you some of the options that are available to you so that you can manage either disk or tape volumes. -\label{Concepts} +\label{Concepts} \subsection*{Key Concepts and Resource Records} \index[general]{Key Concepts and Resource Records } \index[general]{Records!Key Concepts and Resource } @@ -70,9 +71,15 @@ Bacula. This is because each archive has the filename as part of the internal label, and the internal label must agree with the system filename before Bacula will use it. -Although this is quite simple, there are a number of problems, the first is +Although this is quite simple, there are a number of problems. The first is that unless you specify otherwise, Bacula will always write to the same volume -until you run out of disk space. +until you run out of disk space. This problem is addressed below. + +In addition, if you want to use concurrent jobs that write to several +different volumes at the same time, you will need to understand a number +of other details. An example of such a configuration is given +at the end of this chapter under \ilink{Concurrent Disk +Jobs}{ConcurrentDiskJobs}. \subsubsection*{Pool Options to Limit the Volume Usage} \index[general]{Usage!Pool Options to Limit the Volume } @@ -105,11 +112,15 @@ limiting the time Bacula will use a particular Volume (be it tape or disk). For example, the above directives can allow you to ensure that you rotate through a set of daily Volumes if you wish. -As mentioned above, each of those directives are specified in the Pool or +As mentioned above, each of those directives is specified in the Pool or Pools that you use for your Volumes. In the case of {\bf Maximum Volume Job}, {\bf Maximum Volume Bytes}, and {\bf Volume Use Duration}, you can actually specify the desired value on a Volume by Volume basis. The value specified in -the Pool record becomes the default when labeling new Volumes. As an example +the Pool record becomes the default when labeling new Volumes. Once a Volume +has been created, it gets its own copy of the Pool defaults, and subsequently +changing the Pool will have no effect on existing Volumes. You can either +manually change the Volume values, or refresh them from the Pool defaults using +the {\bf update volume} command in the Console. As an example of the use of one of the above, suppose your Pool resource contains: \footnotesize @@ -123,10 +134,13 @@ Pool { \normalsize then if you run a backup once a day (every 24 hours), Bacula will use a new -Volume each backup because each Volume it writes can only be used for 23 hours -after the first write. -\label{AutomaticLabeling} +Volume for each backup, because each Volume it writes can only be used for 23 hours +after the first write. Note, setting the use duration to 23 hours is not a very +good solution for tapes unless you have someone on-site during the weekends, +because Bacula will want a new Volume and no one will be present to mount it, +so no weekend backups will be done until Monday morning. +\label{AutomaticLabeling} \subsubsection*{Automatic Volume Labeling} \index[general]{Automatic Volume Labeling } \index[general]{Labeling!Automatic Volume } @@ -139,14 +153,19 @@ needed. While, the automatic Volume labeling in version 1.30 and prior is a bit simplistic, but it does allow for automation, the features added in version 1.31 permit automatic creation of a wide variety of labels including information from environment variables and special Bacula Counter variables. - -Please note that automatic Volume can also be used with tapes, but it is not -nearly so practical since the tapes must be pre-mounted. This requires some -user interaction. Automatic labeling from templates does NOT work with -autochangers since Bacula will not access unknown slots. There are several -methods of labeling all volumes in an autochanger magazine. For more -information on this, please see the -\ilink{ Autochanger}{_ChapterStart18} chapter of this manual. +In version 1.37 and later, it is probably much better to use Python scripting +and the NewVolume event since generating Volume labels in a Python script is +much easier than trying to figure out Counter variables. See the +\ilink{Python Scripting}{_ChapterStart60} chapter of this manual for more +details. + +Please note that automatic Volume labeling can also be used with tapes, but +it is not nearly so practical since the tapes must be pre-mounted. This +requires some user interaction. Automatic labeling from templates does NOT +work with autochangers since Bacula will not access unknown slots. There +are several methods of labeling all volumes in an autochanger magazine. +For more information on this, please see the \ilink{ +Autochanger}{_ChapterStart18} chapter of this manual. Automatic Volume labeling is enabled by making a change to both the Pool resource (Director) and to the Device resource (Storage daemon) shown above. @@ -194,8 +213,8 @@ Device { You can find more details of the {\bf Label Format} Pool record in \ilink{Label Format}{Label} description of the Pool resource records. -\label{Recycling1} +\label{Recycling1} \subsubsection*{Restricting the Number of Volumes and Recycling} \index[general]{Recycling!Restricting the Number of Volumes and } \index[general]{Restricting the Number of Volumes and Recycling } @@ -230,20 +249,20 @@ following: \item The \ilink{ Recycle = yes}{PoolRecycle} record in the Pool resource to permit automatic recycling of Volumes whose Volume retention period has -expired. + expired. \item The \ilink{ Recycle Oldest Volume = yes}{RecycleOldest} record in the Pool resource tells Bacula to Prune the oldest volume in the Pool, and if all -files were pruned to recyle this volume and use it. + files were pruned to recycle this volume and use it. \item The \ilink{ Recycle Current Volume = yes}{RecycleCurrent} record in the Pool resource tells Bacula to Prune the currently mounted volume in the -Pool, and if all files were pruned to recyle this volume and use it. + Pool, and if all files were pruned to recycle this volume and use it. \item The \ilink{ Purge Oldest Volume = yes}{PurgeOldest} record in the Pool resource permits a forced recycling of the oldest Volume when a new one -is needed. {\bf N.B. This record ignores retention periods! We highly -recommend not to use this record, but instead use Recycle Oldest Volume} + is needed. {\bf N.B. This record ignores retention periods! We highly + recommend not to use this record, but instead use Recycle Oldest Volume} \item The \ilink{ Maximum Volumes = nnn}{MaxVolumes} record in the Pool resource to limit the number of Volumes that can be created. @@ -257,7 +276,6 @@ this manual. Volume Retention, AutoPrune, and Recycle determine how long Bacula will keep your Volumes before reusing them, and they are also discussed in detail in the - \ilink{Automatic Volume Recycling}{_ChapterStart22} chapter of this manual. @@ -269,17 +287,64 @@ through a fixed set of Volumes. Cycling through a fixed set of Volumes can also be done by setting {\bf Recycle Oldest Volume = yes} or {\bf Recycle Current Volume = yes}. In this case, when Bacula needs a new Volume, it will prune the specified volume. -\label{Example2} +\label{ConcurrentDiskJobs} +\subsection*{Concurrent Disk Jobs} +\index[general]{Concurrent Disk Jobs} +\addcontentsline{toc}{subsection}{Concurrent Disk Jobs} +Above, we discussed how you could have a single device named {\bf +FileBackup} that writes to volumes in {\bf /home/bacula/backups}. +You can, in fact, run multiple concurrent jobs using the +Storage definition given with this example, and all the jobs will +simultaneously write into the Volume that is being written. + +Now suppose you want to use multiple Pools, which means multiple +Volumes, or suppose you want each client to have its own Volume +and perhaps its own directory such as {\bf /home/bacula/client1} +and {\bf /home/bacula/client2} ... With the single Storage and Device +definition above, neither of these two is possible. Why? Because +Bacula disk storage follows the same rules as tape devices. Only +one Volume can be mounted on any Device at any time. If you want +to simultaneously write multiple Volumes, you will need multiple +Device resources in your bacula-sd.conf file, and thus multiple +Storage resources in your bacula-dir.conf. + +OK, so now you should understand that you need multiple Device definitions +in the case of different directorys or different Pools, but you also +need to know that the catalog data that Bacula keeps contains only +the Media Type and not the specific storage device. This permits a tape +for example to be re-read on any compatible tape drive. The compatibility +being determined by the Media Type. The same applies to disk storage. +Since a volume that is written by a Device in say directory {\bf +/home/bacula/backups} cannot be read by a Device with an Archive Device +definition of {\bf /home/bacula/client1}, you will not be able to +restore all your files if you give both those devices +{\bf Media Type = File}. During the restore, Bacula will simply choose +the first available device, which may not be the correct one. If this +is confusing, just remember that the Directory has only the Media Type +and the Volume name. It does not know the {\bf Archive Device} (or the +full path) that is specified in the Storage daemon. Thus you must +explicitly tie your Volumes to the correct Device by using the Media Type. + +The example shown below shows a case where there are two clients, each +using its own Pool and storing their Volumes in different directories. + + +\label{Example2} \subsection*{An Example} \index[general]{Example } \addcontentsline{toc}{subsection}{Example} The following example is not very practical, but can be used to demonstrate the proof of concept in a relatively short period of time. The example -consists of a single client that is backed up to a set of 12 archive files -(Volumes). Each Volume is used (written) only once, and there are four Full -saves done every hour (so the whole thing cycles around after three hours). +consists of a two clients that are backed up to a set of 12 archive files +(Volumes) for each client into different directories on the Storage +maching. Each Volume is used (written) only once, and there are four Full +saves done every hour (so the whole thing cycles around after three hours). + +What is key here is that each physical device on the Storage daemon +has a different Media Type. This allows the Director to choose the +correct device for restores ... The Director's configuration file is as follows: @@ -294,10 +359,10 @@ Director { } Schedule { Name = "FourPerHour" - Run = Level=Full Pool=Recycle Storage=File hourly at 0:05 - Run = Level=Full Pool=Recycle Storage=File hourly at 0:20 - Run = Level=Full Pool=Recycle Storage=File hourly at 0:35 - Run = Level=Full Pool=Recycle Storage=File hourly at 0:50 + Run = Level=Full hourly at 0:05 + Run = Level=Full hourly at 0:20 + Run = Level=Full hourly at 0:35 + Run = Level=Full hourly at 0:50 } Job { Name = "RecycleExample" @@ -310,6 +375,19 @@ Job { Pool = Recycle Schedule = FourPerHour } + +Job { + Name = "RecycleExample2" + Type = Backup + Level = Full + Client = Roxie + FileSet= "Example FileSet" + Messages = Standard + Storage = FileStorage1 + Pool = Recycle1 + Schedule = FourPerHour +} + FileSet { Name = "Example FileSet" Include = compression=GZIP signature=SHA1 { @@ -322,6 +400,14 @@ Client { Catalog = BackupDB Password = client_password } + +Client { + Name = Roxie + Address = roxie + Catalog = BackupDB + Password = client1_password +} + Storage { Name = FileStorage Address = rufus @@ -329,6 +415,15 @@ Storage { Device = RecycleDir Media Type = File } + +Storage { + Name = FileStorage1 + Address = rufus + Password = local_storage_password + Device = RecycleDir1 + Media Type = File1 +} + Catalog { Name = BackupDB dbname = bacula; user = bacula; password = "" @@ -341,12 +436,24 @@ Pool { Name = Recycle Use Volume Once = yes Pool Type = Backup - LabelFormat = "Vol" + LabelFormat = "Recycle-" + AutoPrune = yes + VolumeRetention = 2h + Maximum Volumes = 12 + Recycle = yes +} + +Pool { + Name = Recycle1 + Use Volume Once = yes + Pool Type = Backup + LabelFormat = "Recycle1-" AutoPrune = yes VolumeRetention = 2h Maximum Volumes = 12 Recycle = yes } + \end{verbatim} \normalsize @@ -374,6 +481,18 @@ Device { RemovableMedia = no; AlwaysOpen = no; } + +Device { + Name = RecycleDir1 + Media Type = File1 + Archive Device = /home/bacula/backups1 + LabelMedia = yes; + Random Access = Yes; + AutomaticMount = yes; + RemovableMedia = no; + AlwaysOpen = no; +} + Messages { Name = Standard director = my-dir = all @@ -381,16 +500,10 @@ Messages { \end{verbatim} \normalsize -In this example, the Jobs will be backed up to directory {\bf -/home/bacula/backups} with Volume names Vol0001, Vol0002, ... Vol0012. Every -backup Job will write a new volume cycling through the volume numbers, and two -hours after a job has started, the volume will be pruned {\bf Volume Retention -= 2h}. - With a little bit of work, you can change the above example into a weekly or monthly cycle (take care about the amount of archive disk space used). -\label{MultipleDisks} +\label{MultipleDisks} \subsection*{Backing up to Multiple Disks} \index[general]{Disks!Backing up to Multiple } \index[general]{Backing up to Multiple Disks } @@ -398,15 +511,18 @@ monthly cycle (take care about the amount of archive disk space used). Bacula can, of course, use multiple disks, but in general, each disk must be a separate Device specification in the Storage daemon's conf file, and you must -then select what clients to backup to each disk. +then select what clients to backup to each disk. You will also want to +give each Device specification a different Media Type so that during +a restore, Bacula will be able to find the appropriate drive. -The situation is a bit more complicated if you want to treat two disk drives -logically as a single drive, which Bacula does not directly support. However, -it is possible to back up your data to multiple disks as if they were a single -drive by linking the Volumes from the first disk to the second disk. +The situation is a bit more complicated if you want to treat two different +physical disk drives (or partitions) logically as a single drive, which +Bacula does not directly support. However, it is possible to back up your +data to multiple disks as if they were a single drive by linking the +Volumes from the first disk to the second disk. For example, assume that you have two disks named {\bf /disk1} and {\bf -/disk2>}. If you then create a standard Storage daemon Device resource for +/disk2}. If you then create a standard Storage daemon Device resource for backing up to the first disk, it will look like the following: \footnotesize @@ -443,11 +559,59 @@ actually write the data to /disk2. The only minor inconvenience with this method is that you must explicitly name the disks and cannot use automatic labeling unless you arrange to have the labels exactly match the links you have created. -\label{MultipleClients} +An important thing to know is that Bacula treats disks like tape drives +as much as it can. This means that you can only have a single Volume +mounted at one time on a disk as defined in your Device resource in +the Storage daemon's conf file. You can have multiple concurrent +jobs running that all write to the one Volume that is being used, but +if you want to have multiple concurrent jobs that are writting to +separate disks drives (or partitions), you will need to define +separate Device resources for each one, exactly as you would do for +two different tape drives. There is one fundamental difference, however. +The Volumes that you creat on the two drives cannot be easily exchanged +as they can for a tape drive, because they are physically resident (already +mounted in a sense) on the particular drive. As a consequence, you will +probably want to give them different Media Types so that Bacula can +distinguish what Device resource to use during a restore. +An example would be the following: + +\footnotesize +\begin{verbatim} +Device { + Name = Disk1 + Media Type = File1 + Archive Device = /disk1 + LabelMedia = yes; + Random Access = Yes; + AutomaticMount = yes; + RemovableMedia = no; + AlwaysOpen = no; +} + +Device { + Name = Disk2 + Media Type = File2 + Archive Device = /disk2 + LabelMedia = yes; + Random Access = Yes; + AutomaticMount = yes; + RemovableMedia = no; + AlwaysOpen = no; +} +\end{verbatim} +\normalsize + +With the above device definitions, you can run two concurrent +jobs each writing at the same time, one to {\bf /disk2} and the +other to {\bf /disk2}. The fact that you have given them different +Media Types will allow Bacula to quickly choose the correct +Storage resource in the Director when doing a restore. + +\label{MultipleClients} \subsection*{Considerations for Multiple Clients} \index[general]{Clients!Considerations for Multiple } -\index[general]{Considerations for Multiple Clients } +\index[general]{Multiple Clients} \addcontentsline{toc}{subsection}{Considerations for Multiple Clients} If we take the above example and add a second Client, here are a few @@ -528,20 +692,21 @@ Client { Catalog = BackupDB Password = client2_password } -# Two Storage definitions permits different directories +# Two Storage definitions with differen Media Types +# permits different directories Storage { Name = File1 Address = rufus Password = local_storage_password Device = client1 - Media Type = File + Media Type = File1 } Storage { Name = File2 Address = rufus Password = local_storage_password Device = client2 - Media Type = File + Media Type = File2 } Catalog { Name = BackupDB @@ -594,7 +759,7 @@ Director { # Archive directory for Client1 Device { Name = client1 - Media Type = File + Media Type = File1 Archive Device = /home/bacula/client1 LabelMedia = yes; Random Access = Yes; @@ -605,7 +770,7 @@ Device { # Archive directory for Client2 Device { Name = client2 - Media Type = File + Media Type = File2 Archive Device = /home/bacula/client2 LabelMedia = yes; Random Access = Yes; diff --git a/docs/manual-fr/faq.tex b/docs/manual-fr/faq.tex index 2f8792ac..314a5314 100644 --- a/docs/manual-fr/faq.tex +++ b/docs/manual-fr/faq.tex @@ -7,142 +7,190 @@ \index[general]{Bacula Frequently Asked Questions } \addcontentsline{toc}{section}{Bacula Frequently Asked Questions} -See +These are questions that have been submitted over time by the +Bacula users. + +Please also see \ilink{the bugs section}{_ChapterStart4} of this document for a list of known bugs and solutions. \begin{description} \label{what} - -\item [What is {\bf Bacula}? ] -\index[dir]{What is Bacula? } -{\bf Bacula} is a network backup and restore program. - -\item [Does Bacula support Windows? ] -\index[dir]{Does Bacula support Windows? } -Yes, Bacula compiles and runs on Windows machines (Win98, WinMe, WinXP, -WinNT, and Win2000). We provide a binary version of the Client (bacula-fd), -but have not tested the Director nor the Storage daemon. Note, Win95 is no -longer supported because it doesn't have the GetFileAttributesExA API call. +\subsection*{What is Bacula?} +\item [What is {\bf Bacula}? ] + \index[general]{What is Bacula? } + {\bf Bacula} is a network backup and restore program. + +\subsection*{Does Bacula support Windows?} +\item [Does Bacula support Windows?] + \index[general]{Does Bacula support Windows? } + Yes, Bacula compiles and runs on Windows machines (Win98, WinMe, WinXP, + WinNT, and Win2000). We provide a binary version of the Client (bacula-fd), + but have not tested the Director nor the Storage daemon. Note, Win95 is no + longer supported because it doesn't have the GetFileAttributesExA API call. + \label{lang} - -\item [What language is Bacula written in? ] -\index[fd]{What language is Bacula written in? } -It is written in C++, but it is mostly C code using only a limited set of the -C++ extensions over C. Thus Bacula is completely compiled using the C++ -compiler. There are several modules, including the Win32 interface that are -written using the object oriented C++ features. Over time, we are slowly -adding a larger subset of C++. +\subsection*{What language is Bacula written in?} +\item [What language is Bacula written in?] + \index[general]{What language is Bacula written in? } + It is written in C++, but it is mostly C code using only a limited set of + the C++ extensions over C. Thus Bacula is completely compiled using the + C++ compiler. There are several modules, including the Win32 interface, that + are written using the object oriented C++ features. Over time, we are slowly + adding a larger subset of C++. \label{run} - -\item [On what machines does Bacula run? ] -\index[fd]{On what machines does Bacula run? } -{\bf Bacula} builds and executes on RedHat Linux (versions RH7.1-RHEL 3.0, -SuSE, Gentoo, Debian, Mandrake, ...), FreeBSD, Solaris, Alpha, SGI (client), -NetBSD, OpenBSD, Mac OS X (client), and Win32 (client). - -Bacula has been my only backup tool for over four years backing up 5 machines -nightly (3 Linux boxes running RedHat, a WinXP machine, and a WinNT machine). +\subsection*{On what machines does Bacula run?} +\item [On what machines does Bacula run? ] + \index[general]{On what machines does Bacula run? } + {\bf Bacula} builds and executes on RedHat Linux (versions RH7.1-RHEL 3.0, + SuSE, Gentoo, Debian, Mandriva, ...), FreeBSD, Solaris, Alpha, SGI (client), + NetBSD, OpenBSD, Mac OS X (client), and Win32 (client). + + Bacula has been my only backup tool for over four years backing up 5 + machines nightly (3 Linux boxes running RedHat, a WinXP machine, and a WinNT + machine). \label{stable} +\subsection*{Is Bacula Stable?} +\item [Is Bacula Stable? ] + \index[general]{Is Bacula Stable? } + Yes, it is remarkably stable, but remember, there are still a lot of + unimplemented or partially implemented features. With a program of this size + (100,000+ lines of C++ code not including the SQL programs) there are bound + to be bugs. The current test environment (a twisted pair local network and a + HP DLT backup tape) is not exactly ideal, so additional testing on other +sites is + necessary. The File daemon has never crashed -- running months at a time +with + no intervention. The Storage daemon is remarkably stable with most of the + problems arising during labeling or switching tapes. Storage daemon crashes + are rare. The Director, given the multitude of functions it fulfills is +also + relatively stable. In a production environment, it rarely if ever crashes. Of + the three daemons, the Director is the most prone to having problems. Still, +it + frequently runs several months with no problems. + + There are a number of reasons for this stability. + + \begin{enumerate} + \item The program was largely written by one person to date + (Kern).\\ + \item The program is constantly checking the chain of allocated + memory buffers to ensure that no overruns have occurred. \\ + \item All memory leaks (orphaned buffers) are reported each time the + program terminates.\\ + \item Any signal (segmentation fault, ...) generates a + traceback that is emailed to the developer. This permits quick resolution +of + bugs even if they only show up rarely in a production system.\\ + \item There is a reasonably comprehensive set of regression tests + that avoids re-creating the most common errors in new versions of + Bacula. + \end{enumerate} -\item [Is Bacula Stable? ] -\index[fd]{Is Bacula Stable? } -Yes, it is remarkably stable, but remember, there are still a lot of -unimplemented or partially implemented features. With a program of this size -(100,000+ lines of C++ code not including the SQL programs) there are bound -to be bugs. The current test environment (a twisted pair local network and a -HP DLT backup tape) is rather ideal, so additional testing on other sites is -necessary. The File daemon has never crashed -- running months at a time with -no intervention. The Storage daemon is remarkably stable with most of the -problems arising during labeling or switching tapes. Storage daemon crashes -are rare. The Director, given the multitude of functions it fulfills is also -relatively stable. In a production environment, it rarely if ever crashes. Of -the three daemons, the Director is the most prone to having problems. It -frequently runs several months with no problems. - -There are a number of reasons for this stability. 1. The program was largely -written by one person to date (Kern). 2. The program constantly is checking -the chain of allocated memory buffers to ensure that no overruns have -occurred. 3. All memory leaks (orphaned buffers) are reported each time the -program terminates. 4. Any signal (segmentation fault, ...) generates a -traceback that is emailed to the developer. This permits quick resolution of -bugs even if they only show up rarely in a production system, 5. There is a -reasonably comprehensive set of regression tests that avoids re-creating the -most common errors in new versions of Bacula. \label{AuthorizationErrors} - -\item [I'm Getting Authorization Errors. What is Going On? ] -\index[fd]{I'm Getting Authorization Errors. What is Going On? } -For security reasons, Bacula requires that both the File daemon and the -Storage daemon know the name of the Director as well as his password. As a -consequence, if you change the Director's name or password, you must make -the corresponding change in the Storage daemon and in the File daemon -configuration files. - -During the authorization process, the Storage daemon and File daemon also -require that the Director authenticate itself, so both ends require the other -to have the correct name and password. - -If you have edited the conf files and modified any name or any password, and -you are getting authentication errors, then your best bet is to go back to -the original conf files generated by the Bacula installation process. Make -only the absolutely necessary modifications to these files -- e.g. add the -correct email address. Then follow the instructions in the -\ilink{ Running Bacula}{_ChapterStart1} chapter of this manual. You -will run a backup to disk and a restore. Only when that works, should you -begin customization of the conf files. - -Another reason that you can get authentication errors is if you are running -Multiple Concurrent Jobs in the Director, but you have not set them in the -File daemon or the Storage daemon. Once you reach their limit, they will -reject the connection producing authentication (or connection) errors. - -Here is sort of a picture of what names/passwords in which files/Resources -must match up: - -\includegraphics{./Conf-Diagram.eps} - -In the left column, you will find the Director, Storage, and Client -resources, with their names and passwords -- these are all in {\bf -bacula-dir.conf}. In the right column are where the corresponding values -should be found in the Console, Storage daemon (SD), and File daemon (FD) -configuration files. +\subsection*{I'm Getting Authorization Errors. What is Going On? } +\item [I'm Getting Authorization Errors. What is Going On? ] +\index[general]{Authorization Errors} +\index[general]{Concurrent Jobs} + For security reasons, Bacula requires that both the File daemon and the + Storage daemon know the name of the Director as well as its password. As a + consequence, if you change the Director's name or password, you must make + the corresponding change in the Storage daemon's and in the File daemon's + configuration files. + + During the authorization process, the Storage daemon and File daemon + also require that the Director authenticates itself, so both ends + require the other to have the correct name and password. + + If you have edited the conf files and modified any name or any password, + and you are getting authentication errors, then your best bet is to go + back to the original conf files generated by the Bacula installation + process. Make only the absolutely necessary modifications to these + files -- e.g. add the correct email address. Then follow the + instructions in the \ilink{ Running Bacula}{_ChapterStart1} chapter of + this manual. You will run a backup to disk and a restore. Only when + that works, should you begin customization of the conf files. + + Another reason that you can get authentication errors is if you are + running Multiple Concurrent Jobs in the Director, but you have not set + them in the File daemon or the Storage daemon. Once you reach their + limit, they will reject the connection producing authentication (or + connection) errors. + + If you are having problems connecting to a Windows machine that + previously worked, you might try restarting the Bacula service since + Windows frequently encounters networking connection problems. + + Some users report that authentication fails if there is not a proper + reverse DNS lookup entry for the machine. This seems to be a + requirement of gethostbyname(), which is what Bacula uses to translate + names into IP addresses. If you cannot add a reverse DNS entry, or you + don't know how to do so, you can avoid the problem by specifying an IP + address rather than a machine name in the appropriate Bacula conf file. + + Here is a picture that indicates what names/passwords in which + files/Resources must match up: + + \includegraphics{./Conf-Diagram.eps} + + In the left column, you will find the Director, Storage, and Client + resources, with their names and passwords -- these are all in {\bf + bacula-dir.conf}. The right column is where the corresponding values + should be found in the Console, Storage daemon (SD), and File daemon (FD) + configuration files. + + Another thing to check is to ensure that the Bacula component you are + trying to access has {\bf Maximum Concurrent Jobs} set large enough to + handle each of the Jobs and the Console that want to connect + simultaneously. Once the maximum connections has been reached, each + Bacula component will reject all new connections. + + Finally, make sure you have no {\bf hosts.allow} or {\bf hosts.deny} + file that is not permitting access to the site trying to connect. \label{AccessProblems} - +\subsection*{Bacula Runs Fine but Cannot Access a Client on a Different Machine. + Why? } \item [Bacula Runs Fine but Cannot Access a Client on a Different Machine. - Why? ] -\index[dir]{Bacula Runs Fine but Cannot Access a Client on a Different -Machine. Why? } -There are several reasons why Bacula could not contact a client on a -different machine. They are: + Why? ] +\index[general]{Cannot Access a Client} + There are several reasons why Bacula could not contact a client on a + different machine. They are: \begin{itemize} \item It is a Windows Client, and the client died because of an improper configuration file. Check that the Bacula icon is in the system tray and the the menu items work. If the client has died, the icon will disappear only -when you move the mouse over the icon. + when you move the mouse over the icon. \item The Client address or port is incorrect or not resolved by DNS. See if you can ping the client machine using the same address as in the Client record. \item You have a firewall, and it is blocking traffic on port 9102 between - the Director's machine and the Clients machine (or on port 9103 between the + the Director's machine and the Client's machine (or on port 9103 between the Client and the Storage daemon machines). \item Your password or names are not correct in both the Director and the Client machine. Try configuring everything identical to how you run the client on the same machine as the Director, but just change the Address. If -that works, make the other changes one step at a time until it works. + that works, make the other changes one step at a time until it works. +\item You may also be having problems betwen your File daemon and your + Storage daemon. The name you use in the Storage resource of your + Director's conf file must be known (resolvable) by the File daemon, + because it is passed symbolically to the File daemon, which then + resolves it to get an IP address used to contact the Storage daemon. +\item You may have a {\bf hosts.allow} or {\bf hosts.deny} file that is + not permitting access. \end{itemize} \label{startover} - -\item [My Catalog is Full of Test Runs, How Can I Start Over? ] -\index[dir]{My Catalog is Full of Test Runs, How Can I Start Over? } -If you are using MySQL do the following: +\subsection*{My Catalog is Full of Test Runs, How Can I Start Over?} +\item [My Catalog is Full of Test Runs, How Can I Start Over? ] + \index[general]{My Catalog is Full of Test Runs, How Can I Start Over? } + If you are using MySQL do the following: \footnotesize \begin{verbatim} @@ -177,35 +225,36 @@ mt -f /dev/st0 weof where you need to adjust the device name for your system. \label{restorehang} - -\item [I Run a Restore Job and Bacula Hangs. What do I do? ] -\index[dir]{I Run a Restore Job and Bacula Hangs. What do I do? } -On Bacula version 1.25 and prior, it expects you to have the correct tape -mounted prior to a restore. On Bacula version 1.26 and higher, it will ask -you for the tape, and if the wrong one it mounted, it will inform you. - -If you have previously done an {\bf unmount} command, all Storage daemon -sessions (jobs) will be completely blocked from using the drive unmounted, so -be sure to do a {\bf mount} after your unmount. If in doubt, do a second {\bf -mount}, it won't cause any harm. +\subsection*{I Run a Restore Job and Bacula Hangs. What do I do?} +\item [I Run a Restore Job and Bacula Hangs. What do I do?] + \index[general]{I Run a Restore Job and Bacula Hangs. What do I do? } + On Bacula version 1.25 and prior, it expects you to have the correct tape + mounted prior to a restore. On Bacula version 1.26 and higher, it will ask + you for the tape, and if the wrong one is mounted, it will inform you. + + If you have previously done an {\bf unmount} command, all Storage daemon + sessions (jobs) will be completely blocked from using the drive unmounted, +so + be sure to do a {\bf mount} after your unmount. If in doubt, do a second + {\bf mount}, it won't cause any harm. \label{windowstart} - -\item [I Cannot Get My Windows Client to Start Automatically? ] -\index[dir]{I Cannot Get My Windows Client to Start Automatically? } -You are probably having one of two problems: either the Client is dying due -to an incorrect configuration file, or you didn't do the Installation -commands necessary to install it as a Windows Service. - -For the first problem, see the next FAQ question. For the second problem, -please review the -\ilink{ Windows Installation instructions}{_ChapterStart7} in this -manual. +\subsection*{I Cannot Get My Windows Client to Start Automatically? } +\item [I Cannot Get My Windows Client to Start Automatically? ] + \index[general]{I Cannot Get My Windows Client to Start Automatically? } + You are probably having one of two problems: either the Client is dying due + to an incorrect configuration file, or you didn't do the Installation + commands necessary to install it as a Windows Service. + + For the first problem, see the next FAQ question. For the second problem, + please review the + \ilink{ Windows Installation instructions}{_ChapterStart7} in this + manual. \label{windowsdie} - +\subsection*{My Windows Client Immediately Dies When I Start It} \item [My Windows Client Immediately Dies When I Start It ] -\index[dir]{My Windows Client Immediately Dies When I Start It } +\index[general]{My Windows Client Immediately Dies When I Start It } The most common problem is either that the configuration file is not where it expects it to be, or that there is an error in the configuration file. You must have the configuration file in {\bf @@ -224,18 +273,18 @@ following: \normalsize This will cause the FD to write a file {\bf bacula.trace} in the current -directory, which you can examine and determine the problem. +directory, which you can examine and thereby determine the problem. \label{scroll} - \item [When I Start the Console, the Error Messages Fly By. How can I see - them? ] -\index[dir]{When I Start the Console, the Error Messages Fly By. How can I see -them? } -Either use a shell window with a scroll bar, or use the gnome-console. In any -case, you probably should be logging all output to a file, and then you can -simply view the file using an editor or the {\bf less} program. To log all -output, I have the following in my Director's Message resource definition: + them? ] + \index[general]{When I Start the Console, the Error Messages Fly By. How can +I see them? } + Either use a shell window with a scroll bar, or use the gnome-console. In +any + case, you probably should be logging all output to a file, and then you can + simply view the file using an editor or the {\bf less} program. To log all + output, I have the following in my Director's Message resource definition: \footnotesize \begin{verbatim} @@ -248,10 +297,12 @@ Obviously you will want to change the filename to be appropriate for your system. \label{nobackup} +\subsection*{My backups are not working on my Windows + Client. What should I do?} \item [I didn't realize that the backups were not working on my Windows - Client. What should I do? ] -\index[fd]{I didn't realize that the backups were not working on my Windows + Client. What should I do? ] +\index[general]{I didn't realize that the backups were not working on my Windows Client. What should I do? } You should be sending yourself an email message for each job. This will avoid the possibility of not knowing about a failed backup. To do so put something @@ -282,69 +333,71 @@ You should also be logging the Director's messages, please see the previous FAQ for how to do so. \label{sched} - +\subsection*{All my Jobs are scheduled for the same time. Will this cause + problems?} \item [All my Jobs are scheduled for the same time. Will this cause - problems? ] -\index[fd]{All my Jobs are scheduled for the same time. Will this cause -problems? } -No, not at all. Bacula will schedule all the Jobs at the same time, but will -run them one after another unless you have increased the number of -simultaneous jobs in the configuration files for the Director, the File -daemon, and the Storage daemon. The appropriate configuration record is {\bf -Maximum Concurrent Jobs = nn}. At the current time, we recommend that you -leave this set to {\bf 1} for the Director. + problems? ] +\index[general]{Schedule problems} + No, not at all. Bacula will schedule all the Jobs at the same time, but will + run them one after another unless you have increased the number of + simultaneous jobs in the configuration files for the Director, the File + daemon, and the Storage daemon. The appropriate configuration record is {\bf + Maximum Concurrent Jobs = nn}. At the current time, we recommend that you + leave this set to {\bf 1} for the Director. \label{disk} - -\item [Can Bacula Backup My System To Files instead of Tape? ] -\index[fd]{Can Bacula Backup My System To Files instead of Tape? } -Yes, in principle, Bacula can backup to any storage medium as long as you -have correctly defined that medium in the Storage daemon's Device resource. -For an example of how to backup to files, please see the -\ilink{Pruning Example}{PruningExample} in the Recycling -chapter of this manual. Also, there is a whole chapter devoted to -\ilink{Backing Up to Disk}{_ChapterStart39}. +\subsection*{Can Bacula Backup My System To Files instead of Tape?} +\item [Can Bacula Backup My System To Files instead of Tape? ] + \index[general]{Can Bacula Backup My System To Files instead of Tape? } + Yes, in principle, Bacula can backup to any storage medium as long as you + have correctly defined that medium in the Storage daemon's Device resource. + For an example of how to backup to files, please see the + \ilink{Pruning Example}{PruningExample} in the Recycling + chapter of this manual. Also, there is a whole chapter devoted to + \ilink{Basic Volume Management}{_ChapterStart39}. This chapter was + originally written to explain how to write to disk, but was expanded + to include volume management. It is, however, still quite a good + chapter to read. \label{bigfiles} - -\item [Can Bacula Backup and Restore Files Greater than 2 Giga bytes in +\subsection*{Can Bacula Backup and Restore Files Greater than 2 Gigabytes?} +\item [Can Bacula Backup and Restore Files Greater than 2 Gigabytes in Size? ] -\index[sd]{Can Bacula Backup and Restore Files Greater than 2 Giga bytes in -Size? } +\index[general]{Large file support} If your operating system permits it, and you are running Bacula version 1.26 or later, the answer is yes. To the best of our knowledge all client system -supported by Bacula can handle files larger than 2 Giga bytes. +supported by Bacula can handle files larger than 2 Gigabytes. \label{cancel} - +\subsection*{I want to stop a job. Is + there a better way than {\bf ./bacula stop} to stop it?} \item [I Started A Job then Decided I Really Did Not Want to Run It. Is - there a better way than {\bf ./bacula stop} to stop it? ] -\index[sd]{I Started A Job then Decided I Really Did Not Want to Run It. Is -there a better way than ./bacula stop to stop it? } -Yes, you normally should use the Console command {\bf cancel} to cancel a Job -that is either scheduled or running. If the Job is scheduled, it will be -marked for cancellation and will be canceled when it is scheduled to start. -If it is running, it will normally terminate after a few minutes. If the Job -is waiting on a tape mount, you may need to do a {\bf mount} command before -it will be canceled. + there a better way than {\bf ./bacula stop} to stop it?] +\index[general]{Cancelling jobs} + Yes, + you normally should use the Console command {\bf cancel} to cancel a Job + that is either scheduled or running. If the Job is scheduled, it will + be marked for cancellation and will be canceled when it is scheduled to + start. If it is running, it will normally terminate after a few + minutes. If the Job is waiting on a tape mount, you may need to do a + {\bf mount} command before it will be canceled. \label{trademark} - +\subsection*{Why have You Trademarked the Name + Bacula\raisebox{.6ex}{{\footnotesize \textsuperscript{\textregistered}}}?} \item [Why have You Trademarked the Name - Bacula\raisebox{.6ex}{{\footnotesize \textsuperscript{\textregistered}}}? ] -\index[sd]{Why have You Trademarked the Name -Bacula\textsuperscript{\textregistered}? } + Bacula\raisebox{.6ex}{{\footnotesize \textsuperscript{\textregistered}}}?] +\index[general]{Bacula Trademark} We have trademarked the name Bacula to ensure that all media written by any program named Bacula will always be compatible. Anyone may use the name Bacula, even in a derivative product as long as it remains totally compatible in all respects with the program defined here. \label{docversion} - -\item [Why is Your Online Document for Version 1.35 of Bacula when the - Currently Release Version is 1.34? ] -\index[sd]{Why is Your Online Document for Version 1.35 of Bacula when the -Currently Release Version is 1.34? } +\subsection*{Why is Your Online Document for Version 1.37 but the Released Version is 1.36?} +\item [Why is Your Online Document for Version 1.37 of Bacula when the + Currently Release Version is 1.36?] +\index[general]{Multiple manuals} As Bacula is being developed, the document is also being enhanced, more often than not it has clarifications of existing features that can be very useful to our users, so we publish the very latest document. Fortunately it is rare @@ -354,97 +407,104 @@ If you want to read a document that pertains only to a specific version, please use the one distributed in the source code. \label{sure} - -\item [How Can I Be Sure that Bacula Really Saves and Restores All Files? ] -\index[sd]{How Can I Be Sure that Bacula Really Saves and Restores All Files? -} -It is really quite simple, but took me awhile to figure out how to ``prove'' -it. First make a Bacula Rescue disk, see the -\ilink{Disaster Recovery Using Bacula}{_ChapterStart38} of this -manual. Second, you run a full backup of all your files on all partitions. -Third, you run an Verify InitCatalog Job on the same FileSet, which -effectively makes a record of all the files on your system. Fourth, you run a -Verify Catalog job and assure yourself that nothing has changed (well, -between an InitCatalog and Catalog one doesn't expect anything). Then do the -unthinkable, write zeros on your MBR (master boot record) wiping out your -hard disk. Now, restore your whole system using your Bacula Rescue disk and -the Full backup you made, and finally re-run the Verify Catalog job. You will -see that with the exception of the directory modification and access dates -and the files changed during the boot, your system is identical to what it -was before you wiped your hard disk. +\subsection*{Does Bacula really save and restore all files?} +\item [How Can I Be Sure that Bacula Really Saves and Restores All Files? ] + \index[general]{How Can I Be Sure that Bacula Really Saves and Restores + All Files? } It is really quite simple, but took me a while to figure + out how to "prove" it. First make a Bacula Rescue disk, see the + \ilink{Disaster Recovery Using Bacula}{_ChapterStart38} of this manual. + Second, you run a full backup of all your files on all partitions. + Third, you run an Verify InitCatalog Job on the same FileSet, which + effectively makes a record of all the files on your system. Fourth, you + run a Verify Catalog job and assure yourself that nothing has changed + (well, between an InitCatalog and Catalog one doesn't expect anything). + Then do the unthinkable, write zeros on your MBR (master boot record) + wiping out your hard disk. Now, restore your whole system using your + Bacula Rescue disk and the Full backup you made, and finally re-run the + Verify Catalog job. You will see that with the exception of the + directory modification and access dates and the files changed during the + boot, your system is identical to what it was before you wiped your hard + disk. + Alternatively you could do the wiping and restoring to another computer + of the same type. \label{upgrade} - +\subsection*{I want an Incremental but Bacula runs it as a Full backup. Why?} \item [I did a Full backup last week, but now in running an Incremental, - Bacula says it did not find a FULL backup time, so it did a FULL backup. Why? ] -\index[dir]{I did a Full backup last week, but now in running an Incremental, -Bacula says it did not find a FULL backup time, so it did a FULL backup. Why? -} -Before doing an Incremental or a Differential backup, Bacula checks to see if -there was a prior Full backup of the same Job that terminated successfully. -If so, it uses the date that full backup started as the time for comparing if -files have changed. If Bacula does not find a successfully full backup, it -proceeds to do one. Perhaps you canceled the full backup, or it terminated in -error. In such cases, the full backup will not be successful. You can check -by entering {\bf list jobs} and look to see if there is a prior Job with the -same Name that has Level F and JobStatus T (normal termination). - -Another reason why Bacula may not find a suitable Full backup is that every -time you change the FileSet, Bacula will require a new Full backup. This is -necessary to ensure that all files are properly backed up in the case where -you have added more files to the FileSet. Beginning with version 1.31, the -FileSets are also dated when they are created, and this date is displayed -with the name when you are listing or selecting a FileSet. For more on backup -levels see below. + Bacula says it did not find a FULL backup, so it did a FULL backup. Why?] + \index[general]{I did a Full backup last week, but now in running an + Incremental, Bacula says it did not find a FULL backup, so it did a + FULL backup. Why? } Before doing an Incremental or a Differential + backup, Bacula checks to see if there was a prior Full backup of the + same Job that terminated successfully. If so, it uses the date that + full backup started as the time for comparing if files have changed. If + Bacula does not find a successful full backup, it proceeds to do one. + Perhaps you canceled the full backup, or it terminated in error. In + such cases, the full backup will not be successful. You can check by + entering {\bf list jobs} and look to see if there is a prior Job with + the same Name that has Level F and JobStatus T (normal termination). + + Another reason why Bacula may not find a suitable Full backup is that + every time you change the FileSet, Bacula will require a new Full + backup. This is necessary to ensure that all files are properly backed + up in the case where you have added more files to the FileSet. + Beginning with version 1.31, the FileSets are also dated when they are + created, and this date is displayed with the name when you are listing + or selecting a FileSet. For more on backup levels see below. \label{filenamelengths} - +\subsection*{Do you really handle unlimited path lengths?} \item [How Can You Claim to Handle Unlimited Path and Filename Lengths - when All Other Programs Have Fixed Limits? ] -\index[dir]{How Can You Claim to Handle Unlimited Path and Filename Lengths -when All Other Programs Have Fixed Limits? } -Most of those other programs have been around for a long time, in fact since -the beginning of Unix, which means that they were designed for rather small -fixed length path and filename lengths. Over the years, these restrictions -have been relaxed allowing longer names. Bacula on the other hand was -designed in 2000, and so from the start, Path and Filenames have been keep in -buffers that start at 256 bytes in length but can grow as needed to handle -any length. Most of the work is carried out by lower level routines making -the coding rather easy. + when All Other Programs Have Fixed Limits?] + \index[general]{How Can You Claim to Handle Unlimited Path and Filename + Lengths when All Other Programs Have Fixed Limits? } Most of those + other programs have been around for a long time, in fact since the + beginning of Unix, which means that they were designed for rather small + fixed length path and filename lengths. Over the years, these + restrictions have been relaxed allowing longer names. Bacula on the + other hand was designed in 2000, and so from the start, Path and + Filenames have been kept in buffers that start at 256 bytes in length, + but can grow as needed to handle any length. Most of the work is + carried out by lower level routines making the coding rather easy. + + Note that due to limitations Win32 path and filenames cannot exceed + 260 characters. By using Win32 Unicode functions, we will remove this + restriction in later versions of Bacula. \label{unique} - -\item [What Is the Really Unique Feature of Bacula? ] -\index[dir]{What Is the Really Unique Feature of Bacula? } -Well, it is hard to come up with unique features when backup programs for -Unix machines have been around since the 1960s. That said, I believe that -Bacula is the first and only program to use a standard SQL interface to its -catalog database. Although this adds a bit of complexity and possibly -overhead, it provides an amazingly rich set of features that are easy to -program and enhance. The current code has barely scratched the surface in -this regard (version 1.31). - -The second feature, which gives a lot of power and flexibility to Bacula is -the Bootstrap record definition. - -The third unique feature, which is currently (1.30) unimplemented, and thus -can be called vaporware :-), is Base level saves. When implemented, this will -enormously reduce tape usage. +\subsection*{What Is the Really Unique Feature of Bacula?} +\item [What Is the Really Unique Feature of Bacula?] + \index[general]{What Is the Really Unique Feature of Bacula? } Well, it + is hard to come up with unique features when backup programs for Unix + machines have been around since the 1960s. That said, I believe that + Bacula is the first and only program to use a standard SQL interface to + catalog its database. Although this adds a bit of complexity and + possibly overhead, it provides an amazingly rich set of features that + are easy to program and enhance. The current code has barely scratched + the surface in this regard (version 1.31). + + The second feature, which gives a lot of power and flexibility to Bacula + is the Bootstrap record definition. + + The third unique feature, which is currently (1.30) unimplemented, and + thus can be called vaporware :-), is Base level saves. When + implemented, this will enormously reduce tape usage. \label{sequence} - -\item [If I Do Run Multiple Simultaneous Jobs, How Can I Force One - Particular Job to Run After Another Job? ] -\index[dir]{If I Do Run Multiple Simultaneous Jobs, How Can I Force One +\subsection*{How can I force one job to run after another?} +\item [If I Run Multiple Simultaneous Jobs, How Can I Force One + Particular Job to Run After Another Job? ] +\index[general]{If I Run Multiple Simultaneous Jobs, How Can I Force One Particular Job to Run After Another Job? } Yes, you can set Priorities on your jobs so that they run in the order you specify. Please see: \ilink{the Priority record}{Priority} in the Job resource. \label{nomail} +\subsection*{I Am Not Getting Email Notification, What Can I Do? } +\item [I Am Not Getting Email Notification, What Can I Do? ] -\item [I Am Not Getting Email Notification, What Can I Do? ] -\index[dir]{I Am Not Getting Email Notification, What Can I Do? } +\index[general]{I Am Not Getting Email Notification, What Can I Do? } The most common problem is that you have not specified a fully qualified email address and your bsmtp server is rejecting the mail. The next most common problem is that your bsmtp server doesn't like the syntax on the From @@ -459,47 +519,48 @@ program, please see manual. \label{periods} - +\subsection*{My retention periods don't work} \item [I Change Recycling, Retention Periods, or File Sizes in my Pool - Resource and they Still Don``t Work. ] -\index[dir]{I Change Recycling, Retention Periods, or File Sizes in my Pool -Resource and they Still Don"t Work. } -The different variables associated with a Pool are defined in the Pool -Resource, but are actually read by Bacula from the Catalog database. On -Bacula versions prior to 1.30, after changing your Pool Resource, you must -manually update the corresponding values in the Catalog by using the {\bf -update pool} command in the Console program. In Bacula version 1.30, Bacula -does this for you automatically every time it starts. - -When Bacula creates a Media record (Volume), it uses many default values from -the Pool record. If you subsequently change the Pool record, the new values -will be used as a default for the next Volume that is created, but if you -want the new values to apply to existing Volumes, you must manually update -the Volume Catalog entry using the {\bf update volume} command in the Console -program. + Resource and they Still Don't Work.] +\index[general]{Recycling} +\index[general]{Retention Periods} +\index[general]{Pool changes} + The different variables associated with a Pool are defined in the Pool + Resource, but are actually read by Bacula from the Catalog database. On + Bacula versions prior to 1.30, after changing your Pool Resource, you must + manually update the corresponding values in the Catalog by using the {\bf + update pool} command in the Console program. In Bacula version 1.30, Bacula + does this for you automatically every time it starts. + + When Bacula creates a Media record (Volume), it uses many default values from + the Pool record. If you subsequently change the Pool record, the new values + will be used as a default for the next Volume that is created, but if you + want the new values to apply to existing Volumes, you must manually update + the Volume Catalog entry using the {\bf update volume} command in the Console + program. \label{CompressionNotWorking} - +\subsection*{Why aren't my files compressed?} \item [I Have Configured Compression On, But None of My Files Are - Compressed. Why? ] -\index[dir]{I Have Configured Compression On, But None of My Files Are -Compressed. Why? } -There are two kinds of compression. One is tape compression. This is done by -the tape drive hardware, and you either enable or disable it with system -tools such as {\bf mt}. This compression works independently of Bacula. - -Bacula also has compression code, which is normally used only when backing up -to file Volumes. There are two conditions for this ''software`` to be -enabled. + Compressed. Why?] +\index[general]{Compression} + There are two kinds of compression. One is tape compression. This is done by + the tape drive hardware, and you either enable or disable it with system + tools such as {\bf mt}. This compression works independently of Bacula. + + Bacula also has compression code, which is normally used only when backing +up + to file Volumes. There are two conditions for this "software" to become + enabled. \begin{enumerate} \item You must have the zip development libraries loaded on your system when building Bacula and Bacula must find this library, normally {\bf /usr/lib/libz.a}. On RedHat systems, this library is provided by the {\bf -zlib-devel} rpm. + zlib-devel} rpm. -If the library is found by Bacula during the {\bf ./configure} it will be -indicated on the {\bf config.out} line by: + If the library is found by Bacula during the {\bf ./configure} it will be + mentioned in the {\bf config.out} line by: \footnotesize \begin{verbatim} @@ -510,44 +571,43 @@ indicated on the {\bf config.out} line by: \item You must add the {\bf compression=gzip} option on your Include statement in the Director's configuration file. - \end{enumerate} +\end{enumerate} \label{NewTape} - \item [Bacula is Asking for a New Tape After 2 GB of Data but My Tape - holds 33 GB. Why? ] -\index[fd]{Bacula is Asking for a New Tape After 2 GB of Data but My Tape -holds 33 GB. Why? } + holds 33 GB. Why?] +\index[general]{Tape capacity} There are several reasons why Bacula will request a new tape. \begin{itemize} \item There is an I/O error on the tape. Bacula prints an error message and - requests a new tape. Bacula does not attempt to continue writing after an I/O + requests a new tape. Bacula does not attempt to continue writing after an +I/O error. \item Bacula encounters and end of medium on the tape. This is not always distinguishable from an I/O error. \item You have specifically set some size limitation on the tape. For example the {\bf Maximum Volume Bytes} or {\bf Maximum Volume Files} in the Director's Pool resource, or {\bf Maximum Volume Size} in the Storage -daemon's Device resource. + daemon's Device resource. \end{itemize} \label{LevelChanging} - +\subsection*{Incremental backups are not working} \item [Bacula is Not Doing the Right Thing When I Request an Incremental - Backup. Why? ] -\index[fd]{Bacula is Not Doing the Right Thing When I Request an Incremental -Backup. Why? } -As explained in one of the previous questions, Bacula will automatically -upgrade an Incremental or Differential job to a Full backup if it cannot find -a prior Full backup or a suitable Full backup. For the gory details on -how/when Bacula decides to upgrade levels please see the -\ilink{Level record}{Level} in the Director's configuration -chapter of this manual. - -If after reading the above mentioned section, you believe that Bacula is not -correctly handling the level (Differential/Incremental), please send us the -following information for analysis: + Backup. Why?] + \index[general]{Incremental backups} + As explained in one of the previous questions, Bacula will automatically + upgrade an Incremental or Differential job to a Full backup if it cannot +find + a prior Full backup or a suitable Full backup. For the gory details on + how/when Bacula decides to upgrade levels please see the + \ilink{Level record}{Level} in the Director's configuration + chapter of this manual. + + If after reading the above mentioned section, you believe that Bacula is not + correctly handling the level (Differential/Incremental), please send us the + following information for analysis: \begin{itemize} \item Your Director's configuration file. @@ -567,17 +627,20 @@ The above information can allow us to analyze what happened, without it, there is not much we can do. \label{WaitForever} - +\subsection*{I am waiting forever for a backup of an offsite machine} \item [I am Backing Up an Offsite Machine with an Unreliable Connection. - The Director Waits Forever for the Client to Contact the SD. What Can I Do. ] -\index[fd]{I am Backing Up an Offsite Machine with an Unreliable Connection. -The Director Waits Forever for the Client to Contact the SD. What Can I Do. } -Bacula was written on the assumption that it will have a good TCP/IP -connection between all the daemons. As a consequence, the current Bacula -doesn't deal with faulty connection very well. This situation is slowly being -corrected over time. - -There are several things you can do to improve the situation. + The Director Waits Forever for the Client to Contact the SD. What Can I +Do?] + \index[general]{I am Backing Up an Offsite Machine with an Unreliable +Connection. + The Director Waits Forever for the Client to Contact the SD. What Can I Do?} + Bacula was written on the assumption that it will have a good TCP/IP + connection between all the daemons. As a consequence, the current Bacula + doesn't deal with faulty connections very well. This situation is slowly +being + corrected over time. + + There are several things you can do to improve the situation. \begin{itemize} \item Upgrade to version 1.32 and use the new SDConnectTimeout record. For @@ -595,17 +658,18 @@ in the FileDaemon resource. \end{itemize} \label{sshHanging} - +\subsection*{SSH hangs forever after starting Bacula} \item [When I ssh into a machine and start Bacula then attempt to exit, - ssh hangs forever. ] -\index[fd]{When I ssh into a machine and start Bacula then attempt to exit, -ssh hangs forever. } -This happens because Bacula leaves stdin, stdout, and stderr open for debug -purposes. To avoid it, the simplest thing to do is to redirect the output of -those files to {\bf /dev/null} or another file in your startup script (the -RedHat autostart scripts do this automatically). For example, you start the -Director with: - + ssh hangs forever.] + \index[general]{When I ssh into a machine and start Bacula then attempt to +exit, + ssh hangs forever. } + This happens because Bacula leaves stdin, stdout, and stderr open for debug + purposes. To avoid it, the simplest thing to do is to redirect the output of + those files to {\bf /dev/null} or another file in your startup script (the + RedHat autostart scripts do this automatically). For example, you start the + Director with: + \footnotesize \begin{verbatim} bacula-dir -c bacula-dir.conf ... 0>\&1 2>\&1 >/dev/null @@ -616,33 +680,39 @@ Director with: and likewise for the other daemons. \label{RetentionPeriods} - +\subsection*{I'm confused by retention periods} \item [I'm confused by the different Retention periods: File Retention, - Job Retention, Volume Retention. Why are there so many? ] -\index[dir]{I'm confused by the different Retention periods: File Retention, -Job Retention, Volume Retention. Why are there so many? } -Yes, this certainly can be confusing. The basic reason for so many is to -allow flexibility. The File records take quite a lot of space in the catalog, -so they are typically records you want to remove rather quickly. The Job -records, take very little space, and they can be useful even without the File -records to see what Jobs actually ran and when. One must understand that if -the File records are removed from the catalog, you cannot use the {\bf -restore} command to restore an individual file since Bacula no longer knows -where it is. However, as long as the Volume Retention period has not expired, -the data will still be on the tape, and can be recovered from the tape. - -For example, I keep a 30 day retention period for my Files to keep my catalog -from getting too big, but I keep my tapes for a minimum of one year, just in -case. + Job Retention, Volume Retention. Why are there so many?] + \index[general]{I'm confused by the different Retention periods: File +Retention, + Job Retention, Volume Retention. Why are there so many? } + Yes, this certainly can be confusing. The basic reason for so many is to + allow flexibility. The File records take quite a lot of space in the +catalog, + so they are typically records you want to remove rather quickly. The Job + records, take very little space, and they can be useful even without the +File + records to see what Jobs actually ran and when. One must understand that if + the File records are removed from the catalog, you cannot use the {\bf + restore} command to restore an individual file since Bacula no longer knows + where it is. However, as long as the Volume Retention period has not +expired, + the data will still be on the tape, and can be recovered from the tape. + + For example, I keep a 30 day retention period for my Files to keep my +catalog + from getting too big, but I keep my tapes for a minimum of one year, just in + case. \label{MaxVolumeSize} - -\item [Why Does Bacula Ignore the MaxVolumeSize Set in my Pool? ] -\index[fd]{Why Does Bacula Ignore the MaxVolumeSize Set in my Pool? } -The MaxVolumeSize that Bacula uses comes from the Media record, so most -likely you changed your Pool, which is used as the default for creating Media -records, {\bf after} you created your Volume. Check what is in the Media -record by doing: +\subsection*{MaxVolumeSize is ignored} +\item [Why Does Bacula Ignore the MaxVolumeSize Set in my Pool?] + \index[general]{Why Does Bacula Ignore the MaxVolumeSize Set in my Pool? } + The MaxVolumeSize that Bacula uses comes from the Media record, so most + likely you changed your Pool, which is used as the default for creating +Media + records, {\bf after} you created your Volume. Check what is in the Media + record by doing: \footnotesize \begin{verbatim} @@ -661,12 +731,14 @@ update Volume=xxx to change it. \label{ConnectionRefused} - -\item [In connecting to my Client, I get ''ERR:Connection Refused. Packet - Size too big from File daemon:192.168.1.4:9102`` Why? ] -\index[fd]{In connecting to my Client, I get ``ERR:Connection Refused. -Packet Size too big from File daemon:192.168.1.4:9102'' Why? } -This is typically a communications error resulting from one of the following: +\subsection*{I get a Connection refused when connecting to my Client} +\item [In connecting to my Client, I get "ERR:Connection Refused. Packet + Size too big from File daemon:192.168.1.4:9102" Why?] + \index[general]{In connecting to my Client, I get "ERR:Connection +Refused. + Packet Size too big from File daemon:192.168.1.4:9102" Why? } + This is typically a communications error resulting from one of the +following: \begin{itemize} @@ -674,7 +746,7 @@ This is typically a communications error resulting from one of the following: using the same I/O packet. Fixed in more recent versions. Please upgrade. \item Some other program such as an HP Printer using the same port (9102 in this case). - \end{itemize} +\end{itemize} If it is neither of the above, please submit a bug report at \elink{bugs.bacula.org}{http://bugs.bacula.org}. @@ -691,6 +763,86 @@ Another solution might be to run the daemon with the debug option by: \normalsize This will cause the FD to write a file {\bf bacula.trace} in the current -directory, which you can examine and determine the problem. +directory, which you can examine to determine the problem. + +\subsection*{Long running jobs die with Pipe Error} +\item [During long running jobs my File daemon dies with Pipe Error, or + some other communications error. Why?] + \index[general]{Communications Errors} + \index[general]{Pipe Errors} + There are a number of reasons why a connection might break. + Most often, it is a router between your two computers that times out + inactive lines (not respecting the keepalive feature that Bacula uses). + In that case, you can use the {\bf Heartbeat Interval} directive in + both the Storage daemon and the File daemon. + + In at least one case, the problem has been a bad driver for a Win32 + NVidia NForce 3 ethernet card with driver (4.4.2 17/05/2004). + In this case, a good driver is (4.8.2.0 06/04/2005). Moral of + the story, make sure you have the latest ethernet drivers + loaded, or use the following workaround as suggested by Thomas + Simmons for Win32 machines: + + Browse to: + Start \gt{} Control Panel \gt{} Network Connections + + Right click the connection for the nvidia adapter and select properties. + Under the General tab, click "Configure...". Under the Advanced tab set + "Checksum Offload" to disabled and click OK to save the change. + + Lack of communications, or communications that get interrupted can + also be caused by Linux firewalls where you have a rule that throttles + connections or traffic. For example, if you have: + +\footnotesize +\begin{verbatim} +iptables -t filter -A INPUT -m limit --limit 3/second --limit-burst 3 -j DROP +\end{verbatim} +\normalsize + + you will want to add the following rules {\bf before} the above rule: +\footnotesize +\begin{verbatim} +iptables -t filter -A INPUT --dport 9101 -j ACCEPT +iptables -t filter -A INPUT --dport 9102 -j ACCEPT +iptables -t filter -A INPUT --dport 9103 -j ACCEPT +\end{verbatim} +\normalsize + This will ensure that any Bacula traffic will not get terminated because + of high usage rates. + +\subsection*{How to I tell the Job which Volume to use?} +\item[I can't figure out how to tell the job which volume to use] + \index[general]{What tape to mount} + This is an interesting statement. I now see that a number of people new to + Bacula have the same problem as you, probably from using programs like tar. + + In fact, you do not tell Bacula what tapes to use. It is the inverse. Bacula + tells you want tapes it wants. You put tapes at its disposition and it + chooses. + + Now, if you *really* want to be tricky and try to tell Bacula what to do, it + will be reasonable if for example you mount a valid tape that it can use on a + drive, it will most likely go ahead and use it. It also has a documented + algorithm for choosing tapes -- but you are asking for problems ... + + So, the trick is to invert your concept of things and put Bacula in charge of + handling the tapes. Once you do that, you will be fine. If you want to + anticipate what it is going to do, you can generally figure it out correctly + and get what you want. + + If you start with the idea that you are going to force or tell Bacula to use + particular tapes or you insist on trying to run in that kind of mode, you will + probably not be too happy. + + I don't want to worry about what tape has what data. That is what Bacula is + designed for. + + If you have an application where you *really* need to remove a tape each day + and insert a new one, it can be done the directives exist to accomplish that. + In such a case, one little "trick" to knowing what tape Bacula will want at + 2am while you are asleep is to run a tiny job at 4pm while you are still at + work that backs up say one directory, or even one file. You will quickly find + out what tape it wants, and you can mount it before you go home ... \end{description} diff --git a/docs/manual-fr/filedconf.tex b/docs/manual-fr/filedconf.tex index 61331a99..3ecacbaa 100644 --- a/docs/manual-fr/filedconf.tex +++ b/docs/manual-fr/filedconf.tex @@ -54,18 +54,27 @@ client program. \item [Name = \lt{}name\gt{}] \index[fd]{Name } The client name that must be used by the Director when connecting. Generally, -it is a good idea to use a name related to the machine so that error messages -can be easily identified if you have multiple Clients. This record is -required. + it is a good idea to use a name related to the machine so that error messages + can be easily identified if you have multiple Clients. This directive is + required. \item [Working Directory = \lt{}Directory\gt{}] \index[fd]{Working Directory } This directive is mandatory and specifies a directory in which the File -daemon may put its status files. This directory should be used only by {\bf -Bacula}, but may be shared by other Bacula daemons. This record is required + daemon may put its status files. This directory should be used only by {\bf + Bacula}, but may be shared by other Bacula daemons provided the daemon + names on the {\bf Name} definition are unique for each daemon. This directive + is required. + + On Win32 systems, in some circumstances you may need to specify a drive + letter in the specified working directory path. Also, please be sure + that this directory is writable by the SYSTEM user otherwise restores + may fail (the bootstrap file that is transferred to the File daemon from + the Director is temporarily put in this directory before being passed + to the Storage daemon). \item [Pid Directory = \lt{}Directory\gt{}] - \index[dir]{Pid Directory } + \index[fd]{Pid Directory } This directive is mandatory and specifies a directory in which the Director may put its process Id file files. The process Id file is used to shutdown Bacula and to prevent multiple copies of Bacula from running simultaneously. @@ -78,30 +87,52 @@ not installing Bacula in the system directories, you can use the {\bf Working Directory} as defined above. \item [Heartbeat Interval = \lt{}time-interval\gt{}] - \index[dir]{Heartbeat Interval } - This record defines an interval of time. For each heartbeat that the File -daemon receives from the Storage daemon, it will forward it to the Director. -In addition, if no heartbeat has been received from the Storage daemon and -thus forwarded the File daemon will send a heartbeat signal to the Director -and to the Storage daemon to keep the channels active. The default interval -is zero which disables the heartbeat. This feature is particularly useful if -you have a router such as 3Com that does not follow Internet standards and -times out an inactive connection after a short duration. + \index[fd]{Heartbeat Interval } + \index[general]{Heartbeat Interval} + \index[general]{Broken pipe} + This record defines an interval of time. For each heartbeat that the + File daemon receives from the Storage daemon, it will forward it to the + Director. In addition, if no heartbeat has been received from the + Storage daemon and thus forwarded the File daemon will send a heartbeat + signal to the Director and to the Storage daemon to keep the channels + active. The default interval is zero which disables the heartbeat. + This feature is particularly useful if you have a router such as 3Com + that does not follow Internet standards and times out a valid + connection after a short duration despite the fact that keepalive is + set. This usually results in a broken pipe error message. + + If you continue getting broken pipe error messages despite using the + Heartbeat Interval, and you are using Windows, you should consider + upgrading your ethernet driver. This is a known problem with NVidia + NForce 3 drivers (4.4.2 17/05/2004), or try the following workaround + suggested by Thomas Simmons for Win32 machines: + + Browse to: + Start \gt{} Control Panel \gt{} Network Connections + + Right click the connection for the nvidia adapter and select properties. + Under the General tab, click "Configure...". Under the Advanced tab set + "Checksum Offload" to disabled and click OK to save the change. + + Lack of communications, or communications that get interrupted can + also be caused by Linux firewalls where you have a rule that throttles + connections or traffic. + \item [Maximum Concurrent Jobs = \lt{}number\gt{}] - \index[dir]{Maximum Concurrent Jobs } - where \lt{}number\gt{} is the maximum number of Jobs that should run -concurrently. The default is set to 2, but you may set it to a larger number. -Each contact from the Director (e.g. status request, job start request) is -considered as a Job, so if you want to be able to do a {\bf status} request -in the console at the same time as a Job is running, you will need to set -this value greater than 1. + \index[fd]{Maximum Concurrent Jobs } + where \lt{}number\gt{} is the maximum number of Jobs that should run + concurrently. The default is set to 2, but you may set it to a larger + number. Each contact from the Director (e.g. status request, job start + request) is considered as a Job, so if you want to be able to do a {\bf + status} request in the console at the same time as a Job is running, you + will need to set this value greater than 1. \item [FDAddresses = \lt{}IP-address-specification\gt{}] \index[console]{FDAddresses } - Specify the ports and addresses on which the Director daemon will listen for -Bacula Console connections. Probably the simplest way to explain is to show -an example: + Specify the ports and addresses on which the Director daemon will listen + for Bacula Console connections. Probably the simplest way to explain is + to show an example: \footnotesize \begin{verbatim} @@ -158,7 +189,7 @@ to any available address (the default). connect to the Storage daemon. The default is 30 minutes. If no connection is made in the specified time interval, the File daemon cancels the Job. -\item [Maximum Network Buffer Size = \lt{}bytes\gt{} ] +\item [Maximum Network Buffer Size = \lt{}bytes\gt{}] \index[console]{Maximum Network Buffer Size } where \lt{}bytes\gt{} specifies the initial network buffer size to use with the File daemon. This size will be adjusted down if it is too large until it diff --git a/docs/manual-fr/firewalls.tex b/docs/manual-fr/firewalls.tex index 1d1c0beb..abe36a70 100644 --- a/docs/manual-fr/firewalls.tex +++ b/docs/manual-fr/firewalls.tex @@ -32,8 +32,8 @@ Where it should be obvious that DIR represents the Director, FD the File daemon or client, and SD the Storage daemon. The numbers that follow those names are the standard ports used by Bacula, and the -\gt{} represents the left side making a connection to the right side (i.e. the right side is the -``server'' or is listening on the specified port), and the left side is the -``client'' who initiates the conversation. +"server" or is listening on the specified port), and the left side is the +"client" who initiates the conversation. Note, port 9103 serves both the Director and the File daemon, each having its own independent connection. @@ -348,3 +348,25 @@ In order for the above 'Public1-Backup' Job to succeed, firewall.mydomain.tld:9103 MUST be forwarded using the firewall's configuration software to server.int.mydomain.tld:9103. Some firewalls call this 'Server Publication'. Others may call it 'Port Forwarding'. + +\subsubsection*{Firewall Problems} +\index[general]{Firewall Problems} +\index[general]{Problems!Firewalls} +\addcontentsline{toc}{subsubsection}{Firewall Problems} +Either a firewall or a router may decide to timeout and terminate +open connections if they are not active for a short time. By Internet +standards the period should be two hours, and should be indefinitely +extended if KEEPALIVE is set as is the case by Bacula. If your firewall +or router does not respect these rules, you may find Bacula connections +terminated. In that case, the first thing to try is turning on the +{\bf Heart Beat Interval} both in the File daemon and the Storage daemon +and set an interval of say five minutes. + +Also, if you have denial of service rate limiting in your firewall, this +too can cause Bacula disconnects since Bacula can at times use very high +access rates. To avoid this, you should implement default accept +rules for the Bacula ports involved before the rate limiting rules. + +Finally, if you have a Windows machine, it will most likely by default +disallow connections to the Bacula Windows File daemon. See the +Windows chapter of this manual for additional details. diff --git a/docs/manual-fr/kaboom.tex b/docs/manual-fr/kaboom.tex index 958919e2..2a4245d3 100644 --- a/docs/manual-fr/kaboom.tex +++ b/docs/manual-fr/kaboom.tex @@ -44,7 +44,7 @@ to correct the problems by editing the {\bf btraceback} file. I recommend not spending too much time on trying to get the traceback to work as it can be very difficult. -The changes that might needed are to add a correct path to the {\bf gdb} +The changes that might be needed are to add a correct path to the {\bf gdb} program, correct the path to the {\bf btraceback.gdb} file, change the {\bf mail} program or its path, or change your email address. The key line in the {\bf btraceback} file is: @@ -64,7 +64,7 @@ sufficient if you are running more than one daemon on a machine. \index[general]{Testing The Traceback } \addcontentsline{toc}{subsection}{Testing The Traceback} -To ``manually'' test the traceback feature, you simply start {\bf Bacula} then +To "manually" test the traceback feature, you simply start {\bf Bacula} then obtain the {\bf PID} of the main daemon thread (there are multiple threads). Unfortunately, the output had to be split to fit on this page: diff --git a/docs/manual-fr/license.tex b/docs/manual-fr/license.tex index 034d5c5a..faaa3e50 100644 --- a/docs/manual-fr/license.tex +++ b/docs/manual-fr/license.tex @@ -18,16 +18,17 @@ The vast bulk of the code is released under a modified version of the modifications (actually additions) are described in the source file LICENSE, and their purpose is not to alter the essential qualities of the GPL but to permit more freedom in linking certain third party software supposedly non-GPL -compatable, provide termination for Patent (and IP) actions, clarify +compatible, provide termination for Patent (and IP) actions, clarify contributors IP and Copyright claims and non-infringment intentions. The details and governing text are in the file LICENSE in the main source directory. -Most of this code is copyrighted: Copyright (C) 2000-2004 Kern Sibbald and -John Walker. or Copyright (C) 2000-2004 Kern Sibbald +Most of this code is copyrighted: Copyright \copyright 2000-2004 Kern Sibbald and +John Walker or Copyright \copyright 2000-2005 Kern Sibbald. Portions may be copyrighted by other people (ATT, the Free Software -Foundation, ...). +Foundation, ...). Generally these portions are released under a +non-modified GPL 2 license. \subsection*{LGPL} \index[general]{LGPL } @@ -43,8 +44,8 @@ programs to interface to Bacula. \index[general]{Public Domain } \addcontentsline{toc}{subsection}{Public Domain} -Some of the Bacula code has been released to the public domain. E.g. md5.c, -SQLite. +Some of the Bacula code, or code that Bacula references, has been released +to the public domain. E.g. md5.c, SQLite. \subsection*{Trademark} \index[general]{Trademark } @@ -53,10 +54,10 @@ SQLite. Bacula\raisebox{.6ex}{\textsuperscript{\textregistered}}is a registered trademark of Kern Sibbald and John Walker. -We have trademarked the Bacula name to ensure that any variant of Bacula will -be exactly compatible with the program that we have released. The use of the -name Bacula is restricted to software systems that agree exactly with the -program presented here. +We have trademarked the Bacula name to ensure that any program using the +name Bacula will be exactly compatible with the program that we have +released. The use of the name Bacula is restricted to software systems +that agree exactly with the program presented here. \subsection*{Disclaimer} \index[general]{Disclaimer } @@ -67,7 +68,7 @@ NO WARRANTY BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE -PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, @@ -81,4 +82,3 @@ OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - diff --git a/docs/manual-fr/messagesres.tex b/docs/manual-fr/messagesres.tex index a4825aad..a52c3e04 100644 --- a/docs/manual-fr/messagesres.tex +++ b/docs/manual-fr/messagesres.tex @@ -62,7 +62,7 @@ where the message is to be sent ({\bf stdout}, {\bf file}, ...), {\bf message-type} is one of a predefined set of keywords that define the type of message generated by {\bf Bacula} ({\bf ERROR}, {\bf WARNING}, {\bf FATAL}, ...), and {\bf address} varies according to the {\bf destination} keyword, but -is typically and email address or a filename. +is typically an email address or a filename. \end{description} The following are the list of the possible record definitions that can be used @@ -85,7 +85,7 @@ tie this Messages resource to a Job and/or to the daemon. In the absence of this resource, Bacula will send all mail using the following command: -{\bf mail -s ``Bacula Message'' \lt{}recipients\gt{}} +{\bf mail -s "Bacula Message" \lt{}recipients\gt{}} In many cases, depending on your machine, this command may not work. Using the {\bf MailCommand}, you can specify exactly how to send the mail. During @@ -109,17 +109,17 @@ The following is the command I (Kern) use. Note, the whole command should appear on a single line in the configuration file rather than split as is done here for presentation: -{\bf mailcommand = ``/home/kern/bacula/bin/bsmtp -h mail.whitehouse.com -f -\textbackslash{}''\textbackslash{}(Bacula\textbackslash{}) -\%r\textbackslash{}`` -s \textbackslash{}''Bacula: \%t \%e of \%c -\%l\textbackslash{}`` \%r'' } +{\bf mailcommand = "/home/kern/bacula/bin/bsmtp -h mail.example.com -f +\textbackslash{}"\textbackslash{}(Bacula\textbackslash{}) +\%r\textbackslash{}" -s \textbackslash{}"Bacula: \%t \%e of \%c +\%l\textbackslash{}" \%r" } Note, the {\bf bsmtp} program is provided as part of {\bf Bacula}. For additional details, please see the \ilink{ bsmtp -- Customizing Your Email Messages}{bsmtp} section of the Bacula Utility Programs chapter of this manual. Please test any {\bf mailcommand} that you use to ensure that your bsmtp gateway accepts the -addressing form that you use. Certain program such as Exim can be very +addressing form that you use. Certain programs such as Exim can be very selective as to what forms are permitted particularly in the from part. \item [OperatorCommand = \lt{}command\gt{}] @@ -136,7 +136,7 @@ Higher debug levels cause more debug information to be produced. You are requested not to use this record since it will be deprecated. \item [\lt{}destination\gt{} = \lt{}message-type1\gt{}, - \lt{}message-type2\>, ...] + \lt{}message-type2\gt{}, ...] \index[fd]{\lt{}destination\gt{} } Where {\bf destination} may be one of the following: @@ -158,7 +158,7 @@ until the console program connects to the Director. \end{description} \item {\bf \lt{}destination\gt{} = \lt{}address\gt{} = - \lt{}message-type1\gt{}, \lt{}message-type2\>, ...} + \lt{}message-type1\gt{}, \lt{}message-type2\gt{}, ...} \index[console]{\lt{}destination\gt{} } Where {\bf address} depends on the {\bf destination}, which may be one of the @@ -312,15 +312,15 @@ split for this manual: \begin{verbatim} Messages { Name = Standard - mailcommand = "bacula/bin/bsmtp -h mail.whitehouse.com \ + mailcommand = "bacula/bin/bsmtp -h mail.example.com \ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r" - operatorcommand = "bacula/bin/bsmtp -h mail.whitehouse.com \ + operatorcommand = "bacula/bin/bsmtp -h mail.example.com \ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed \ for %j\" %r" - MailOnError = security@whitehouse.com = all, !skipped, \ + MailOnError = security@example.com = all, !skipped, \ !terminate append = "bacula/bin/log" = all, !skipped, !terminate - operator = security@whitehouse.com = mount + operator = security@example.com = mount console = all, !skipped, !saved } \end{verbatim} diff --git a/docs/manual-fr/monitorconf.tex b/docs/manual-fr/monitorconf.tex index b3a42f02..2c9162e1 100644 --- a/docs/manual-fr/monitorconf.tex +++ b/docs/manual-fr/monitorconf.tex @@ -2,7 +2,7 @@ %% \section*{Monitor Configuration} -\label{_ChapterStart35} +\label{_MonitorChapter} \index[general]{Monitor Configuration } \index[general]{Configuration!Monitor } \addcontentsline{toc}{section}{Monitor Configuration} @@ -86,7 +86,7 @@ obtaining full Director privileges, you must create a Console resource in the \ilink{Director's configuration}{_ChapterStart40} file, using the Console Name and Password defined in the Monitor resource. To avoid security problems, you should configure this Console resource to allow access to no -others daemon, and permit the use of only two commands: {\bf status} and {\bf +other daemons, and permit the use of only two commands: {\bf status} and {\bf .status} (see below for an example). You may have multiple Director resource specifications in a single Monitor @@ -101,14 +101,14 @@ configuration file. \item [Name = \lt{}name\gt{}] \index[fd]{Name } The Director name used to identify the Director in the list of monitored -daemons. It is not required to be the same as defined in the Director's +daemons. It is not required to be the same as the one defined in the Director's configuration file. This record is required. \item [DIRPort = \lt{}port-number\gt{}] \index[fd]{DIRPort } Specify the port to use to connect to the Director. This value will most likely already be set to the value you specified on the {\bf -\verb{--{with-base-port} option of the {\bf ./configure} command. This port must be +\verb:--:with-base-port} option of the {\bf ./configure} command. This port must be identical to the {\bf DIRport} specified in the {\bf Director} resource of the \ilink{Director's configuration}{_ChapterStart40} file. The @@ -147,7 +147,7 @@ configuration file. \item [Name = \lt{}name\gt{}] \index[fd]{Name } The Client name used to identify the Director in the list of monitored -daemons. It is not required to be the same as defined in the Client's +daemons. It is not required to be the same as the one defined in the Client's configuration file. This record is required. \item [Address = \lt{}address\gt{}] @@ -196,7 +196,7 @@ configuration file. \item [Name = \lt{}name\gt{}] \index[fd]{Name } The Storage name used to identify the Director in the list of monitored -daemons. It is not required to be the same as defined in the Storage's +daemons. It is not required to be the same as the one defined in the Storage's configuration file. This record is required. \item [Address = \lt{}address\gt{}] @@ -219,17 +219,39 @@ resource of the Storage daemon's configuration file. This record is required. \end{description} -\subsection*{Sample Monitor configuration file and related daemons' -configuration records.} +\subsection*{Tray Monitor Security} +\index[general]{Tray Monitor Security} +\addcontentsline{toc}{subsection}{Tray Monitor Security} + +There is no security problem in relaxing the permissions on +tray-monitor.conf as long as FD, SD and DIR are configured properly, so +the passwords contained in this file only gives access to the status of +the daemons. It could be a security problem if you consider the status +information as potentially dangereous (I don't think it is the case). + +Concerning Director's configuration: \\ +In tray-monitor.conf, the password in the Monitor resource must point to +a restricted console in bacula-dir.conf (see the documentation). So, if +you use this password with bconsole, you'll only have access to the +status of the director (commands status and .status). +It could be a security problem if there is a bug in the ACL code of the +director. + +Concerning File and Storage Daemons' configuration:\\ +In tray-monitor.conf, the Name in the Monitor resource must point to a +Director resource in bacula-fd/sd.conf, with the Monitor directive set +to Yes (once again, see the documentation). +It could be a security problem if there is a bug in the code which check +if a command is valid for a Monitor (this is very unlikely as the code +is pretty simple). + + +\subsection*{Sample Tray Monitor configuration} \label{SampleConfiguration1} -\index[general]{Sample Monitor configuration file and related daemons' -configuration records. } -\index[general]{Records!Sample Monitor configuration file and related daemons' -configuration } -\addcontentsline{toc}{subsection}{Sample Monitor configuration file and -related daemons' configuration records.} - -A example Monitor configuration file might be the following: +\index[general]{Sample Tray Monitor configuration} +\addcontentsline{toc}{subsection}{Sample Tray Monitor configuration} + +An example Tray Monitor configuration file might be the following: \footnotesize \begin{verbatim} diff --git a/docs/manual-fr/mysql.tex b/docs/manual-fr/mysql.tex index 7f02b2b2..40df0ad7 100644 --- a/docs/manual-fr/mysql.tex +++ b/docs/manual-fr/mysql.tex @@ -12,13 +12,18 @@ \index[general]{Phase I!Installing and Configuring MySQL -- } \addcontentsline{toc}{subsection}{Installing and Configuring MySQL -- Phase I} -If you use the ./configure \verb{--{with-mysql=mysql-directory statement for -configuring {\bf Bacula}, you will need MySQL version 3.23.33 or later -installed in the {\bf mysql-directory} (we are currently using 3.23.56). If -MySQL is installed in the standard system location, you need only enter {\bf -\verb{--{with-mysql} since the configure program will search all the standard -locations. If you install MySQL in your home directory or some other -non-standard directory, you will need to provide the full path to it. +If you use the ./configure \verb:--:with-mysql=mysql-directory statement for +configuring {\bf Bacula}, you will need MySQL version 3.23.53 or later +installed in the {\bf mysql-directory}. +Bacula has been tested on MySQL version 4.1.12 and works providing +you are running it in the default installation that is compatible +with MySQL 3.23.x. If you are using one of the new modes such +as ANSI/ISO compatibility, you may experience problems. + +If MySQL is installed in the standard system location, you need only enter +{\bf \verb:--:with-mysql} since the configure program will search all the +standard locations. If you install MySQL in your home directory or some +other non-standard directory, you will need to provide the full path to it. Installing and Configuring MySQL is not difficult but can be confusing the first time. As a consequence, below, we list the steps that we used to install @@ -26,9 +31,9 @@ it on our machines. Please note that our configuration leaves MySQL without any user passwords. This may be an undesirable situation if you have other users on your system. -Please note that as of Bacula version 1.31, the thread safe version of the +Beginning with Bacula version 1.31, the thread safe version of the MySQL client library is used, and hence you must add the {\bf -\verb{--{enable-thread-safe-client} option to the {\bf ./configure} as shown below: +\verb:--:enable-thread-safe-client} option to the {\bf ./configure} as shown below: \begin{enumerate} \item Download MySQL source code from @@ -48,13 +53,13 @@ command such as: \item cd {\bf mysql-source-directory} where you replace {\bf mysql-source-directory} with the directory name where -you put the MySQL source code. + you put the MySQL source code. -\item ./configure \verb{--{enable-thread-safe-client \verb{--{prefix=mysql-directory +\item ./configure \verb:--:enable-thread-safe-client \verb:--:prefix=mysql-directory where you replace {\bf mysql-directory} with the directory name where you -want to install mysql. Normally for system wide use this is /usr/local/mysql. -In my case, I use \~{}kern/mysql. + want to install mysql. Normally for system wide use this is /usr/local/mysql. + In my case, I use \~{}kern/mysql. \item make @@ -63,7 +68,7 @@ In my case, I use \~{}kern/mysql. \item make install This will put all the necessary binaries, libraries and support files into -the {\bf mysql-directory} that you specified above. + the {\bf mysql-directory} that you specified above. \item ./scripts/mysql\_install\_db @@ -84,8 +89,8 @@ 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 MySQL installation are created during the Bacula Installation. -\label{mysql_phase2} +\label{mysql_phase2} \subsection*{Installing and Configuring MySQL -- Phase II} \index[general]{Installing and Configuring MySQL -- Phase II } \index[general]{Phase II!Installing and Configuring MySQL -- } @@ -97,7 +102,7 @@ running MySQL, and you should have configured, built and installed {\bf Bacula}. If not, please complete these items before proceeding. Please note that the {\bf ./configure} used to build {\bf Bacula} will need to -include {\bf \verb{--{with-mysql=mysql-directory}, where {\bf mysql-directory} is the +include {\bf \verb:--:with-mysql=mysql-directory}, where {\bf mysql-directory} is the directory name that you specified on the ./configure command for configuring MySQL. This is needed so that Bacula can find the necessary include headers and library files for interfacing to MySQL. @@ -117,27 +122,27 @@ Now you will create the Bacula MySQL database and the tables that Bacula uses. \begin{enumerate} \item Start {\bf mysql}. You might want to use the {\bf startmysql} script provided in the Bacula release. -\item cd \lt{}install-directory\gt{} +\item cd \lt{}install-directory\gt{} This directory contains the Bacula catalog interface routines. \item ./grant\_mysql\_privileges - - This script creates unrestricted access rights for {\bf kern}, {\bf kelvin}, -and {\bf bacula}. You may want to modify it to suit your situation. Please -note that none of these userids including root are password protected. + This script creates unrestricted access rights for the user {\bf bacula}. + You may want to modify it to suit your situation. Please + note that none of the userids, including root, are password protected. + If you need more security, please assign a password to the root user + and to bacula. The program {\bf mysqladmin} can be used for this. \item ./create\_mysql\_database - - This script creates the MySQL {\bf bacula} database. The databases you create -as well as the access databases will be located in \lt{}install-dir\gt{}/var/ -in a subdirectory with the name of the database, where \lt{}install-dir\gt{} -is the directory name that you specified on the {\bf \verb{--{prefix} option. This -can be important to know if you want to make a special backup of the Bacula -database or to check its size. + This script creates the MySQL {\bf bacula} database. The databases you + create as well as the access databases will be located in + \lt{}install-dir\gt{}/var/ in a subdirectory with the name of the + database, where \lt{}install-dir\gt{} is the directory name that you + specified on the {\bf \verb:--:prefix} option. This can be important to + know if you want to make a special backup of the Bacula database or to + check its size. \item ./make\_mysql\_tables - This script creates the MySQL tables used by {\bf Bacula}. \end{enumerate} @@ -175,7 +180,7 @@ that you ran. To do so, you can do the following: \normalsize Please note that all information in the database will be lost and you will be -starting from scratch. If you have written on any Volumes, you must write and +starting from scratch. If you have written on any Volumes, you must write an end of file mark on the volume so that Bacula can reuse it. Do so with: \footnotesize @@ -196,11 +201,11 @@ device name for your machine. After configuring Bacula with -./configure \verb{--{enable-thread-safe-client \verb{--{prefix=\lt{}mysql-directory\gt{} +./configure \verb:--:enable-thread-safe-client \verb:--:prefix=\lt{}mysql-directory\gt{} where \lt{}mysql-directory\gt{} is in my case {\bf /home/kern/mysql}, you may have to configure the loader so that it can find the MySQL shared libraries. If you have previously followed this procedure and later add the {\bf -\verb{--{enable-thread-safe-client} options, you will need to rerun the {\bf +\verb:--:enable-thread-safe-client} options, you will need to rerun the {\bf ldconfig} program shown below. If you put MySQL in a standard place such as {\bf /usr/lib} or {\bf /usr/local/lib} this will not be necessary, but in my case it is. The description that follows is Linux specific. For other @@ -212,7 +217,7 @@ with the name of the mysql-directory. In my case, it is: /home/kern/mysql/lib/mysql then rebuild the loader's cache with: /sbin/ldconfig If you upgrade to a new version of {\bf MySQL}, the shared -library names will probably changes, and you must re-run the {\bf +library names will probably change, and you must re-run the {\bf /sbin/ldconfig} command so that the runtime loader can find them. Alternatively, your system my have a loader environment variable that can be @@ -233,3 +238,31 @@ LDFLAGS="-lssl -lcyrpto" \ \end{verbatim} \normalsize + +\subsection*{Installing MySQL from RPMs} +\index[general]{MySQL!Installing from RPMs} +\index[general]{Installing MySQL from RPMs} +\addcontentsline{toc}{subsection}{Installing MySQL from RPMs} +If you are installing MySQL from RPMs, you will need to install +both the MySQL binaries and the client libraries. The client +libraries are ususally found in a devel package, so you must +install: + +\footnotesize +\begin{verbatim} + mysql + mysql-devel +\end{verbatim} +\normalsize + +This will be the same with most other package managers too. + +\subsection*{Upgrading MySQL} +\index[general]{Upgrading MySQL } +\index[general]{Upgrading!MySQL } +\addcontentsline{toc}{subsection}{Upgrading MySQL} +If you upgrade MySQL, you must reconfigure, rebuild, and re-install +Bacula otherwise you are likely to get bizarre failures. If you +install from rpms and you upgrade MySQL, you must also rebuild Bacula. +You can do so by rebuilding from the source rpm. To do so, you may need +to modify the bacula.spec file to account for the new MySQL version. diff --git a/docs/manual-fr/pools.tex b/docs/manual-fr/pools.tex index 2a63ca17..fb064d32 100644 --- a/docs/manual-fr/pools.tex +++ b/docs/manual-fr/pools.tex @@ -1,11 +1,14 @@ %% %% -\section*{Using Pools to Manage Volumes} +\section*{Automated Disk Backup} \label{_ChapterStart11} \index[general]{Volumes!Using Pools to Manage } +\index[general]{Disk!Automated Backup} \index[general]{Using Pools to Manage Volumes } +\index[general]{Automated Disk Backup} \addcontentsline{toc}{section}{Using Pools to Manage Volumes} +\addcontentsline{toc}{section}{Automated Disk Backup} If you manage 5 or 10 machines and have a nice tape backup, you don't need Pools, and you may wonder what they are good for. In this chapter, you will @@ -14,9 +17,9 @@ can be applied to a shop that has multiple tape drives, or that wants to mount various different Volumes to meet their needs. The rest of this chapter will give an example involving backup to disk -Volumes, but most of the information applies equally well for tape Volumes. -\label{TheProblem} +Volumes, but most of the information applies equally well to tape Volumes. +\label{TheProblem} \subsection*{The Problem} \index[general]{Problem } \addcontentsline{toc}{subsection}{Problem} @@ -34,7 +37,7 @@ necessary cassettes was more expensive than their budget could handle. They want to maintain 6 months of backup data, and be able to access the old files on a daily basis for a week, a weekly basis for a month, then monthly -for 6 months. In addition, and offsite capability was not needed (well perhaps +for 6 months. In addition, offsite capability was not needed (well perhaps it really is, but it was never used). Their daily changes amount to about 300MB on the average, or about 2GB per week. @@ -154,7 +157,7 @@ Pool { \normalsize As you can see, the Differential Pool can grow to a maximum of six volumes, -and the Volumes are retained 40 days and there after can be recycled. Finally +and the Volumes are retained 40 days and thereafter they can be recycled. Finally there is one job per volume. This, of course, could be tightened up a lot, but the expense here is a few GB which is not too serious. \label{IncPool} @@ -346,4 +349,3 @@ Messages { } \end{verbatim} \normalsize - diff --git a/docs/manual-fr/progs.tex b/docs/manual-fr/progs.tex index fd01a79e..d4ee4e1b 100644 --- a/docs/manual-fr/progs.tex +++ b/docs/manual-fr/progs.tex @@ -11,7 +11,6 @@ This document describes the utility programs written to aid Bacula users and developers in dealing with Volumes external to Bacula. \subsection*{Specifying the Configuration File} -\index[general]{File!Specifying the Configuration } \index[general]{Specifying the Configuration File } \addcontentsline{toc}{subsection}{Specifying the Configuration File} @@ -23,6 +22,7 @@ for your archive device (generally a tape drive). By default, they read {\bf bacula-sd.conf} in the current directory, but you may specify a different configuration file using the {\bf -c} option. + \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 } @@ -34,6 +34,12 @@ found. In the case of a tape, this is the physical device name such as {\bf work, it must find the identical name in the Device resource of the configuration file. See below for specifying Volume names. +Please note that if you have Bacula running and you ant to use +one of these programs, you will either need to stop the Storage daemon, or +{\bf unmount} any tape drive you want to use, otherwise the drive +will {\bf busy} because Bacula is using it. + + \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 } @@ -108,7 +114,7 @@ accept any volume. For example: \subsection*{bls} \label{bls} -\index[general]{Bls } +\index[general]{bls } \addcontentsline{toc}{subsection}{bls} {\bf bls} can be used to do an {\bf ls} type listing of a {\bf Bacula} tape or @@ -116,18 +122,17 @@ file. It is called: \footnotesize \begin{verbatim} -Usage: bls [-d debug_level] +Usage: bls [options] -b specify a bootstrap file - -c specify a configuration file - -d specify a debug level + -c specify a config file + -d specify debug level -e exclude list -i include list -j list jobs -k list blocks - -L list tape label - (none of above) list saved files - -p proceed inspite of I/O errors - -t use default tape device + (no j or k option) list saved files + -L dump label + -p proceed inspite of errors -v be verbose -V specify Volume names (separated by |) -? print this message @@ -184,10 +189,10 @@ bls: Got EOF on device /tmp \end{verbatim} \normalsize -\subsubsection*{Listing Bacula Jobs} -\index[general]{Listing Bacula Jobs } -\index[general]{Jobs!Listing Bacula } -\addcontentsline{toc}{subsubsection}{Listing Bacula Jobs} +\subsubsection*{Listing Jobs} +\index[general]{Listing Jobs with bls } +\index[general]{bls!Listing Jobs } +\addcontentsline{toc}{subsubsection}{bls Listing Jobs} If you are listing a Volume to determine what Jobs to restore, normally the {\bf -j} option provides you with most of what you will need as long as you @@ -195,15 +200,24 @@ don't have multiple clients. For example, \footnotesize \begin{verbatim} -./bls -j /tmp/test1 -Volume Record: SessId=2 SessTime=1033762386 JobId=0 DataLen=144 -Begin Session Record: SessId=2 SessTime=1033762386 JobId=1 Level=F Type=B -End Session Record: SessId=2 SessTime=1033762386 JobId=1 Level=F Type=B -Begin Session Record: SessId=3 SessTime=1033762386 JobId=2 Level=I Type=B -End Session Record: SessId=3 SessTime=1033762386 JobId=2 Level=I Type=B -Begin Session Record: SessId=4 SessTime=1033762386 JobId=3 Level=I Type=B -End Session Record: SessId=4 SessTime=1033762386 JobId=3 Level=I Type=B -bls: Got EOF on device /tmp +./bls -j -V Test1 -c stored.conf DDS-4 +bls: butil.c:258 Using device: "DDS-4" for reading. +11-Jul 11:54 bls: Ready to read from volume "Test1" on device "DDS-4" (/dev/nst0). +Volume Record: File:blk=0:1 SessId=4 SessTime=1121074625 JobId=0 DataLen=165 +Begin Job Session Record: File:blk=0:2 SessId=4 SessTime=1121074625 JobId=1 Level=F Type=B +Begin Job Session Record: File:blk=0:3 SessId=5 SessTime=1121074625 JobId=5 Level=F Type=B +Begin Job Session Record: File:blk=0:6 SessId=3 SessTime=1121074625 JobId=2 Level=F Type=B +Begin Job Session Record: File:blk=0:13 SessId=2 SessTime=1121074625 JobId=4 Level=F Type=B +End Job Session Record: File:blk=0:99 SessId=3 SessTime=1121074625 JobId=2 Level=F Type=B + Files=168 Bytes=1,732,978 Errors=0 Status=T +End Job Session Record: File:blk=0:101 SessId=2 SessTime=1121074625 JobId=4 Level=F Type=B + Files=168 Bytes=1,732,978 Errors=0 Status=T +End Job Session Record: File:blk=0:108 SessId=5 SessTime=1121074625 JobId=5 Level=F Type=B + Files=168 Bytes=1,732,978 Errors=0 Status=T +End Job Session Record: File:blk=0:109 SessId=4 SessTime=1121074625 JobId=1 Level=F Type=B + Files=168 Bytes=1,732,978 Errors=0 Status=T +11-Jul 11:54 bls: End of Volume at file 1 on device "DDS-4" (/dev/nst0), Volume "Test1" +11-Jul 11:54 bls: End of all volumes. \end{verbatim} \normalsize @@ -212,13 +226,13 @@ shows a full save followed by two incremental saves. Adding the {\bf -v} option will display virtually all information that is available for each record: -\subsubsection*{Listing Bacula Blocks} -\index[general]{Listing Bacula Blocks } -\index[general]{Blocks!Listing Bacula } -\addcontentsline{toc}{subsubsection}{Listing Bacula Blocks} +\subsubsection*{Listing Blocks} +\index[general]{Listing Blocks with bls } +\index[general]{bls!Listing Blocks } +\addcontentsline{toc}{subsubsection}{bls Listing Blocks} Normally, except for debugging purposes, you will not need to list Bacula -blocks (the ``primitive'' unit of Bacula data on the Volume). However, you can +blocks (the "primitive" unit of Bacula data on the Volume). However, you can do so with: \footnotesize @@ -423,7 +437,7 @@ program. \subsection*{bscan} \label{bscan} -\index[general]{Bscan } +\index[general]{bscan } \addcontentsline{toc}{subsection}{bscan} The {\bf bscan} program can be used to re-create a database (catalog) from the @@ -432,7 +446,8 @@ only if one or more Volumes have been pruned or purged from your catalog so that the records on the Volume are no longer in the catalog. With some care, it can also be used to synchronize your existing catalog with -a Volume. Since {\bf bscan} modifies your catalog, we strongly recommend that +a Volume. Although we have never seen a case of bscan damaging a +catalog, since bscan modifies your catalog, we recommend that you do a simple ASCII backup of your database before running {\bf bscan} just to be sure. See \ilink{Compacting Your Database}{CompactingMySQL}. @@ -473,25 +488,27 @@ you have provided security on your database, you may need to supply either the database name ({\bf -b} option), the user name ({\bf -u} option), and/or the password ({\bf -p}) options. -As an example, let's suppose that you did a backup to Volume ``Vol001'' and -that sometime later all record of that Volume was pruned or purged from the -database. By using {\bf bscan} you can recreate the catalog entries for that -Volume and then use the {\bf restore} command in the Console to restore +As an example, let's suppose that you did a backup to Volumes "Vol001" +and "Vol002", then sometime later all records of one or both those +Volumes +were pruned or purged from the +database. By using {\bf bscan} you can recreate the catalog entries for +those Volumes and then use the {\bf restore} command in the Console to restore whatever you want. A command something like: \footnotesize \begin{verbatim} -bscan -c bacula-sd.conf -v -V Vol001 /dev/nst0 +bscan -c bacula-sd.conf -v -V Vol001\|Vol002 /dev/nst0 \end{verbatim} \normalsize -will give you a give you an idea of what is going to happen without changing +will give you an idea of what is going to happen without changing your catalog. Of course, you may need to change the path to the Storage daemon's conf file, the Volume name, and your tape (or disk) device name. This command must read the entire tape, so if it has a lot of data, it may take a long time, and thus you might want to immediately use the command listed below. Note, if you are writing to a disk file, replace the device name with -the path to the directory that contains the Volume. This must correspond to +the path to the directory that contains the Volumes. This must correspond to the Archive Device in the conf file. Then to actually write or store the records in the catalog, add the {\bf -s} @@ -499,17 +516,17 @@ option as follows: \footnotesize \begin{verbatim} - bscan -s -m -c bacula-sd.conf -v -V Vol001 /dev/nst0 + bscan -s -m -c bacula-sd.conf -v -V Vol001\|Vol002 /dev/nst0 \end{verbatim} \normalsize When writing to the database, if bscan finds existing records, it will generally either update them if something is wrong or leave them alone. Thus -if the Volume you are scanning is all or partially in the catalog already, no +if the Volumes you are scanning are all or partially in the catalog already, no harm will be done to that existing data. Any missing data will simply be added. -If you have multiple tapes, you can scan them with: +If you have multiple tapes, you should scan them with: \footnotesize \begin{verbatim} @@ -517,9 +534,16 @@ If you have multiple tapes, you can scan them with: \end{verbatim} \normalsize -You should, where ever possible try to specify the tapes in the order they are -written. However, bscan can handle scanning tapes that are not sequential. Any -incomplete records at the end of the tape will simply be ignored in that case. +You should, always try to specify the tapes in the order they are written. +However, bscan can handle scanning tapes that are not sequential. Any +incomplete records at the end of the tape will simply be ignored in that +case. If you are simply reparing an existing catalog, this may be OK, but +if you are creating a new catalog from scratch, it will leave your database +in an incorrect state. If you do not specify all necessary Volumes on a +single bscan command, bscan will not be able to correctly restore the +records that span two volumes. In other words, it is much better to +specify two or three volumes on a single bscan command rather than run +bscan two or three times, each with a single volume. Note, the restoration process using bscan is not identical to the original @@ -666,7 +690,7 @@ against it and get valid results. \addcontentsline{toc}{subsubsection}{Using bscan to Correct the Volume File Count} -If the Storage daemon crashes during a backup Job, the catalog will no be +If the Storage daemon crashes during a backup Job, the catalog will not be properly updated for the Volume being used at the time of the crash. This means that the Storage daemon will have written say 20 files on the tape, but the catalog record for the Volume indicates only 19 files. @@ -683,7 +707,7 @@ update only the final Media record for the Volumes read. If you use {\bf bscan} to enter the contents of the Volume into an existing catalog, you should be aware that the records you entered may be immediately -pruned during the next job particularly if the Volume is very old or had been +pruned during the next job, particularly if the Volume is very old or had been previously purged. To avoid this, after running {\bf bscan}, you can manually set the volume status (VolStatus) to {\bf Read-Only} by using the {\bf update} command in the catalog. This will allow you to restore from the volume without @@ -758,7 +782,7 @@ file. As a default, it will look for {\bf bacula-sd.conf} in the current directory. If your configuration file is elsewhere, please use the {\bf -c} option to specify where. -The physical device name must be specified on the command line, and that this +The physical device name must be specified on the command line, and this same device name must be present in the Storage daemon's configuration file read by {\bf btape} @@ -833,11 +857,10 @@ The most useful commands are: \begin{itemize} \item test -- test writing records and EOF marks and reading them back. \item fill -- completely fill a volume with records, then write a few records - on a second volume, and finally, both volumes will be read back. Please be - aware that the data written will be quite similar every record, so you might -want to turn compression off. One user found that the fill command wrote -750Gb to a tape that can hold 35Gb -- so you can see that the hardware -compression really worked well! + on a second volume, and finally, both volumes will be read back. + This command writes blocks containing random data, so your drive will + not be able to compress the data, and thus it is a good test of + the real physical capacity of your tapes. \item readlabel -- read and dump the label on a Bacula tape. \item cap -- list the device capabilities as defined in the configuration file and as perceived by the Storage daemon. @@ -935,7 +958,7 @@ entering a ctl-d in column 1 of the last line. database, and optionally fix them. The {\bf dbcheck} program can be found in the {\bf \lt{}bacula-source\gt{}/src/tools} directory of the source distribution. Though it is built with the make process, it is not normally -``installed''. +"installed". It is called: @@ -1004,7 +1027,7 @@ The inconsistencies examined are the following: database. If this is the case, you will receive error messages during Jobs warning of duplicate database records. If you are not getting these error messages, there is no reason to run this check. -\item Repair bad Filename records. This checkes and corrects filenames that +\item Repair bad Filename records. This checks and corrects filenames that have a trailing slash. They should not. \item Repair bad Path records. This checks and corrects path names that do not have a trailing slash. They should. @@ -1075,7 +1098,7 @@ was correct and to print some statistics on file name and path length. However, you may find it useful to see what bacula would do with a given {\bf Include} resource. The {\bf testfind} program can be found in the {\bf \lt{}bacula-source\gt{}/src/tools} directory of the source distribution. -Though it is built with the make process, it is not normally ``installed''. +Though it is built with the make process, it is not normally "installed". It is called: @@ -1142,67 +1165,3 @@ cause {\bf testfind} to print the raw filenames without showing the Bacula internal file type, or the link (if any). Debug levels of 10 or greater cause the filename and the path to be separated using the same algorithm that is used when putting filenames into the Catalog database. - -\subsection*{bimagemgr} -\label{bimagemgr} -\index[general]{Bimagemgr } -\addcontentsline{toc}{subsection}{bimagemgr} - -{\bf bimagemgr} is a utility for those who backup to disk volumes in order to -commit them to CDR disk, rather than tapes. It is a web based interface -written in perl, used to monitor when a volume file needs to be burned to -disk. It requires: - -\begin{itemize} -\item A web server running on the bacula server -\item A CD recorder installed and configured on the bacula server -\item The cdrtools package installed on the bacula server. -\item perl, perl-DBI module, and either DBD-MySQL or DBD-PostgreSQL modules - \end{itemize} - -SQLite databases and DVD burning are not supported by {\bf bimagemgr} at this -time, but both planned for future releases. - -\subsubsection*{Installation} -\index[general]{Installation } -\addcontentsline{toc}{subsubsection}{Installation} - -Please see the README file in the bimagemgr directory of the distribution for -instructions. - -\subsubsection*{Usage} -\index[general]{Usage } -\addcontentsline{toc}{subsubsection}{Usage} - -Calling the program in your web browser, e.g. {\tt -http://localhost/cgi-bin/bimagemgr.pl} will produce a display as shown below -in Figure 1. The program will query the bacula database and display all volume -files with the date last written and the date last burned to disk. If a volume -needs to be burned (last written is newer than last burn date) a ``Burn'' -button will be displayed in the right most column. - -\addcontentsline{lof}{figure}{Bacula CD Image Manager} -\includegraphics{./bimagemgr1.eps} Figure 1 - -Place a blank CDR disk in your recorder and click a ``Burn'' button. This will -cause a pop up window as shown in Figure 2 to display the burn progress. - -\addcontentsline{lof}{figure}{Bacula CD Image Burn Progress Window} -\includegraphics{./bimagemgr2.eps} Figure 2 - -When the burn finishes the pop up window will display the results of cdrecord -as shown in Figure 3. Close the pop up window and refresh the main window. The -last burn date will be updated and the ``Burn'' button for that volume will -disappear. Should you have a failed burn you can reset the last burn date of -that volume by clicking it's ``Reset'' link. - -\addcontentsline{lof}{figure}{Bacula CD Image Burn Results} -\includegraphics{./bimagemgr3.eps} Figure 3 - -In the bottom row of the main display window are two more buttons labeled -``Burn Catalog'' and ``Blank CDRW''. ``Burn Catalog'' will place a copy of -your bacula catalog on a disk. If you use CDRW disks rather than CDR then -``Blank CDRW'' allows you to erase the disk before re-burning it. Regularly -committing your backup volume files and your catalog to disk with {\bf -bimagemgr} insures that you can rebuild easily in the event of some disaster -on the bacula server itself. diff --git a/docs/manual-fr/projects.tex b/docs/manual-fr/projects.tex index 264163c8..86480b39 100644 --- a/docs/manual-fr/projects.tex +++ b/docs/manual-fr/projects.tex @@ -7,7 +7,21 @@ \index[general]{Bacula Projects } \addcontentsline{toc}{section}{Bacula Projects} -Please see the projects page on the web site at: -\elink{www.bacula.org.projects.html}{http://www.bacula.org/projects.html}, or -see the {\bf projects} file in the main source directory. For a current list -of tasks you can see {\bf kernstodo} in the main source directory. +Once a new major version of Bacula is released, the Bacula +users will vote on a list of new features. This vote is used +as the main element determining what new features will be +implemented for the next version. Generally, the development time +for a new release is between 4 to 9 months. + +For the current list of project, please see the projects page in the CVS +at: \elink{http://cvs.sourceforge.net/viewcvs.py/*checkout*/bacula/bacula/projects} +{http://cvs.sourceforge.net/viewcvs.py/*checkout*/bacula/bacula/projects} +see the {\bf projects} file in the main source directory. The projects +file is updated approximately once every six months. + +Separately from the project list, Kern maintains a current list of +tasks as well as ideas, feature requests, and occassionally design +notes. This list is updated roughly weekly (sometimes more often). +For a current list of tasks you can see {\bf kernstodo} in the Source Forge +CVS at \elink{http://cvs.sourceforge.net/viewcvs.py/*checkout*/bacula/bacula/kernstodo} +{http://cvs.sourceforge.net/viewcvs.py/*checkout*/bacula/bacula/kernstodo}. diff --git a/docs/manual-fr/recycling.tex b/docs/manual-fr/recycling.tex index 34f1b9b8..f52648d1 100644 --- a/docs/manual-fr/recycling.tex +++ b/docs/manual-fr/recycling.tex @@ -7,29 +7,34 @@ \index[general]{Automatic Volume Recycling } \addcontentsline{toc}{section}{Automatic Volume Recycling} -Normally, Bacula will write on a volume, and once the tape is written, it can -append to the volume, but it will never overwrite the data thus destroying it. -When we speak of {\bf recycling} volumes, we mean that {\bf Bacula} can write -over the previous contents of a volume. Thus all previous data will be lost. - -You may not want Bacula to automatically recycle (reuse) tapes. This requires -a large number of tapes, and in such a case, it is possible to manually -recycle tapes. For more on manual recycling, see the section entitled -\ilink{ Manually Recycling Volumes}{manualrecycling} below in -this chapter. +By default, once Bacula starts writing a Volume, it can +append to the volume, but it will not overwrite the existing +data thus destroying it. +However when Bacula {\bf recycles} a Volume, the Volume becomes +available for being reused, and Bacula can at some later time +over write the previous contents of that Volume. +Thus all previous data will be lost. If the Volume is a tape, +the tape will be rewritten from the beginning. If the Volume is +a disk file, the file will be truncated before being rewritten. + +You may not want Bacula to automatically recycle (reuse) tapes. This would +require a large number of tapes though, and in such a case, it is possible +to manually recycle tapes. For more on manual recycling, see the section +entitled \ilink{ Manually Recycling Volumes}{manualrecycling} below in this +chapter. Most people prefer to have a Pool of tapes that are used for daily backups and recycled once a week, another Pool of tapes that are used for Full backups once a week and recycled monthly, and finally a Pool of tapes that are used -once a month and recycled after a year or two. With a scheme like this, your -pool of tapes remains constant. +once a month and recycled after a year or two. With a scheme like this, the +number of tapes in your pool or pools remains constant. By properly defining your Volume Pools with appropriate Retention periods, Bacula can manage the recycling (such as defined above) automatically. Automatic recycling of Volumes is controlled by three records in the {\bf Pool} resource definition in the Director's configuration file. These three -records are: {\bf +records are: \begin{itemize} \item AutoPrune = yes @@ -37,7 +42,7 @@ records are: {\bf \item Recycle = yes \end{itemize} -} Automatic recycling of Volumes is performed by Bacula only when it wants a +Automatic recycling of Volumes is performed by Bacula only when it wants a new Volume and no appendable Volumes are available in the Pool. It will then search the Pool for any Volumes with the {\bf Recycle} flag set and whose Volume Status is {\bf Full}. At that point, the recycling occurs in two steps. @@ -47,21 +52,21 @@ the Volume. The Volume will be purged if the VolumeRetention period has expired. When a Volume is marked as Purged, it means that no Catalog records reference that Volume, and the Volume can be recycled. Until recycling actually occurs, the Volume data remains intact. If no Volumes can be found -for recycline for any of the reasons stated above, Bacula will request +for recycling for any of the reasons stated above, Bacula will request operator intervention (i.e. it will ask you to label a new volume). -A key point mentioned above that can be a source of frustration is that Bacula +A key point mentioned above, that can be a source of frustration, is that Bacula will only recycle purged Volumes if there is no other appendable Volume available, otherwise, it will always write to an appendable Volume before recycling even if there are Volume marked as Purged. This preserves your data -as long as possible. So, if you wish to ``force'' Bacula to use a purged +as long as possible. So, if you wish to "force" Bacula to use a purged Volume, you must first ensure that no other Volume in the Pool is marked {\bf Append}. If necessary, you can manually set a volume to {\bf Full}. The reason for this is that Bacula wants to preserve the data on your old tapes (even though purged from the catalog) as long as absolutely possible before overwriting it. -\label{AutoPruning} +\label{AutoPruning} \subsection*{Automatic Pruning} \index[general]{Automatic Pruning } \index[general]{Pruning!Automatic } @@ -108,7 +113,7 @@ details of the Files backed up. In addition, without the File records, you cannot use the Console restore command to restore the files. When a Job record is pruned, the Volume (Media record) for that Job can still -remain in the database, and if you do a ``list volumes'', you will see the +remain in the database, and if you do a "list volumes", you will see the volume information, but the Job records (and its File records) will no longer be available. @@ -116,14 +121,14 @@ In each case, pruning removes information about where older files are, but it also prevents the catalog from growing to be too large. You choose the retention periods in function of how many files you are backing up and the time periods you want to keep those records online, and the size of the -database.You can always re-insert the records (with 98\% of the original data) -by using ``bscan'' to scan in a whole Volume or any part of the volume that +database. You can always re-insert the records (with 98\% of the original data) +by using "bscan" to scan in a whole Volume or any part of the volume that you want. By setting {\bf AutoPrune} to {\bf yes} you will permit {\bf Bacula} to automatically prune all Volumes in the Pool when a Job needs another Volume. Volume pruning means removing records from the catalog. It does not shrink the -size of the Volume or effect the Volume data until the Volume gets +size of the Volume or affect the Volume data until the Volume gets overwritten. When a Job requests another volume and there are no Volumes with Volume Status {\bf Append} available, Bacula will begin volume pruning. This means that all Jobs that are older than the {\bf VolumeRetention} period will @@ -139,63 +144,67 @@ volume. The Pool records that control the pruning are described below. \item [AutoPrune = \lt{}yes|no\gt{}] \index[console]{AutoPrune } - If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or greater) -will automatically apply the Volume retention period when running a Job and -it needs a new Volume but no appendable volumes are available. At that point, -Bacula will prune all Volumes that can be pruned (i.e. AutoPrune set) in an -attempt to find a usable volume. If during the autoprune, all files are -pruned from the Volume, it will be marked with VolStatus {\bf Purged}. The -default is {\bf yes}. + If AutoPrune is set to {\bf yes} (default), Bacula + will automatically apply the Volume retention period when running a Job and + it needs a new Volume but no appendable volumes are available. At that point, + Bacula will prune all Volumes that can be pruned (i.e. AutoPrune set) in an + attempt to find a usable volume. If during the autoprune, all files are + pruned from the Volume, it will be marked with VolStatus {\bf Purged}. The + default is {\bf yes}. Note, that although the File and Job records may be + pruned from the catalog, a Volume will be marked Purged (and hence + ready for recycling) if the Volume status is Append, Full, Used, or Error. + If the Volume has another status, such as Archive, Read-Only, Disabled, + Busy, or Cleaning, the Volume status will not be changed to Purged. \item [Volume Retention = \lt{}time-period-specification\gt{}] \index[console]{Volume Retention } The Volume Retention record defines the length of time that Bacula will -guarantee that the Volume is not reused counting from the time the last job -stored on the Volume terminated. - -When this time period expires, and if {\bf AutoPrune} is set to {\bf yes}, -and a new Volume is needed, but no appendable Volume is available, Bacula -will prune (remove) Job records that are older than the specified Volume -Retention period. - -The Volume Retention period takes precedence over any Job Retention period -you have specified in the Client resource. It should also be noted, that the -Volume Retention period is obtained by reading the Catalog Database Media -record rather than the Pool resource record. This means that if you change -the VolumeRetention in the Pool resource record, you must ensure that the -corresponding change is made in the catalog by using the {\bf update pool} -command. Doing so will insure that any new Volumes will be created with the -changed Volume Retention period. Any existing Volumes will have their own -copy of the Volume Retention period that can only be changed on a Volume by -Volume basis using the {\bf update volume} command. - -When all file catalog entries are removed from the volume, its VolStatus is -set to {\bf Purged}. The files remain physically on the Volume until the -volume is overwritten. - -Retention periods are specified in seconds, minutes, hours, days, weeks, -months, quarters, or years on the record. See the -\ilink{Configuration chapter}{Time} of this manual for -additional details of time specification. + guarantee that the Volume is not reused counting from the time the last job + stored on the Volume terminated. + + When this time period expires, and if {\bf AutoPrune} is set to {\bf yes}, + and a new Volume is needed, but no appendable Volume is available, Bacula + will prune (remove) Job records that are older than the specified Volume + Retention period. + + The Volume Retention period takes precedence over any Job Retention period + you have specified in the Client resource. It should also be noted, that the + Volume Retention period is obtained by reading the Catalog Database Media + record rather than the Pool resource record. This means that if you change + the VolumeRetention in the Pool resource record, you must ensure that the + corresponding change is made in the catalog by using the {\bf update pool} + command. Doing so will insure that any new Volumes will be created with the + changed Volume Retention period. Any existing Volumes will have their own + copy of the Volume Retention period that can only be changed on a Volume by + Volume basis using the {\bf update volume} command. + + When all file catalog entries are removed from the volume, its VolStatus is + set to {\bf Purged}. The files remain physically on the Volume until the + volume is overwritten. + + Retention periods are specified in seconds, minutes, hours, days, weeks, + months, quarters, or years on the record. See the + \ilink{Configuration chapter}{Time} of this manual for + additional details of time specification. The default is 1 year. \item [Recycle = \lt{}yes|no\gt{}] \index[fd]{Recycle } This statement tells Bacula whether or not the particular Volume can be -recycled (i.e. rewritten). If Recycle is set to {\bf no} (the default), then -even if Bacula prunes all the Jobs on the volume and it is marked {\bf -Purged}, it will not consider the tape for recycling. If Recycle is set to -{\bf yes} and all Jobs have been pruned, the volume status will be set to -{\bf Purged} and the volume may then be reused when another volume is needed. -If the volume is reused, it is relabeled with the same Volume Name, however -all previous data will be lost. -\end{description} - -Note, it is also possible to ``force'' pruning of all Volumes in the Pool -associated with a Job by adding {\bf Prune Files = yes} to the Job resource. -\label{Recycling} + recycled (i.e. rewritten). If Recycle is set to {\bf no} (the default), then + even if Bacula prunes all the Jobs on the volume and it is marked {\bf + Purged}, it will not consider the tape for recycling. If Recycle is set to + {\bf yes} and all Jobs have been pruned, the volume status will be set to + {\bf Purged} and the volume may then be reused when another volume is needed. + If the volume is reused, it is relabeled with the same Volume Name, however + all previous data will be lost. + \end{description} + + It is also possible to "force" pruning of all Volumes in the Pool + associated with a Job by adding {\bf Prune Files = yes} to the Job resource. +\label{Recycling} \subsection*{Recycling Algorithm} \index[general]{Algorithm!Recycling } \index[general]{Recycling Algorithm } @@ -207,30 +216,38 @@ will look for the oldest Volume that is Purged (all Jobs and Files expired), and if the {\bf Recycle} flag is on (Recycle=yes) for that Volume, Bacula will relabel it and write new data on it. -The full recycling algorithm that Bacula uses when it needs a new Volume is: +The full algorithm that Bacula uses when it needs a new Volume is: \begin{itemize} -\item Search the Pool for a Volume with VolStatus=Append (if there is more - than one, the Volume with the oldest date last written is chosen. If two have - the same date then the one with the lowest MediaId is chosen). -\item Search the Pool for a Volume with VolStatus=Recycle (if there is more - than one, the Volume with the oldest date last written is chosen. If two have - the same date then the one with the lowest MediaId is chosen). +\item Search the Pool for a Volume with VolStatus=Append (if there is more + than one, the Volume with the oldest date last written is chosen. If + two have the same date then the one with the lowest MediaId is chosen). +\item Search the Pool for a Volume with VolStatus=Recycle and the InChanger + flag is set true (if there is more than one, the Volume with the oldest + date last written is chosen. If two have the same date then the one + with the lowest MediaId is chosen). +\item Try recycling any purged Volumes. \item Prune volumes applying Volume retention period (Volumes with VolStatus Full, Used, or Append are pruned). \item Search the Pool for a Volume with VolStatus=Purged +\item If InChanger was set, go back to the first step above, but + this second time, ignore the InChanger flag in step 2. \item Attempt to create a new Volume if automatic labeling enabled + If Python is enabled, a Python NewVolume even is generated before + the Label Format check is used. +\item If a Pool named "Scratch" exists, search for a Volume and if found + move it to the current Pool for the Job and use it. \item Prune the oldest Volume if RecycleOldestVolume=yes (the Volume with the oldest LastWritten date and VolStatus equal to Full, Recycle, Purged, Used, or Append is chosen). This record ensures that all retention periods are -properly respected. + properly respected. \item Purge the oldest Volume if PurgeOldestVolume=yes (the Volume with the oldest LastWritten date and VolStatus equal to Full, Recycle, Purged, Used, or Append is chosen). We strongly recommend against the use of {\bf -PurgeOldestVolume} as it can quite easily lead to loss of current backup -data. + PurgeOldestVolume} as it can quite easily lead to loss of current backup + data. \item Give up and ask operator. - \end{itemize} +\end{itemize} The above occurs when Bacula has finished writing a Volume or when no Volume is present in the drive. @@ -240,9 +257,8 @@ and Bacula recognizes the Volume as valid, it will request authorization from the Director to use this Volume. In this case, if you have set {\bf Recycle Current Volume = yes} and the Volume is marked as Used or Full, Bacula will prune the volume and if all jobs were removed during the pruning (respecting -the retention periods), the Volume will be recycled and used. For this to -work, you must have {\bf Accept Any Volume = yes} in the Pool. The recycling -algorithm in this case is: +the retention periods), the Volume will be recycled and used. +The recycling algorithm in this case is: \begin{itemize} \item If the VolStatus is {\bf Append} or {\bf Recycle} and {\bf Accept Any @@ -263,7 +279,7 @@ contain a current copy of your backup data, it will be used. Each Volume inherits the Recycle status (yes or no) from the Pool resource record when the Media record is created (normally when the Volume is labeled). -This Recycle status is stored in the Media record of the Catalog. Using the +This Recycle status is stored in the Media record of the Catalog. Using the Console program, you may subsequently change the Recycle status for each Volume. For example in the following output from {\bf list volumes}: @@ -286,7 +302,7 @@ Volume. For example in the following output from {\bf list volumes}: all the volumes are marked as recyclable, and the last Volume, {\bf File0007} has been purged, so it may be immediately recycled. The other volumes are all marked recyclable and when their Volume Retention period (14400 seconds or 4 -hours) expires, they will be eligible for pruning, and possible recycling. +hours) expires, they will be eligible for pruning, and possibly recycling. Even though Volume {\bf File0007} has been purged, all the data on the Volume is still recoverable. A purged Volume simply means that there are no entries in the Catalog. Even if the Volume Status is changed to {\bf Recycle}, the @@ -389,8 +405,8 @@ finally fills up, {\bf Bacula} will request the next one in the series, and the next day when you notice the email message, you will mount it and {\bf Bacula} will finish the unfinished incremental backup. -What does this give? Well, at any point, you will have a the last complete -Full save plus several Incremental saves. For any given file your want to +What does this give? Well, at any point, you will have the last complete +Full save plus several Incremental saves. For any given file you want to recover (or your whole system), you will have a copy of that file every day for at least the last 14 days. For older versions, you will have at least 3 and probably 4 Friday full saves of that file, and going back further, you @@ -576,7 +592,7 @@ new data on the tape, the steps to take are: {\bf Recycle} field is set to {\bf 1} \item Use the {\bf purge jobs volume} command in the Console to mark the Volume as {\bf Purged}. Check by using {\bf list volumes}. - \end{itemize} +\end{itemize} Once the Volume is marked Purged, it will be recycled the next time a Volume is needed. @@ -589,7 +605,7 @@ steps: Volume as {\bf Purged}. Check by using {\bf list volumes}. \item In Bacula version 1.30 or greater, use the Console {\bf relabel} command to relabel the Volume. - \end{itemize} +\end{itemize} Please note that the relabel command applies only to tape Volumes. @@ -599,11 +615,11 @@ instructions below: \begin{itemize} \item Use the {\bf delete volume} command in the Console to delete the Volume from the Catalog. -\item If the a different tape is mounted, use the {\bf unmount} command, +\item If a different tape is mounted, use the {\bf unmount} command, remove the tape, and insert the tape to be renamed. \item Write an EOF mark in the tape using the following commands: - \footnotesize +\footnotesize \begin{verbatim} mt -f /dev/nst0 rewind mt -f /dev/nst0 weof @@ -614,7 +630,7 @@ where you replace {\bf /dev/nst0} with the appropriate device name on your system. \item Use the {\bf label} command to write a new label to the tape and to enter it in the catalog. - \end{itemize} +\end{itemize} Please be aware that the {\bf delete} command can be dangerous. Once it is done, to recover the File records, you must either restore your database as it diff --git a/docs/manual-fr/restore.tex b/docs/manual-fr/restore.tex index de69de3b..79487cf9 100644 --- a/docs/manual-fr/restore.tex +++ b/docs/manual-fr/restore.tex @@ -11,7 +11,7 @@ \index[general]{General } \addcontentsline{toc}{subsection}{General} -Below, we will discuss restoring files with the Console {\bf Restore} command, +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 @@ -27,8 +27,9 @@ job. That is a job with {\bf Type = Restore}. As a consequence, you will need a predefined {\bf restore} job in your {\bf bacula-dir.conf} (Director's config) file. The exact parameters (Client, FileSet, ...) that you define are not important as you can either modify them manually before running the job or -if you use the {\bf restore} command, explained below, they will be -automatically set for you. +if you use the {\bf restore} command, explained below, Bacula will +automatically set them for you. In fact, you can no longer simply run a restore +job. You must use the restore command. Since Bacula is a network backup program, you must be aware that when you restore files, it is up to you to ensure that you or Bacula have selected the @@ -37,8 +38,13 @@ correct Client and the correct hard disk location for restoring those files. the files to a different directory on client B. Normally, you will want to avoid this, but assuming the operating systems are not too different in their file structures, this should work perfectly well, if so desired. -\label{Example1} +By default, Bacula will restore data to the same Client that was backed +up, and those data will be restored not to the original places but to +{\bf /tmp/bacula-restores}. You may modify any of these defaults when the +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 } @@ -50,13 +56,16 @@ simply to specify what kind of restore you want (current, before a particular date), and what files to restore. Bacula will then do the rest. This is accomplished using the {\bf restore} command in the Console. First you -select the kind of restore you want, then Bacula Once the JobIds are selected, +select the kind of restore you want, then the JobIds are selected, the File records for those Jobs are placed in an internal Bacula directory tree, and the restore enters a file selection mode that allows you to 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. + Within the Console program, after entering the {\bf restore} command, you are presented with the following selection prompt: @@ -69,48 +78,101 @@ select which files from those JobIds are to be restored. To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved - 3: Enter list of JobIds to select + 3: Enter list of comma separated JobIds to select 4: Enter SQL list command 5: Select the most recent backup for a client 6: Select backup for a client before a specified time 7: Enter a list of files to restore 8: Enter a list of files to restore before a specified time - 9: Cancel -Select item: (1-9): - + 9: Find the JobIds of the most recent backup for a client + 10: Find the JobIds for a backup for a client before a specified time + 11: Enter a list of directories to restore for found JobIds + 12: Cancel +Select item: (1-12): \end{verbatim} \normalsize \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). +\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). + \item Item 2 will list all the Jobs where a specified file is saved. If you - find the Job you want, you can then select item 3 and enter the JobId. + find the Job you want, you can then select item 3 and enter the JobId. + \item Item 3 allows you the enter a list of comma separated JobIds whose - files will be put into the directory tree. + 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. + 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. -\item Item 6 allows you to specify a date and time then Bacula will + 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. + + There are two important things to note. First, this automatic selection + will never select a job that failed (terminated with an error status). + If you have such a job and want to recover one or more files from it, + you will need to explicitly enter the JobId in item 3, then choose the + files to restore. + + If some of the Jobs that are needed to do the restore have had their + File records pruned, the restore will be incomplete. Bacula currently + does not correctly detect this condition. You can however, check for + this by looking carefully at the list of Jobs that Bacula selects and + prints. If you find Jobs with the JobFiles column set to zero, when + files should have been backed up, then you should expect problems. + + If all the File records have been pruned, Bacula will realize that there + are no file records in any of the JobIds chosen and will inform you. It + 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. + +\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. 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. -\item Item 9 allows you to cancel the restore command. - \end{itemize} + filenames. See Item 7 above for more details. + +\item Item 9 allows you find the JobIds of the most recent backup for + a client. This is much like option 5 (it uses the same code), but + those JobIds are retained internally as if you had entered them + manually. You may then select item 11 (see below) to restore one + or more directories. + +\item Item 10 is the same as item 9, except that it allows you to enter + a before date (as with item 6). These JobIds will then be retained + internally. + +\index[general]{Restore Directories} +\item Item 11 allows you to enter a list of JobIds from which you can + select directories to be restored. The list of JobIds can have been + previously created by using either item 9 or 10 on the menu. You + may then enter a full path to a directory name or a filename preceded + by a less than sign (\lt{}). The filename should contain a list + of directories to be restored. All files in those directories will + be restored, but if the directory contains subdirectories, nothing + will be restored in the subdirectory unless you explicitly enter its + name. + +\item Item 12 allows you to cancel the restore command. +\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 @@ -133,8 +195,8 @@ Select Client (File daemon) resource (1-9): \end{verbatim} \normalsize -You will probably have fare fewer Clients than this example, and if you have -only one Client, it will be automatically selected, but 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: @@ -159,14 +221,22 @@ the columns are truncated here for presentation: \footnotesize \begin{verbatim} -+-------+------+----------+-------------+-------------+------+-------+------------+ -| JobId | Levl | JobFiles | StartTime | VolumeName | File | SesId | VolSesTime | -+-------+------+----------+-------------+-------------+------+-------+------------+ -| 1,792 | F | 128,374 | 08-03 01:58 | DLT-19Jul02 | 67 | 18 | 1028042998 | -| 1,792 | F | 128,374 | 08-03 01:58 | DLT-04Aug02 | 0 | 18 | 1028042998 | -| 1,797 | I | 254 | 08-04 13:53 | DLT-04Aug02 | 5 | 23 | 1028042998 | -| 1,798 | I | 15 | 08-05 01:05 | DLT-04Aug02 | 6 | 24 | 1028042998 | -+-------+------+----------+-------------+-------------+------+-------+------------+ ++-------+------+----------+-------------+-------------+------+-------+---------- +--+ +| JobId | Levl | JobFiles | StartTime | VolumeName | File | SesId | +VolSesTime | ++-------+------+----------+-------------+-------------+------+-------+---------- +--+ +| 1,792 | F | 128,374 | 08-03 01:58 | DLT-19Jul02 | 67 | 18 | +1028042998 | +| 1,792 | F | 128,374 | 08-03 01:58 | DLT-04Aug02 | 0 | 18 | +1028042998 | +| 1,797 | I | 254 | 08-04 13:53 | DLT-04Aug02 | 5 | 23 | +1028042998 | +| 1,798 | I | 15 | 08-05 01:05 | DLT-04Aug02 | 6 | 24 | +1028042998 | ++-------+------+----------+-------------+-------------+------+-------+---------- +--+ You have selected the following JobId: 1792,1792,1797 Building directory tree for JobId 1792 ... Building directory tree for JobId 1797 ... @@ -177,7 +247,10 @@ $ \normalsize Depending on the number of {\bf JobFiles} for each JobId, the {\bf Building -directory tree ...``} can take a bit of time. +directory tree ..."} can take a bit of time. If you notice ath all the +JobFiles are zero, your Files have probably been pruned and you will not be +able to select any individual files -- it will be restore everything or +nothing. In our example, Bacula found four Jobs that comprise the most recent backup of the specified Client and FileSet. Two of the Jobs have the same JobId because @@ -188,57 +261,63 @@ that saved 15 files. Next Bacula entered those Jobs into the directory tree, with no files marked to be restored as a default, tells you how many files are in the tree, and -tells you what the current working directory ({\bf cwd}) is /. Finally, Bacula +tells you that the current working directory ({\bf cwd}) is /. Finally, Bacula 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}. 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 had entered the JobIds {\bf 1792,1797,1798} we would have arrived at the same -point. +point. -One point to note if you are manually entering JobIds is that you must enter +One point to note, if you are manually entering JobIds, is that you must enter them in the order they were run (generally in increasing JobId order). If you enter them out of order and the same file was saved in two or more of the Jobs, you may end up with an old version of that file (i.e. not the most recent). +Directly entering the JobIds can also permit you to recover data from +a Job that wrote files to tape but that terminated with an error status. + While in file selection mode, you can enter {\bf help} or a question mark (?) to produce a summary of the available commands: \footnotesize \begin{verbatim} - Command Description + Command Description ======= =========== cd change current directory count count marked files in and below the cd - dir list current directory + dir long list current directory, wildcards allowed done leave file selection mode estimate estimate restore size - exit exit = done - find find files -- wildcards allowed + exit same as done command + find find files, wildcards allowed help print help - ls list current directory -- wildcards allowed + ls list current directory, wildcards allowed lsmark list the marked files in and below the cd - mark mark file to be restored - markdir mark directory entry to be restored -- nonrecursive + mark mark dir/file to be restored recursively in dirs + markdir mark directory name to be restored (no files) pwd print current working directory - unmark unmark file to be restored - unmarkdir unmark directory -- no recursion - quit quit + unmark unmark dir/file to be restored recursively in dir + unmarkdir unmark directory name only no recursion + quit quit and do not do restore ? print help - \end{verbatim} \normalsize -As a default no files have been selected for restore. If you want to restore +As a default no files have been selected for restore (unless you +added {\bf all} to the command line. If you want to restore everything, at this point, you should enter {\bf mark *}, and then {\bf done} and {\bf Bacula} will write the bootstrap records to a file and request your approval to start a restore job. If you do not enter the above mentioned {\bf mark *} command, you will start with an empty slate. Now you can simply start looking at the tree and {\bf -mark} particular files or directories if you want restored. It is easy to make +mark} particular files or directories you want restored. It is easy to make a mistake in specifying a file to mark or unmark, and Bacula's error handling is not perfect, so please check your work by using the {\bf ls} or {\bf dir} commands to see what files are actually selected. Any selected file has its @@ -282,11 +361,13 @@ OK to run? (yes/mod/no): \normalsize Please examine each of the items very carefully to make sure that they are -correct. In particular, look at {\bf Where}, which tells you where in the -directory structure the files will be restored, and {\bf Client}, which tells -you which client will receive the files. These items will not always be -completed with the correct values depending on which of the restore options -you chose. +correct. In particular, look at {\bf Where}, which tells you where in the +directory structure the files will be restored, and {\bf Client}, which +tells you which client will receive the files. Note that by default the +Client which will receive the files is the Client that was backed up. +These items will not always be completed with the correct values depending +on which of the restore options you chose. You can change any of these +default items by entering {\bf mod} and responding to the prompts. The above assumes that you have defined a {\bf Restore} Job resource in your Director's configuration file. Normally, you will only need one Restore Job @@ -307,7 +388,7 @@ with the specified backup {\bf JobId} (i.e. the JobId of the Job that originally backed up the files). Finally before running the job, please note that the default location for -restoring files is {\bf not} their original locations, rather the directory +restoring files is {\bf not} their original locations, but rather the directory {\bf /tmp/bacula-restores}. You can change this default by modifying your {\bf bacula-dir.conf} file, or you can modify it using the {\bf mod} option. If you want to restore the files to their original location, you must have {\bf @@ -336,18 +417,21 @@ prompt list: To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved - 3: Enter list of JobIds to select + 3: Enter list of comma separated JobIds to select 4: Enter SQL list command 5: Select the most recent backup for a client 6: Select backup for a client before a specified time 7: Enter a list of files to restore 8: Enter a list of files to restore before a specified time - 9: Cancel -Select item: (1-9): 7 + 9: Find the JobIds of the most recent backup for a client + 10: Find the JobIds for a backup for a client before a specified time + 11: Enter a list of directories to restore for found JobIds + 12: Cancel +Select item: (1-12): \end{verbatim} \normalsize -which then prompts you with for the client name: +which then prompts you for the client name: \footnotesize \begin{verbatim} @@ -392,7 +476,7 @@ Enter filename: If you want Bacula to read the filenames from a file, you simply precede the filename with a less-than symbol (\lt{}). When you have entered all the filenames, you enter a blank line, and Bacula will write the bootstrap file, -tell you what tapes will be used, and propose a Restore job to be run: +tells you what tapes will be used, and proposes a Restore job to be run: \footnotesize \begin{verbatim} @@ -427,7 +511,7 @@ restore client=Rufus file= stunnel.pem diff --git a/docs/manual-fr/supportedchangers.tex b/docs/manual-fr/supportedchangers.tex index 11fc00e2..aa645363 100644 --- a/docs/manual-fr/supportedchangers.tex +++ b/docs/manual-fr/supportedchangers.tex @@ -3,84 +3,63 @@ \section*{Supported Autochangers} \label{_ChapterStart21} -\index[general]{Autochangers!Supported } -\index[general]{Supported Autochangers } \addcontentsline{toc}{section}{Supported Autochangers} -\subsection*{Supported Autochangers} +\subsection*{Supported Autochanger Models} \label{Models} -\index[general]{Autochangers!Supported } -\index[general]{Supported Autochangers } -\addcontentsline{toc}{subsection}{Supported Autochangers} +\index[general]{Supported Autochanger Models} +\index[general]{Autochangers!Supported} +\addcontentsline{toc}{subsection}{Supported Autochanger Models} + +I hesitate to call these "supported" autochangers because the only +autochangers that I have in my possession and am able to test are the HP +SureStore DAT40X6 and the Overland PowerLoader LTO-2. All the other +autochangers have been reported to work by Bacula users. Note, in the +Capacity/Slot column below, I quote the Compressed capacity per tape (or +Slot). -I hesitate to call these ``supported'' autochangers because the only -autochanger that I have in my possession and am able to test is the HP -SureStore DAT40X6. All the other autochangers have been reported to work by -Bacula users. Note, in the Capacity/Slot column below, I quote the Compressed -capacity per tape (or Slot). \addcontentsline{lot}{table}{Autochangers Known to Work with Bacula} -\begin{longtable}{|p{0.6in}|p{0.8in}|p{0.9in}|p{0.8in}|p{0.5in}|p{0.75in}|} +\begin{longtable}{|p{0.6in}|p{0.8in}|p{1.9in}|p{0.8in}|p{0.5in}|p{0.75in}|} \hline \multicolumn{1}{|c| }{\bf OS } & \multicolumn{1}{c| }{\bf Man. } & \multicolumn{1}{c| }{\bf Media } & \multicolumn{1}{c| }{\bf Model } & \multicolumn{1}{c| }{\bf Slots } & \multicolumn{1}{c| }{\bf Cap/Slot } \\ - \hline -{Linux } & {Adic } & {LTO-1/2, SDLT 320 } & {Adic Scalar 24 } & {24} & {100GB -} \\ - \hline -{Linux } & {Adic } & {LTO-2 } & {Adic FastStor 2, Sun Storedge L8 } & {8} & -{200GB } \\ - \hline -{- } & {Dell } & {LTO-2 } & {PowerValut 132T/136T } & {-} & {100GB } \\ - \hline -{Linux } & {Exabyte } & {VXA2 } & {VXA PacketLoader 1x10 2U } & {10} & -{80/160GB } \\ - \hline -{Linux Gentoo 1.4 } & {Exabyte } & {AIT-2 } & {215A } & {15 (2 drives)} & -{50GB } \\ - \hline -{Linux } & {HP } & {DDS-4 } & {SureStore DAT-40X6 } & {6 } & {40GB } \\ - \hline -{Linux } & {HP } & {Ultrium-2/LTO } & {MSL 6000/ 60030/ 5052 } & {28 } & -{200/400GB } \\ - \hline -{- } & {HP } & {DLT } & {A4853 DLT } & {30} & {40/70GB } \\ - \hline -{Linux } & {HP (Compaq) } & {DLT VI } & {Compaq TL-895 } & {96+4 import -export} & {35/70GB } \\ - \hline -{SuSE 9.0 } & {IBM } & {LTO } & {IBM 3581 Ultrium Tape Loader } & {7} & -{200/400GB } \\ - \hline -{- } & {Overland } & {LTO } & {Overland LoaderXpress LTO } & {10-19} & {100GB -} \\ - \hline -{- } & {Overland } & {LTO } & {Overland Neo2000 LTO } & {26-30} & {100GB } \\ - \hline -{FreeBSD 4.9 } & {QUALSTAR TLS-4210 (Qualstar) } & {AIT1: 36GB, AIT2: 50GB all -uncomp } & {QUALSTAR TLS-4210 } & {12} & {AIT1: 36GB, AIT2: 50GB all uncomp } -\\ - \hline -{Linux } & {Skydata } & {DLT } & {ATL-L200 } & {8} & {40/80 } \\ - \hline -{- } & {Sony } & {DDS-4 } & {TSL-11000 } & {8} & {40GB } \\ - \hline -{Linux } & {Sony } & {AIT-2 } & {LIB-304(SDX-500C) } & {?} & {200GB } \\ - \hline -{FreeBSD 4.9-STABLE } & {Sony } & {AIT-1 } & {TSL-SA300C } & {4} & {45/70GB } -\\ - \hline -{- } & {Storagetek } & {DLT } & {Timberwolf DLT } & {6} & {40/70 } \\ - \hline -{Solaris } & {Sun } & {4mm DLT } & {Sun Desktop Archive Python 29279 } & {4} & -{20GB } \\ - \hline -{Linux } & {Tandberg } & {DLT VI } & {VS 640 } & {8?} & {35/70GB } \\ - \hline -{Linux 2.6.x } & {Tandberg Data } & {SLR100 } & {SLR100 Autoloader } & {8} & -{50/100GB } -\\ \hline + \hline {Linux } & {Adic } & {DDS-3} & {Adic 1200G } & {12} & {-} \\ + \hline {Linux } & {Adic } & {DLT} & {FastStore 4000 } & {7} & {20GB} \\ + \hline {Linux } & {Adic } & {LTO-1/2, SDLT 320 } & {Adic Scalar 24 } & {24} & {100GB } \\ + \hline {Linux } & {Adic } & {LTO-2 } & {Adic FastStor 2, Sun Storedge L8 } & {8} & {200GB } \\ + \hline {- } & {CA-VM } & {?? } & {Tape } & {??} & {?? } \\ + \hline {Linux Gentoo} & {Dell} & {DLT VI,LTO-2} & {PowerVault 122T/132T/136T } & {-} & {100GB } \\ + \hline {- } & {DFSMS } & {?? } & {VM RMM} & {-} & {?? } \\ + \hline {z/VM } & {IBM } & {?? } & {IBM Tape Manager } & {-} & {?? } \\ + \hline {z/VM } & {IBM } & {?? } & {native tape } & {-} & {?? } \\ + \hline {Linux } & {Exabyte } & {VXA2 } & {VXA PacketLoader 1x10 2U } & {10} & {80/160GB } \\ + \hline {- } & {Exabyte } & {LTO } & {Magnum 1x7 LTO Tape Auotloader } & {7} & {200/400GB } \\ + \hline {Linux Gentoo 1.4 } & {Exabyte } & {AIT-2 } & {215A } & {15 (2 drives)} & {50GB } \\ + \hline {Linux } & {HP } & {DDS-4 } & {SureStore DAT-40X6 } & {6 } & {40GB } \\ + \hline {Linux } & {HP } & {Ultrium-2/LTO } & {MSL 6000/ 60030/ 5052 } & {28 } & {200/400GB } \\ + \hline {- } & {HP } & {DLT } & {A4853 DLT } & {30} & {40/70GB } \\ + \hline {Linux } & {HP (Compaq) } & {DLT VI } & {Compaq TL-895 } & {96+4 import export} & {35/70GB } \\ + \hline {SuSE 9.0 } & {IBM } & {LTO } & {IBM 3581 Ultrium Tape Loader } & {7} & {200/400GB } \\ + \hline {FreeBSD 5.4} & {IBM } & {DLT} & {IBM 3502-R14 -- rebranded ATL L-500} & {14} & {35/70GB } \\ + \hline {Debian} & {Overland } & {LTO } & {Overland LoaderXpress LTO/DLT8000 } & {10-19} & {40-100GB } \\ + \hline {Fedora} & {Overland } & {LTO } & {Overland PowerLoader LTO-2 } & {10-19} & {200/400GB } \\ + \hline {FreeBSD 5.4-Stable} & {Overland} & {LTO-2} & {Overland Powerloader tape} & {17} & {100GB } \\ + \hline {- } & {Overland} & {LTO } & {Overland Neo2000 LTO } & {26-30} & {100GB } \\ + \hline {- } & {Quantum } & {?? } & {Super Loader } & {??} & {?? } \\ + \hline {FreeBSD 4.9 } & {QUALSTAR TLS-4210 (Qualstar) } & {AIT1: 36GB, AIT2: 50GB all +uncomp } & {QUALSTAR TLS-4210 } & {12} & {AIT1: 36GB, AIT2: 50GB all uncomp }\\ + \hline {Linux } & {Skydata } & {DLT } & {ATL-L200 } & {8} & {40/80 } \\ + \hline {- } & {Sony } & {DDS-4 } & {TSL-11000 } & {8} & {40GB } \\ + \hline {Linux } & {Sony } & {AIT-2} & {LIB-304(SDX-500C) } & {?} & {200GB } \\ + \hline {Linux } & {Sony } & {AIT-3} & {LIB-D81) } & {?} & {200GB } \\ + \hline {FreeBSD 4.9-STABLE } & {Sony } & {AIT-1 } & {TSL-SA300C } & {4} & {45/70GB }\\ + \hline {- } & {Storagetek } & {DLT } & {Timberwolf DLT } & {6} & {40/70 } \\ + \hline {- } & {Storagetek } & {?? } & {ACSLS } & {??} & {?? } \\ + \hline {Solaris } & {Sun } & {4mm DLT } & {Sun Desktop Archive Python 29279 } & {4} & {20GB } \\ + \hline {Linux } & {Tandberg } & {DLT VI } & {VS 640 } & {8?} & {35/70GB } \\ + \hline {Linux 2.6.x } & {Tandberg Data } & {SLR100 } & {SLR100 Autoloader } & {8} & {50/100GB }\\ +\hline \end{longtable} - diff --git a/docs/manual-fr/tapetesting.tex b/docs/manual-fr/tapetesting.tex index 8d5e9645..875ace8f 100644 --- a/docs/manual-fr/tapetesting.tex +++ b/docs/manual-fr/tapetesting.tex @@ -3,7 +3,7 @@ \section*{Testing Your Tape Drive With Bacula} \label{_ChapterStart27} -\index[general]{Testing Your Tape Drive With Bacula } +\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 @@ -11,8 +11,8 @@ 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 } +\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} @@ -51,12 +51,15 @@ one. \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. -\item Run the btape {\bf fill} command, preferrably with two volumes. This +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. + +\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 manual -issue the appopriate {\bf mtx} command, or press the autochanger buttons to -change the tape when requested to do so. + 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 + 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. @@ -99,9 +102,38 @@ 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} +\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, +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 = +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 +and Bacula will fail the job. + +In version 1.38.x, the Bacula code partially gets around this problem -- at +least in the initial open of the drive. However, functions like Polling +the drive do not work correctly if there is no tape in the drive. +Providing you do not use {\bf Offline on Unmount = yes}, you should not +experience job failures as mentioned above. If you do experience such +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} -\index[general]{File!Specifying the Configuration } -\index[general]{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 @@ -109,14 +141,14 @@ Starting with version 1.27, each of the tape utility programs including the (actually, the only part of the configuration file that {\bf btape} needs is the {\bf Device} resource definitions). This permits {\bf btape} to find the configuration parameters for your archive device (generally a tape drive). -Without those parameters, the testing and utility programs do not no how to +Without those parameters, the testing and utility programs do not know how to 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} -\index[general]{Tape!Specifying a Device Name For a } -\index[general]{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 @@ -129,8 +161,8 @@ to the Device names (rather than the Archive device names). See below for specifying Volume names. \subsubsection*{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 } +\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 @@ -143,7 +175,7 @@ to the archive device name, and the filename is equivalent to the volume name. \subsection*{btape} \label{btape1} -\index[general]{Btape } +\index[general]{Btape} \addcontentsline{toc}{subsection}{btape} This program permits a number of elementary tape operations via a tty command @@ -163,7 +195,7 @@ directory. If your configuration file is elsewhere, please use the {\bf -c} option to specify where. The physical device name or the Device resource name must be specified on the -command line, and that this same device name must be present in the Storage +command line, and this same device name must be present in the Storage daemon's configuration file read by {\bf btape} \footnotesize @@ -172,6 +204,7 @@ Usage: btape [options] device_name -b specify bootstrap file -c set configuration file to file -d set debug level to nn + -p proceed inspite of I/O errors -s turn off signals -v be verbose -? print this message. @@ -179,8 +212,8 @@ Usage: btape [options] device_name \normalsize \subsubsection*{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 } +\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 @@ -279,8 +312,8 @@ For FreeBSD users, please see the notes below for doing further testing of your tape drive. \subsubsection*{Linux SCSI Tricks} -\index[general]{Tricks!Linux SCSI } -\index[general]{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: @@ -305,6 +338,16 @@ Host: scsi2 Channel: 00 Id: 04 Lun: 00 \end{verbatim} \normalsize +The above represents first an autochanger and second a simple +tape drive. The HP changer (the first entry) uses the same SCSI channel +for data and for control, so in Bacula, you would use: +\footnotesize +\begin{verbatim} +Archive Device = /dev/nst0 +Changer Device = /dev/sg0 +\end{verbatim} +\normalsize + If you want to remove the SDT-10000 device, you can do so as root with: \footnotesize @@ -324,18 +367,44 @@ echo "scsi add-single-device 2 0 4 0">/proc/scsi/scsi where the 2 0 4 0 are the Host, Channel, Id, and Lun as seen on the output from {\bf cat /proc/scsi/scsi}. Note, the Channel must be specified as numeric. -\label{problems1} +Below is a slightly more complicated output, which is a single autochanger +with two drives, and which operates the changer on a different channel +from from the drives: + +\footnotesize +\begin{verbatim} +Attached devices: +Host: scsi0 Channel: 00 Id: 00 Lun: 00 + Vendor: ATA Model: WDC WD1600JD-75H Rev: 08.0 + 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: 0106 + Type: Medium Changer ANSI SCSI revision: 02 +\end{verbatim} +\normalsize + +The above tape drives are accessed on /dev/nst0 and /dev/nst1, while +the control channel for those two drives is /dev/sg3. + + + +\label{problems1} \subsection*{Tips for Resolving Problems} -\index[general]{Problems!Tips for Resolving } -\index[general]{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} -\index[general]{Files!Bacula Saves But Cannot Restore } -\index[general]{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: @@ -383,11 +452,32 @@ fails. This directive is available in version 1.35.5 or later (and not yet tested). \end{enumerate} -\label{opendevice} +If you are getting error messages such as: +\footnotesize +\begin{verbatim} +Volume data error at 0:0! +Block checksum mismatch in block=0 len=32625 calc=345678 blk=123456 +\end{verbatim} +\normalsize + +You are getting tape read errors, and this is most likely due to +one of the following things: +\begin{enumerate} +\item An old or bad tape. +\item A dirty drive that needs cleaning (particularly for DDS drives). +\item A loose SCSI cable. +\item Old firmware in your drive. Make sure you have the latest firmware + loaded. +\item Computer memory errors. +\item Over-clocking your CPU. +\item A bad SCSI card. +\end{enumerate} + +\label{opendevice} \subsubsection*{Bacula Cannot Open the Device} -\index[general]{Device!Bacula Cannot Open the } -\index[general]{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: @@ -412,8 +502,8 @@ for this tip. \label{IncorrectFiles} \subsubsection*{Incorrect File Number} -\index[general]{Number!Incorrect File } -\index[general]{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 @@ -421,7 +511,7 @@ ioctl(MTEOM)} function. Then Bacula uses the {\bf ioctl(MTIOCGET)} function to retrieve the current file position from the {\bf mt\_fileno} field. Some SCSI tape drivers will use a fast means of seeking to the end of the medium and in doing so, they will not know the current file position and hence return a {\bf --1}. As a consequence, if you get {\bf ``This is NOT correct!''} in the +-1}. As a consequence, if you get {\bf "This is NOT correct!"} in the positioning tests, this may be the cause. You must correct this condition in order for Bacula to work. @@ -449,9 +539,9 @@ medium, and Bacula will keep track of the file number itself. \subsubsection*{Incorrect Number of Blocks or Positioning Errors during btape Testing} \index[general]{Testing!Incorrect Number of Blocks or Positioning Errors -during btape } +during btape} \index[general]{Incorrect Number of Blocks or Positioning Errors during btape -Testing } +Testing} \addcontentsline{toc}{subsubsection}{Incorrect Number of Blocks or Positioning Errors during btape Testing} @@ -506,18 +596,18 @@ excessive. If at all possible set any fixed block size to something like 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} +\label{TapeModes} \subsubsection*{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 } +\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 -of the your SCSI driver's options to non-default values. For example, if your +of your SCSI driver's options to non-default values. For example, if your driver is set to work in SysV manner, Bacula will not work correctly because it expects BSD behavior. To reset your tape drive to the default values, you can try the following, but {\bf ONLY} if you have a SCSI tape drive on a {\bf @@ -548,7 +638,7 @@ mt -f /dev/nst0 defblksize 0 \end{verbatim} \normalsize -If you would like to know what stoptions you have set before making any of the +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: @@ -581,14 +671,14 @@ Beginning with Bacula version 1.35.8, if Bacula detects that you are running in variable block mode, it will attempt to set your drive appropriately. All OSes permit setting variable block mode, but some OSes do not permit setting the other modes that Bacula needs to function properly. -\label{compression} +\label{compression} \subsubsection*{Checking and Setting Tape Hardware Compression and Blocking Size} \index[general]{Checking and Setting Tape Hardware Compression and Blocking -Size } +Size} \index[general]{Size!Checking and Setting Tape Hardware Compression and -Blocking } +Blocking} \addcontentsline{toc}{subsubsection}{Checking and Setting Tape Hardware Compression and Blocking Size} @@ -606,15 +696,6 @@ mt -f /dev/nst0 defcompression 1 and of course, if you use a zero instead of the one at the end, you will turn it off. -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: - -\footnotesize -\begin{verbatim} -mt -f /dev/nst0 defblksize 0 -\end{verbatim} -\normalsize - If you have built the {\bf mtx} program in the {\bf depkgs} package, you can use tapeinfo to get quite a bit of information about your tape drive even if it is not an autochanger. This program is called using the SCSI control @@ -643,7 +724,7 @@ BlockSize: 0 \normalsize where the {\bf DataCompEnabled: yes} means that tape hardware compression is -turned on. You can see it turn on and off (yes|no) by using the {\bf mt} +turned on. You can turn it on and off (yes|no) by using the {\bf mt} commands given above. Also, this output will tell you if the {\bf BlockSize} 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 @@ -653,6 +734,21 @@ 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 +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. +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 you want. In general, see {\bf man mt} for the options available on +your system. + + If your tape drive requires fixed block sizes (very unusual), you can use the following records: @@ -679,8 +775,8 @@ To recover files from tapes written in fixed block mode, see below. \label{FreeBSDTapes} \subsubsection*{Tape Modes on FreeBSD} -\index[general]{FreeBSD!Tape Modes on } -\index[general]{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 @@ -721,10 +817,10 @@ compatibility of Bacula and your system. A much more optimal Device configuration is shown below, but does not work with all tape drives. Please test carefully before putting either into production. -Note, for FreeBSD 4.10-RELEASE, using a Sony TSL11000 L100 DDS4 w/Autochanger -set to variable block size and DCLZ compression, Brian McDonald reports that -to get Bacula to append correctly between Bacula executions, the correct -values to use are: +Note, for FreeBSD 4.10-RELEASE, using a Sony TSL11000 L100 DDS4 with an +autochanger set to variable block size and DCLZ compression, Brian McDonald +reports that to get Bacula to append correctly between Bacula executions, +the correct values to use are: \footnotesize \begin{verbatim} @@ -752,12 +848,44 @@ configuration is the preferred one because it uses one EOF and no backspacing at the end of the tape, which works much more efficiently and reliably with modern tape drives. +Finally, here is a Device configuration that Danny Butroyd reports to work +correctly with the Overland Powerloader tape library using LT0-2 and +FreeBSD 5.4-Stable: + +\footnotesize +\begin{verbatim} +# Overland Powerloader LT02 - 17 slots single drive +Device { + Name = Powerloader + Media Type = LT0-2 + Archive Device = /dev/nsa0 + AutomaticMount = yes; + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; + Changer Command = "/usr/local/sbin/mtx-changer %c %o %S %a %d" + Changer Device = /dev/pass2 + AutoChanger = yes + Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" + + # FreeBSD Specific Settings + Offline On Unmount = no + Hardware End of Medium = no + BSF at EOM = yes + Backward Space Record = no + Fast Forward Space File = no + TWO EOF = yes +} +\end{verbatim} +\normalsize + + \subsubsection*{Determining What Tape Drives and Autochangers You Have on FreeBSD} \index[general]{FreeBSD!Determining What Tape Drives and Autochangers You Have -on } +} \index[general]{Determining What Tape Drives and Autochangers You Have on -FreeBSD } +FreeBSD} \addcontentsline{toc}{subsubsection}{Determining What Tape Drives and Autochangers You Have on FreeBSD} @@ -788,15 +916,15 @@ tapeinfo -f /dev/pass2 \label{onstream} \subsubsection*{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 } +\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: -\elink{http://sourceforge.net/projects/osst/}{http://sourceforge.net/projects/% -osst/}. +\elink{http://sourceforge.net/projects/osst/} +{http://sourceforge.net/projects/osst/}. To make Bacula work you must first load the new driver then, as root, do: @@ -839,12 +967,23 @@ Device { \end{verbatim} \normalsize -\label{fill} +\subsection*{Hardware Compresson 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 +can disable or activate compression. Start this tool without any +options for a small reference. -\subsubsection*{Using btape to Simulate Bacula Filling a Tape} -\index[general]{Using btape to Simulate Bacula Filling a Tape } -\index[general]{Tape!Using btape to Simulate Bacula Filling a } -\addcontentsline{toc}{subsubsection}{Using btape to Simulate Bacula Filling a +\label{fill} +\subsubsection*{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} Because there are often problems with certain tape drives or systems when end @@ -855,7 +994,7 @@ tapes to ensure that the data has been written in a way that Bacula can recover it. Note, there is also a single tape option as noted below, which you should use rather than the two tape test. See below for more details. -This can be an extremely time consuming process (here is is about 6 hours) to +This can be an extremely time consuming process (here it is about 6 hours) to fill a full tape. Note, that btape writes random data to the tape when it is filling it. This has two consequences: 1. it takes a bit longer to generate the data, especially on slow CPUs. 2. the total amount of data is @@ -872,8 +1011,8 @@ 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 } +\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} @@ -894,11 +1033,11 @@ location is listed in the prompt) using any ASCII editor. Remove all {\bf VolBlock} lines in the file. When the file is re-written, answer the question, and Bacula will run without using block positioning, and it should recover your files. -\label{BlockModes} +\label{BlockModes} \subsection*{Tape Blocking Modes} -\index[general]{Modes!Tape Blocking } -\index[general]{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. @@ -910,14 +1049,14 @@ Bacula is configured to write fixed block sizes, it will pad the last block of the Job to the correct size. Bacula expects variable tape block size drives to behave as follows: Each write to the drive results in a single record being written to the tape. Each read returns a single record. If you request less -byte than are in the record, only those number of bytes will be returned, but +bytes than are in the record, only those number of bytes will be returned, but the entire logical record will have been read (the next read will retrieve the next record). Thus data from a single write is always returned in a single read, and sequentially written records are returned by sequential reads. Bacula expects fixed block size tape drives to behave as follows: If a write length is greater than the physical block size of the drive, the write will be -written as two blocks each of the fixed physical size. This a single write may +written as two blocks each of the fixed physical size. This single write may become multiple physical records on the tape. (This is not a good situation). According to the documentation, one may never write an amount of data that is not the exact multiple of the blocksize (it is not specified if an error @@ -934,3 +1073,101 @@ that block is split into two or more physical records on the tape. Bacula 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} +\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. + +\begin{description} +\item[Tape level] + It is always possible to position filemarks or blocks, whereas + positioning to the end-of-data is only optional feature, however it is + implemented very often. SCSI specification also talks about optional + sequential filemarks, setmarks and sequential setmarks, but these are not + implemented so often. Modern tape drives keep track of file positions in + built-in chip (AIT, LTO) or at the beginning of the tape (SDLT), so there + is not any speed difference, if end-of-data or filemarks is used (I have + heard, that LTO-1 from all 3 manufacturers do not use its chip for file + locations, but a tape as in SDLT case, and I'm not sure about LTO-2 and + LTO-3 case). However there is a big difference, that end-of-data ignores + file position, whereas filemarks returns the real number of skipped + files, so OS can track current file number just in filemarks case. + +\item[OS level] + Solaris does use just SCSI SPACE Filemarks, it does not support SCSI + SPACE End-of-data. When MTEOM is called, Solaris does use SCSI SPACE + Filemarks with count = 1048576 for fast mode, and combination of SCSI + SPACE Filemarks with count = 1 with SCSI SPACE Blocks with count = 1 for + slow mode, so EOD mark on the tape on some older tape drives is not + 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. + 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. + + 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. + +\item[Bacula level] + When {\bf Hardware End of Medium = Yes} is used, MTEOM is called, but it + does not mean, that hardware End-of-data must be used. When Hardware End + of Medium = No, if Fast Forward Space File = Yes, MTFSF with count = + 32767 is used, else Block Read with count = 1 with Forward Space File + with count = 1 is used, which is really very slow. + +\item [Hardware End of Medium = Yes|No] + The name of this option is misleading and is the source of confusion, + because it is not the hardware EOM, what is really switched here. + + If I use Yes, OS must not use SCSI SPACE End-of-data, because Bacula + expects, that there is tracked file number, which is not supported by + SCSI specification. Instead, the OS have to use SCSI SPACE Filemarks. + + If I use No, an action depends on Fast Forward Space File. + + Considering {\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} + +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} + +\end{description} + +\subsection*{Autochanger Errors} +\index[general]{Errors!Autochanger} +\index[general]{Autochanger Errors} +\addcontentsline{toc}{subsection}{Autochanger Errors} + +If you are getting errors such as: + +\footnotesize +\begin{verbatim} +3992 Bad autochanger "load slot 1, drive 1": ERR=Child exited with code 1. +\end{verbatim} +\normalsize + +and you are running your Storage daemon as non-root, then most likely +you are having permissions problems with the control channel. Running +as root, set permissions on /dev/sgX so that the userid and group of +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*. diff --git a/docs/manual-fr/thanks.tex b/docs/manual-fr/thanks.tex index 797d8942..d752b18d 100644 --- a/docs/manual-fr/thanks.tex +++ b/docs/manual-fr/thanks.tex @@ -7,9 +7,9 @@ \addcontentsline{toc}{section}{Thanks} Thanks to Richard Stallman for starting the Free Software movement and for -bringing us gcc and all the other GNU tools. +bringing us gcc and all the other GNU tools as well as the GPL license. -Thanks to Linus Torvalds for bring us Linux. +Thanks to Linus Torvalds for bringing us Linux. Thanks to all the Free Software programmers. Without being able to peek at your code, and in some cases, take parts of it, this project would have been @@ -25,7 +25,11 @@ from which I was able to borrow some ideas and code that I had written. Special thanks to D. Scott Barninger for writing the bacula RPM spec file, building all the RPM files and loading them onto Source Forge. This has been a -tremendous help. +tremendous help. + +Many thanks to Karl Cunningham for converting the manual from html format to +LaTeX. It was a major effort flawlessly done that will benefit the Bacula +users for many years to come. Thanks Karl. Thanks to Dan Langille for the {\bf incredible} amount of testing he did on FreeBSD. His perseverance is truly remarkable. Thanks also for the many @@ -47,10 +51,19 @@ code and for contributing it to the Bacula project. Thanks to Nicolas Boichat for writing wx-console and the bacula-tray-monitor. These are very nice GUI additions to Bacula. +Thanks to Thorsten Engel for his excellent knowledge of Win32 systems, and +for making the Win32 File daemon Unicode compatible, as well as making +the Win32 File daemon interface to Microsoft's Volume Shadow Copy (VSS). +These two are big pluses for Bacula! + Thanks to Nic Bellamy for providing the bacula-dir.conf file that he uses to implement daily tape rotation using multiple Pools. -Thanks to Johan Decock for providing numerous corrections to the manual. +Thanks also to Jo Simoens for finding and correcting so many typos and +other problems with the manual. + +Thanks to Arno Lehmann for his excellent and infatigable help and advice +to users. Thanks to all the Bacula users, especially those of you who have contributed ideas, bug reports, patches, and new features. diff --git a/docs/manual-fr/tips.tex b/docs/manual-fr/tips.tex index 2ee8db2c..25b0e69e 100644 --- a/docs/manual-fr/tips.tex +++ b/docs/manual-fr/tips.tex @@ -23,7 +23,7 @@ distribution. \addcontentsline{toc}{subsection}{Upgrading Bacula Versions} The first thing to do before upgrading from one version to another is to -ensure that don't overwrite your production (current) version of Bacula until +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 @@ -32,7 +32,8 @@ make a copy of your Bacula directory. If you have done a more typical Unix installation where the binaries are placed in one directory and the configuration files are placed in another, then the simplest way is to configure your new Bacula to go into a single -file. +file. Alternatively, make copies of all your binaries and especially your +conf files. Whatever your situation may be (one of the two just described), you should probably start with the {\bf defaultconf} script that can be found in the {\bf @@ -46,7 +47,13 @@ over the old Bacula. When installing a new Bacula you need not worry about losing the changes you made to your configuration files as the installation process will not -overwrite them. +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 +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} \label{notification} @@ -91,7 +98,7 @@ Messages { \normalsize You will need to ensure that the {\bf /home/bacula/bin} path on the {\bf -mailcommand} and the {\bf operatorcommand} lines points to your {\bf Bacula} +mailcommand} and the {\bf operatorcommand} lines point to your {\bf Bacula} binary directory where the {\bf bsmtp} program will be installed. You will also want to ensure that the {\bf your-email-address} is replaced by your email address, and finally, you will also need to ensure that the {\bf @@ -224,7 +231,7 @@ command: \end{verbatim} \normalsize -which runs my ``watchdog'' script. As an example, I have added the Job codes +which runs my "watchdog" script. As an example, I have added the Job codes \%c and \%d which will cause the Client name and the Director's name to be passed to the script. For example, if the Client's name is {\bf Watchdog} and the Director's name is {\bf main-dir} then referencing \$1 in the script would @@ -232,7 +239,7 @@ get {\bf Watchdog} and referencing \$2 would get {\bf main-dir}. In this case, having the script know the Client and Director's name is not really useful, but in other situations it may be. -You can put anything in the watchdog scrip. In my case, I like to monitor the +You can put anything in the watchdog script. In my case, I like to monitor the size of my catalog to be sure that {\bf Bacula} is really pruning it. The following is my watchdog script: @@ -292,14 +299,15 @@ clients. The necessary bootstrap information is appended to this file during each {\bf Incremental} backup, and the file is totally rewritten during each {\bf Full} backup. -Note, one major disadvantage of writing to an NFS mounted volume as I do is +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. The solution to this +the machine exporting the NSF 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 -options in detail. +options in detail. However, I found that with the {\bf soft} option +NFS disconnected frequently causing even more problems. If you are starting off in the middle of a cycle (i.e. with Incremental backups) rather than at the beginning (with a Full backup), the {\bf @@ -560,7 +568,7 @@ Now lets consider the case: \normalsize Here the Bacula found fewer files on the volume than what is marked in the -catalog. Now, in this case, you should hesitate lot before modifying the count +catalog. Now, in this case, you should hesitate a lot before modifying the count in the catalog, because if you force the catalog from 12 to 10, Bacula will start writing after the file 10 on the tape, possibly overwriting valid data, and if you ever try to restore any of the files that the catalog has marked as @@ -595,7 +603,7 @@ Volume. You should protect your Catalog database. If you are using SQLite, make sure that the working directory is readable only by root (or your Bacula userid), -and ensure that {\bf bacula.db} has permissions {\bf -rw-r\verb{--{r\verb{--{} (i.e. 640) or +and ensure that {\bf bacula.db} has permissions {\bf -rw-r\verb:--:r\verb:--:} (i.e. 640) or more strict. If you are using MySQL or PostgreSQL, please note that the Bacula 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 @@ -621,7 +629,7 @@ run the job. \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'' +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 magazine. @@ -738,7 +746,7 @@ Pool: Default \normalsize Note, I have truncated the output for presentation purposes. What is -significant for is that I can see that my current tape has almost 10 Gbytes of +significant, is that I can see that my current tape has almost 10 Gbytes of data, and that the average amount of data I get on my tapes is about 60 Gbytes. So if I go on vacation now, I don't need to worry about tape capacity (at least not for short absences). @@ -782,14 +790,14 @@ Include. 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 +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 scripts on the remote machine e.g. for stopping databases or other services -while doing the backup. (Of cause I have to start the services again when the +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 +automatically using a private key. First You have to generate a keypair. I've done this by: \footnotesize @@ -799,7 +807,7 @@ ssh-keygen -b 4096 -t dsa -f Bacula_key \normalsize This statement may take a little time to run. It creates a public/private key -pair with no pass phrase. You could save the keys in /etc/bacula. Now you have +pair with no passphrase. You could save the keys in /etc/bacula. Now you have two new files : Bacula\_key which contains the private key and Bacula\_key.pub which contains the public key. @@ -817,7 +825,7 @@ to the sshd\_config file on the remote machine. Where the \%h stands for the home-directory of the user (root in this case). Assuming that your sshd is already running on the remote machine, you can now -enter the folloing on the machine where Bacula runs: +enter the following on the machine where Bacula runs: \footnotesize \begin{verbatim} @@ -825,7 +833,7 @@ ssh -i Bacula_key -l root "ls -la" \end{verbatim} \normalsize -This should execute the ``ls -la'' command on the remote machine. +This should execute the "ls -la" command on the remote machine. Now you could add lines like the following to your Director's conf file: @@ -853,7 +861,7 @@ in a single script. This tip comes from Phil Stracchino. If you decide to blow away your catalog and start over, the simplest way to -re-add all your prelabelled tapes with the minimum of fuss (provided you don't +re-add all your prelabeled tapes with a minimum of fuss (provided you don't 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}. @@ -935,8 +943,8 @@ say thank you and let's bacula continue it's 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 -something like this (``Archive Device'', ``Maximum Changer Wait'', ``Media -Type'' and ``Label media'' may have different values): +something like this ("Archive Device", "Maximum Changer Wait", "Media +Type" and "Label media" may have different values): \footnotesize \begin{verbatim} @@ -958,8 +966,8 @@ Device { \normalsize As the script has to emulate the complete wisdom of a mtx-changer it has an -internal ``database'' where which tape is stored, you can see this at that -line: +internal "database" containing where which tape is stored, you can see this on +the following line: \footnotesize \begin{verbatim} @@ -969,15 +977,16 @@ VOL-0007 VOL-0008 VOL-0009 VOL-0010 VOL-0011 VOL-0012" \normalsize The above should be all on one line, and it effectivly 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.. +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} \label{ConcurrentJobs} -\index[general]{Jobs!Running Concurrent } -\index[general]{Running Concurrent Jobs } +\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 diff --git a/docs/manual-fr/tls.tex b/docs/manual-fr/tls.tex index 6cd14e91..4174aa3b 100644 --- a/docs/manual-fr/tls.tex +++ b/docs/manual-fr/tls.tex @@ -7,7 +7,7 @@ Bacula TLS (Transport Layer Security) is built-in network encryption code to provide secure network transport similar to -that offered by {\bf stunnel} or {\bs ssh}. The Bacula code was +that offered by {\bf stunnel} or {\bf ssh}. The Bacula code was written by Landon Fuller. Supported features of this code include: @@ -18,7 +18,7 @@ Validation \item Forward Secrecy Support via Diffie-Hellman Ephemeral Keying \end{itemize} -This document will refer to both ``server'' and ``client'' contexts. These +This document will refer to both "server" and "client" contexts. These terms refer to the accepting and initiating peer, respectively. Diffie-Hellman anonymous ciphers are not supported by this code. The @@ -102,7 +102,7 @@ may use openssl: openssl dhparam -out dh1024.pem -5 1024 \end{verbatim} -\end{itemize} +\end{description} \subsection*{Creating a Self-signed Certificate} \index[general]{Creating a Self-signed Certificate } @@ -123,6 +123,10 @@ valid for 10 years can be made with the following: The above script will ask you a number of questions. You may simply answer each of them by entering a return, or if you wish you may enter your own data. +An alternative is to generate your self-signed certificates with TinyCA, +which has a very nice Graphical User Interface. TinyCA can be found at +\elink{http://tinyca.sm-zone.net/}{http://tinyca.sm-zone.net/}. + \subsection*{Getting a CA Signed Certificate} \index[general]{Certificate!Getting a CA Signed } @@ -141,3 +145,104 @@ Open-source PKI Book project at Source Forge: http://ospkibook.sourceforge.net/docs/OSPKI-2.4.7/OSPKI-html/ospki-book.htm} {http://ospkibook.sourceforge.net/docs/OSPKI-2.4.7/OSPKI-html/ospki-book.htm}. Note, this link may change. + +\subsection*{Example TLS Configuration Files} +\index[general]{Example!TLS Configuration Files} +\index[general]{TLS Configuration Files} +\addcontentsline{toc}{subsection}{Example TLS Configuration Files} + +Landon has supplied us with the TLS portions of his configuration +files, which should help you setting up your own. + +{\bf bacula-dir.conf} +\footnotesize +\begin{verbatim} + Director { # define myself + Name = backup1-dir + ... + TLS Require = yes + TLS Verify Peer = yes + TLS Allowed CN = "bacula@backup1.example.com" + TLS Allowed CN = "administrator@example.com" + TLS CA Certificate File = /usr/local/etc/ssl/ca.pem + # This is a server certificate, used for incoming + # console connections. + TLS Certificate = /usr/local/etc/ssl/backup1/cert.pem + TLS Key = /usr/local/etc/ssl/backup1/key.pem + } + + Storage { + Name = File + Address = backup1.example.com + ... + TLS Require = yes + TLS CA Certificate File = /usr/local/etc/ssl/ca.pem + # This is a client certificate, used by the director to + # connect to the storage daemon + TLS Certificate = /usr/local/etc/ssl/bacula@backup1/cert.pem + TLS Key = /usr/local/etc/ssl/bacula@backup1/key.pem + } +\end{verbatim} +\normalsize + +{\bf bacula-fd.conf} +\footnotesize +\begin{verbatim} + Director { + Name = backup1-dir + ... + TLS Require = yes + TLS Verify Peer = yes + # Allow only the Director to connect + TLS Allowed CN = "bacula@backup1.example.com" + TLS CA Certificate File = /usr/local/etc/ssl/ca.pem\ + # This is a server certificate. It is used by connecting + # directors to verify the authenticity of this file daemon + TLS Certificate = /usr/local/etc/ssl/server1/cert.pem + TLS Key = /usr/local/etc/ssl/server1/key.pem + } +\end{verbatim} +\normalsize + +{\bf bacula-sd.conf} +\footnotesize +\begin{verbatim} + Storage { # definition of myself + Name = backup1-sd + ... + # These TLS configuration options are used for incoming + # file daemon connections. Director TLS settings are handled + # below. + TLS Require = yes + # Peer certificate is not required/requested -- peer validity + # is verified by the storage connection cookie provided to the + # File Daemon by the director. + TLS Verify Peer = no + TLS CA Certificate File = /usr/local/etc/ssl/ca.pem + # This is a server certificate. It is used by connecting + # file daemons to verify the authenticity of this storage daemon + TLS Certificate = /usr/local/etc/ssl/backup1/cert.pem + TLS Key = /usr/local/etc/ssl/backup1/key.pem + } + + # + # List Directors who are permitted to contact Storage daemon + # + Director { + Name = backup1-dir + ... + TLS Require = yes + # Require the connecting director to provide a certificate + # with the matching CN. + TLS Verify Peer = yes + TLS Allowed CN = "bacula@backup1.example.com" + TLS CA Certificate File = /usr/local/etc/ssl/ca.pem + # This is a server certificate. It is used by the connecting + # director to verify the authenticity of this storage daemon + TLS Certificate = /usr/local/etc/ssl/backup1/cert.pem + TLS Key = /usr/local/etc/ssl/backup1/key.pem + } +\end{verbatim} +\normalsize + + diff --git a/docs/manual-fr/tutorial.tex b/docs/manual-fr/tutorial.tex index 5afec052..28db83fa 100644 --- a/docs/manual-fr/tutorial.tex +++ b/docs/manual-fr/tutorial.tex @@ -1,11 +1,11 @@ %% %% -\section*{A Brief Turorial} +\section*{A Brief Tutorial} \label{_ChapterStart1} -\index[general]{Brief Turorial } -\index[general]{Turorial!Brief } -\addcontentsline{toc}{section}{Brief Turorial} +\index[general]{Brief Tutorial } +\index[general]{Tutorial!Brief } +\addcontentsline{toc}{section}{Brief Tutorial} This chapter will guide you through running Bacula. To do so, we assume you have installed Bacula, possibly in a single file as shown in the previous @@ -69,7 +69,7 @@ you will not want to use {\bf startmysql} or {\bf stopmysql}. If you are running this in production, you will probably want to find some way to automatically start MySQL or PostgreSQL after each system reboot. -If you are using SQLite (i.e. you specified the {\bf \verb{--{with-sqlite=xxx} option +If you are using SQLite (i.e. you specified the {\bf \verb:--:with-sqlite=xxx} option on the {\bf ./configure} command, you need do nothing. SQLite is automatically started by {\bf Bacula}. @@ -79,15 +79,19 @@ started by {\bf Bacula}. \index[general]{Daemons!Starting the } \addcontentsline{toc}{subsection}{Starting the Daemons} -To start the three daemons, from your installation directory, simply enter: +Assuming you have built from source or have installed the rpms, +to start the three daemons, from your installation directory, simply enter: -./bacula start This script starts the Storage daemon, the File daemon, and the +./bacula start + +The {\bf bacula} script starts the Storage daemon, the File daemon, and the Director daemon, which all normally run as daemons in the background. If you are using the autostart feature of Bacula, your daemons will either be automatically started on reboot, or you can control them individually with the files {\bf bacula-dir}, {\bf bacula-fd}, and {\bf bacula-sd}, which are usually located in {\bf /etc/init.d}, though the actual location is system dependent. +Some distributions may do this differently. Note, on Windows, currently only the File daemon is ported, and it must be started differently. Please see the @@ -125,15 +129,17 @@ from the top level directory, simply enter: ./bconsole -Note, on 1.32 versions and lower, the command name is {\bf console} rather -than bconsole. Alternatively to running the command line console, if you have -GNOME installed and used the {\bf \verb{--{enable-gnome} on the configure command, +Alternatively to running the command line console, if you have +GNOME installed and used the {\bf \verb:--:enable-gnome} on the configure command, you may use the GNOME Console program: ./gnome-console -For simplicity, here we will describe only the {\bf ./console} program. Most -of what is described here applies equally well to {\bf ./gnome-console}. +Another possibilty is to run the wxWidgets program {\bf wx-console}. + +For simplicity, here we will describe only the {\bf ./bconsole} program. Most +of what is described here applies equally well to {\bf ./gnome-console} +and to {\bf wx-console} The {\bf ./bconsole} runs the Bacula Console program, which connects to the Director daemon. Since Bacula is a network program, you can run the Console @@ -198,7 +204,7 @@ Type {\bf help} to see a list of available commands: \normalsize Details of the console program's commands are explained in the -\ilink{Console Chapter}{_ChapterStart23} of this manual. +\ilink{Console Chapter}{_ConsoleChapter} of this manual. \subsection*{Running a Job} \label{Running} @@ -209,7 +215,7 @@ Details of the console program's commands are explained in the At this point, we assume you have done the following: \begin{itemize} -\item Configured Bacula with {\bf ./configure \verb{--{your-options} +\item Configured Bacula with {\bf ./configure \verb:--:your-options} \item Built Bacula using {\bf make} \item Installed Bacula using {\bf make install} \item Have created your database with, for example, {\bf @@ -219,10 +225,10 @@ At this point, we assume you have done the following: \item Have possibly edited your {\bf bacula-dir.conf} file to personalize it a bit. BE CAREFUL! if you change the Director's name or password, you will need to make similar modifications in the other .conf files. For the moment -it is probably better to make no changes. + it is probably better to make no changes. \item You have started Bacula with {\bf ./bacula start} \item You have invoked the Console program with {\bf ./bconsole} - \end{itemize} +\end{itemize} Furthermore, we assume for the moment you are using the default configuration files. @@ -257,7 +263,8 @@ size (about 40 Megabytes) and complexity without being too big. The FileSet {\bf Catalog} is used for backing up Bacula's catalog and is not of interest to us for the moment. The {\bf Inc:} entries are the files or directories that will be included in the backup and the {\bf Exc:} are those that will be -excluded. +excluded. You can change what is backed up by editing {\bf bacula-dir.conf} +and changing the {\bf File =} line in the {\bf FileSet} resource. Now is the time to run your first backup job. We are going to backup your Bacula source directory to a File Volume in your {\bf /tmp} directory just to @@ -422,7 +429,7 @@ tells us that Bacula cannot find any Volumes in the Pool for writing the output. This is normal because we have not yet created (labeled) any Volumes. Bacula indicates to you all the details of the volume it needs. -At this point, the job is blocked waiting for a Volume. You can check this if +At this point, the job is BLOCKED waiting for a Volume. You can check this if you want by doing a {\bf status dir}. In order to continue, we must create a Volume that Bacula can write on. We do so with: @@ -559,6 +566,7 @@ First you select one or more JobIds that contain files to be restored. You will be presented several methods of specifying the JobIds. Then you will be allowed to select which files from those JobIds are to be restored. + To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved @@ -568,8 +576,11 @@ To select the JobIds, you have the following choices: 6: Select backup for a client before a specified time 7: Enter a list of files to restore 8: Enter a list of files to restore before a specified time - 9: Cancel -Select item: (1-9): + 9: Find the JobIds of the most recent backup for a client + 10: Find the JobIds for a backup for a client before a specified time + 11: Enter a list of directories to restore for found JobIds + 12: Cancel +Select item: (1-12): \end{verbatim} \normalsize @@ -647,7 +658,7 @@ FileSet: Full Set Client: rufus-fd Storage: File JobId: *None* -When: 2003-04-28 14:53:54 +When: 2005-04-28 14:53:54 OK to run? (yes/mod/no): \end{verbatim} \normalsize @@ -662,22 +673,22 @@ similar to this: \footnotesize \begin{verbatim} -28-Apr-2003 14:56 rufus-dir: Bacula 1.30 (28Apr03): 28-Apr-2003 14:56 +28-Apr-2005 14:56 rufus-dir: Bacula 1.30 (28Apr03): 28-Apr-2003 14:56 JobId: 2 -Job: RestoreFiles.2003-04-28_14.56.06 +Job: RestoreFiles.2005-04-28_14.56.06 Client: rufus-fd -Start time: 28-Apr-2003 14:56 -End time: 28-Apr-2003 14:56 +Start time: 28-Apr-2005 14:56 +End time: 28-Apr-2005 14:56 Files Restored: 1,444 Bytes Restored: 38,816,381 Rate: 9704.1 KB/s FD termination status: OK Termination: Restore OK -28-Apr-2003 14:56 rufus-dir: Begin pruning Jobs. -28-Apr-2003 14:56 rufus-dir: No Jobs found to prune. -28-Apr-2003 14:56 rufus-dir: Begin pruning Files. -28-Apr-2003 14:56 rufus-dir: No Files found to prune. -28-Apr-2003 14:56 rufus-dir: End auto prune. +28-Apr-2005 14:56 rufus-dir: Begin pruning Jobs. +28-Apr-2005 14:56 rufus-dir: No Jobs found to prune. +28-Apr-2005 14:56 rufus-dir: Begin pruning Files. +28-Apr-2005 14:56 rufus-dir: No Files found to prune. +28-Apr-2005 14:56 rufus-dir: End auto prune. \end{verbatim} \normalsize @@ -791,9 +802,9 @@ Client { \normalsize Then make sure that the Address parameter in the Storage resource is set to -the fully qualified domain name and not to something like ``localhost''. The +the fully qualified domain name and not to something like "localhost". The address specified is sent to the File daemon (client) and it must be a fully -qualified domain name. If you pass something like ``localhost'' it will not +qualified domain name. If you pass something like "localhost" it will not resolve correctly and will result in a time out when the File daemon fails to connect to the Storage daemon. @@ -894,7 +905,7 @@ The result is that Bacula will continue the previous Job writing the backup to the new Volume. If you have a Pool of volumes and Bacula is cycling through them, instead of -the above message ``Cannot find any appendable volumes.'', Bacula may ask you +the above message "Cannot find any appendable volumes.", Bacula may ask you to mount a specific volume. In that case, you should attempt to do just that. If you do not have the volume any more (for any of a number of reasons), you can simply mount another volume from the same Pool, providing it is @@ -1023,10 +1034,15 @@ daemons from the install directory as follows: \footnotesize \begin{verbatim} -./bacula start -d20 +./bacula start -d100 \end{verbatim} \normalsize +This can be particularly helpful if your daemons do not start correctly, +because direct daemon output to the console is normally directed to the +NULL device, but with the debug level greater than zero, the output +will be sent to the starting terminal. + To stop the three daemons, enter the following from the install directory: \footnotesize @@ -1116,7 +1132,7 @@ daemon. \item [-d nn] \index[sd]{-d nn } Set the debug level to {\bf nn}. Higher levels of debug cause more -information to displayed on STDOUT concerning what the daemon is doing. +information to be displayed on STDOUT concerning what the daemon is doing. \item [-f] Run the daemon in the foreground. This option is needed to run the daemon @@ -1228,7 +1244,7 @@ modify many of the values in the Pool record. \index[general]{Labeling Your Volumes } \addcontentsline{toc}{subsection}{Labeling Your Volumes} -Bacula requires that each Volume contain a software label. There are several +Bacula requires that each Volume contains a software label. There are several strategies for labeling volumes. The one I use is to label them as they are needed by {\bf Bacula} using the console program. That is when Bacula needs a new Volume, and it does not find one in the catalog, it will send me an email @@ -1246,7 +1262,7 @@ recycling, please see the this manual. If you run a Bacula job, and you have no labeled tapes in the Pool, Bacula -will inform you, and you can create them ``on-the-fly'' so to speak. In my +will inform you, and you can create them "on-the-fly" so to speak. In my case, I label my tapes with the date, for example: {\bf DLT-18April02}. See below for the details of using the {\bf label} command. @@ -1327,11 +1343,12 @@ proper printing. \end{verbatim} \normalsize -Once Bacula has verified that the volume does not already exist, it will then -prompt you for the name of the Pool in which the Volume (tape) to be created. -If there is only one Pool (Default), it will be automatically selected. +Once Bacula has verified that the volume does not already exist, it will +prompt you for the name of the Pool in which the Volume (tape) is to be +created. If there is only one Pool (Default), it will be automatically +selected. -If the tape is successfully labeled, a media record will also be created in +If the tape is successfully labeled, a Volume record will also be created in the Pool. That is the Volume name and all its other attributes will appear when you list the Pool. In addition, that Volume will be available for backup if the MediaType matches what is requested by the Storage daemon. @@ -1346,4 +1363,4 @@ attributes used when creating a Volume). It is also possible to add media to the pool without physically labeling the Volumes. This can be done with the {\bf add} command. For more information, please see the -\ilink{Console Chapter}{_ChapterStart23} of this manual. +\ilink{Console Chapter}{_ConsoleChapter} of this manual. diff --git a/docs/manual-fr/vars.tex b/docs/manual-fr/vars.tex index 22de516d..dc01842b 100644 --- a/docs/manual-fr/vars.tex +++ b/docs/manual-fr/vars.tex @@ -7,6 +7,10 @@ \index[general]{Expansion!Variable } \addcontentsline{toc}{section}{Variable Expansion} +Please note that as of version 1.37, the Variable Expansion +is deprecated and replaced by Python scripting (not yet +documented). + Variable expansion is somewhat similar to Unix shell variable expansion. Currently (version 1.31), it is used only in format labels, but in the future, it will most likely be used in more places. @@ -23,8 +27,8 @@ character class replacement, padding strings, repeated expansion in a user controlled loop, support of arithmetic expressions in the loop start, step and end conditions, and recursive expansion. -When using varaiable expansion characters in a Volume Label Format record, the -format should always be enclosed in double quotes ({\bf ``}). +When using variable expansion characters in a Volume Label Format record, the +format should always be enclosed in double quotes ({\bf "}). For example, {\bf \$\{HOME\}} will be replaced by your home directory as defined in the environment. If you have defined the variable {\bf xxx} to be @@ -54,7 +58,7 @@ the variable name). \item [Internal Variables] \index[dir]{Internal Variables } Internal variables are read-only, and may be related to the current job (i.e. -Job name), or may be special variables such as the date and time. The +Job name), or maybe special variables such as the date and time. The following variables are available: \begin{itemize} @@ -86,7 +90,7 @@ prior to executing Bacula. Environment variables may be either scalar or an array, where the elements of the array are referenced by subscripting the variable name (e.g. {\bf \$\{Months[3]\}}). Environment variable arrays are defined by separating the elements with a vertical bar ({\bf |}), thus {\bf -set Months=''Jan|Feb|Mar|Apr|...``} defines an environment variable named +set Months="Jan|Feb|Mar|Apr|..."} defines an environment variable named {\bf Month} that will be treated as an array, and the reference {\bf \$\{Months[3]\}} will yield {\bf Mar}. The elements of the array can have differing lengths. diff --git a/docs/manual-fr/verify.tex b/docs/manual-fr/verify.tex index 9ae160ad..1c16850f 100644 --- a/docs/manual-fr/verify.tex +++ b/docs/manual-fr/verify.tex @@ -21,7 +21,7 @@ Level = InitCatalog \end{verbatim} \normalsize -The {\bf InitCatalog} level tells {\bf Bacula} simply get the information on +The {\bf InitCatalog} level tells {\bf Bacula} simply to get the information on the specified files and to put it into the catalog. That is your database is initialized and no comparison is done. The {\bf InitCatalog} is normally run one time manually. @@ -39,7 +39,7 @@ the files on the Client to the last {\bf InitCatalog} that is stored in the catalog and to report any differences. See the example below for the format of the output. -You decide what files you want to form your ``snapshot'' by specifying them in +You decide what files you want to form your "snapshot" by specifying them in a {\bf FileSet} resource, and normally, they will be system files that do not change, or that only certain features change. @@ -77,7 +77,7 @@ is cryptographically less secure. The {\bf verify=pins1} is ignored during the {\bf InitCatalog} Job, but is used during the subsequent {\bf Catalog} Jobs to specify what attributes of the files should be compared to those found in the catalog. {\bf pins1} is a -reasonable set to begin with, but you may want to look at the details these +reasonable set to begin with, but you may want to look at the details of these and other options. They can be found in the \ilink{FileSet Resource}{FileSetResource} section of this manual. Briefly, however, the {\bf p} of the {\bf pins1} tells Verify to compare the @@ -194,7 +194,7 @@ OK to run? (yes/mod/no): yes at which point you respond {\bf yes}, and the Job will begin. -There after the Job will automatically start according to the schedule you +Thereafter the Job will automatically start according to the schedule you have defined. If you wish to immediately verify it, you can simply run a Verify {\bf Catalog} which will be the default. No differences should be found. @@ -296,7 +296,7 @@ normal operation of your system, you will get false matches, and you will need to modify the {\bf FileSet} to exclude that file (or not to Include it), and then re-run the {\bf InitCatalog}. -The FileSet that is show below is what I use on my RedHat 7.3 system. With a +The FileSet that is shown below is what I use on my RedHat 7.3 system. With a bit more thought, you can probably add quite a number of additional files that should be monitored. @@ -371,4 +371,3 @@ Catalog { } \end{verbatim} \normalsize - diff --git a/docs/manual-fr/win32.tex b/docs/manual-fr/win32.tex index 69b9cc1e..bd7b6900 100644 --- a/docs/manual-fr/win32.tex +++ b/docs/manual-fr/win32.tex @@ -17,7 +17,7 @@ below, we are referring to the File daemon only. 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, which means that the Windows +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 @@ -29,25 +29,30 @@ 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. -\subsubsection*{Installation} +\subsection*{Win32 Installation} \label{installation} \index[general]{Installation } -\addcontentsline{toc}{subsubsection}{Installation} +\index[general]{Win32!Installation } +\addcontentsline{toc}{subsection}{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 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. +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. 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 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. @@ -63,8 +68,8 @@ Finally, proceed with the installation. \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 -location that you choose later. The components dialog looks like the -following: + location that you choose later. The components dialog looks like the + following: \addcontentsline{lof}{figure}{Win32 Component Selection Dialog} \includegraphics{./win32-pkg.eps} @@ -76,34 +81,41 @@ following: \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. -\ -\item Then the installer will ask if wish to install Bacula as a service. You + 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. + +\item Then the installer will ask if you wish to install Bacula as a service. You should always choose to do so: \addcontentsline{lof}{figure}{Win32 Client Service Selection} \includegraphics{./win32-service.eps} -\ -\item If everything goes well, you will receive the following confirmation: + +\item If everything goes well, you will receive the following confirmation: \addcontentsline{lof}{figure}{Win32 Client Service Confirmation} -\includegraphics{./win32-service-ok.eps} + \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: + It should disappear in a second or two: \addcontentsline{lof}{figure}{Win32 Client Start} \includegraphics{./win32-start.eps} -\ -\item Finally, the finish dialog will appear: +\item Finally, the finish dialog will appear: \addcontentsline{lof}{figure}{Win32 Client Setup Completed} -\includegraphics{./win32-finish.eps} + \includegraphics{./win32-finish.eps} \ \end{itemize} @@ -111,9 +123,8 @@ It should disappear in a second or two: That should complete the installation process. When the Bacula File Server is ready to serve files, an icon \includegraphics{./idle.eps} representing a cassette (or tape) will appear in the system tray -\includegraphics{./tray-icon.eps}; right click on it and a menu will appear. -\ -\ \ \ \ \includegraphics{./menu.eps} +\includegraphics{./tray-icon.eps}; right click on it and a menu will appear.\\ +\includegraphics{./menu.eps}\\ The {\bf Events} item is currently unimplemented, by selecting the {\bf Status} item, you can verify whether any jobs are running or not. @@ -126,34 +137,40 @@ 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. -\subsubsection*{Post Installation} -\index[general]{Post Installation } -\index[general]{Installation!Post } -\addcontentsline{toc}{subsubsection}{Post Installation} +\subsection*{Post Win32 Installation} +\index[general]{Post Win32 Installation } +\index[general]{Win32!Post Installation } +\addcontentsline{toc}{subsection}{Post Win32 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. -\subsubsection*{Uninstalling Bacula} -\index[general]{Bacula!Uninstalling } -\index[general]{Uninstalling Bacula } -\addcontentsline{toc}{subsubsection}{Uninstalling Bacula} +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 +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} Once Bacula has been installed, it can be uninstalled using the standard Windows Add/Remove Programs dialog found on the Control panel. -\subsubsection*{Dealing with Problems} +\subsection*{Dealing with Win32 Problems} \label{problems} -\index[general]{Problems!Dealing with } -\index[general]{Dealing with Problems } -\addcontentsline{toc}{subsubsection}{Dealing with Problems} +\index[general]{Win32!Dealing with Problems } +\index[general]{Dealing with Win32 Problems } +\addcontentsline{toc}{subsection}{Dealing with Win32 Problems} 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 +{\bf c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}bacula-fd.conf} 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 @@ -226,63 +243,61 @@ Finally, due to the above problems, when you turn on debugging, and specify 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. -\label{Compatibility} -\subsubsection*{Windows Compatibility Considerations} +\label{Compatibility} +\subsection*{Windows Compatibility Considerations} \index[general]{Windows Compatibility Considerations } \index[general]{Considerations!Windows Compatibility } -\addcontentsline{toc}{subsubsection}{Windows Compatibility Considerations} - -If any applications are running during the backup and they have open files, -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. +\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. 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 +either need to write it out to an ASCII file using {\bf regedit~~/e} or use a program specifically designed to make a copy or backup the registry. -In Bacula versions 1.30 and earlier, we used the Cygwin emulation of Unix -open(), read(), write(), ... calls to access files. This worked pretty well -for Win95, Win98, and WinMe systems, but not very well for the other systems -(NT/2K/XP) because those systems have special security and ownership -information that was not saved. In addition on the NT/2K/XP systems, older -versions of Bacula were not always able to access all files due to system -permissions restrictions. - -As a consequence, in Bacula version 1.31 and later, we use Windows backup API -calls by default. Typical of Windows, programming these special BackupRead and -BackupWrite calls is a real nightmare of complications. The end result gives -some distinct advantages and some disadvantages. +In Bacula version 1.31 and later, we use Windows backup API calls by +default. Typical of Windows, programming these special BackupRead and +BackupWrite calls is a real nightmare of complications. The end result +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 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. +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. 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 WinNT -using the native API calls (BackupRead/BackupWrite) cannot be restored on -Win95/98/Me or Unix systems. In principle, a file backed up on 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. - -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 -Unix/Win95/98/Me system, we have provided a special {\bf portable} option that -backups the data in a portable fashion by using portable API calls. See the -\ilink{portable option}{portable} on the Include statement in a +non-portable backups. That is files and their data that are backed up on +WinNT using the native API calls (BackupRead/BackupWrite) cannot be +restored on Win95/98/Me or Unix systems. In principle, a file backed up on +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. + +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 +Unix/Win95/98/Me system, we have provided a special {\bf portable} option +that backs up the data in a portable fashion by using portable API calls. +See the \ilink{portable option}{portable} on the Include statement in a FileSet resource in the Director's configuration chapter for the details on -setting this option. However, using the portable option means you may have -permissions problems accessing files, and none of the security and ownership -information will be backed up or restored. The file data can, however, be -restored on any system. +setting this option. However, using the portable option means you may have +permissions problems accessing files, and none of the security and +ownership information will be backed up or restored. The file data can, +however, be restored on any system. You should always be able to restore any file backed up on Unix or Win95/98/Me to any other system. On some systems, such as WinNT/2K/XP, you may have to @@ -307,69 +322,136 @@ Marc Brueckner for doing the tests: \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'' + \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 {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} -\subsubsection*{Windows Firewalls} +\label{VSS} +\subsection*{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). + +Microsoft added VSS to Windows XP and Windows 2003. From the perspective of +a backup-solution for Windows, this is an extremely important step. VSS +allows Bacula to backup open files and even to interact with applications like +RDBMS to produce consistent file copies. VSS aware applications are called +VSS Writers, they register with the OS so that when Bacula wants to do a +Snapshot, the OS will notify the register Writer programs, which may then +create a consistent state in their application, which will be backed up. +Examples for these writers are "MSDE" (Microsoft database +engine), "Event Log Writer", "Registry Writer" plus 3rd +party-writers. If you have a non-vss aware application (e.g. +SQL Anywhere or probably MySQL), a shadow copy is still generated +and the open files can be backed up, but there is no guarantee +that the file is consistent. + +Bacula produces a message from each of the registered writer programs +when it is doing a VSS backup so you know which ones are correctly backed +up. + +Bacula supports VSS on both Windows 2003 and Windows XP. +Technically Bacula creates a shadow copy as soon as the backup process +starts. It does then backup all files from the shadow copy and destroys the +shadow copy after the backup process. Please have in mind, that VSS +creates a snapshot and thus backs up the system at the state it had +when starting the backup. It will disregard file changes which occur during +the backup process. + +VSS can be turned on by placing an + +\index[dir]{Enable VSS} +\index[general]{Enable VSS} +\begin{verbatim} +Enable VSS = yes +\end{verbatim} + +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} +Tibs-fd Version: 1.37.32 (22 July 2005) VSS Windows XP MVS NT 5.1.2600 +\end{verbatim} +the VSS is shown in the line above. This only means that the File daemon +is capable of doing VSS not that VSS is turned on for a particular backup. +There are two ways of telling if VSS is actually turned on during a backup. +The first is to look at the status output for a job, e.g.: +\footnotesize +\begin{verbatim} +Running Jobs: +JobId 1 Job NightlySave.2005-07-23_13.25.45 is running. + VSS Backup Job started: 23-Jul-05 13:25 + Files=70,113 Bytes=3,987,180,650 Bytes/sec=3,244,247 + Files Examined=75,021 + Processing file: c:/Documents and Settings/kern/My Documents/My Pictures/Misc1/Sans titre - 39.pdd + SDReadSeqNo=5 fd=352 +\end{verbatim} +\normalsize +Here, you see under Running Jobs that JobId 1 is "VSS Backup Job started ..." +This means that VSS is enabled for that job. If VSS is not enabled, it will +simply show "Backup Job started ..." without the letters VSS. + +The second way to know that the job was backed up with VSS is to look at the +Job Report, which will look something like the following: +\footnotesize +\begin{verbatim} +23-Jul 13:25 rufus-dir: Start Backup JobId 1, Job=NightlySave.2005-07-23_13.25.45 +23-Jul 13:26 rufus-sd: Wrote label to prelabeled Volume "TestVolume001" on device "DDS-4" (/dev/nst0) +23-Jul 13:26 rufus-sd: Spooling data ... +23-Jul 13:26 Tibs: Generate VSS snapshots. Driver="VSS WinXP", Drive(s)="C" +23-Jul 13:26 Tibs: VSS Writer: "MSDEWriter", State: 1 (VSS_WS_STABLE) +23-Jul 13:26 Tibs: VSS Writer: "Microsoft Writer (Bootable State)", State: 1 (VSS_WS_STABLE) +23-Jul 13:26 Tibs: VSS Writer: "WMI Writer", State: 1 (VSS_WS_STABLE) +23-Jul 13:26 Tibs: VSS Writer: "Microsoft Writer (Service State)", State: 1 (VSS_WS_STABLE) +\end{verbatim} +\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 +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}{subsubsection}{Windows Firewalls} +\addcontentsline{toc}{subsection}{Windows Firewalls} -If you turn on the firewalling feature on Windows (default in WinXP SR2), you +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 -communicated to the other daemons. This can be deactivated through the {\bf +communicate to the other daemons. This can be deactivated through the {\bf Security Notification} dialog, which is apparently somewhere in the {\bf Security Center}. I don't have this on my computer, so I cannot give the exact details. @@ -385,10 +467,10 @@ netsh firewall set opmode disable is purported to disable the firewall, but this command is not accepted on my WinXP Home machine. -\subsubsection*{Windows Port Usage} +\subsection*{Windows Port Usage} \index[general]{Windows Port Usage } \index[general]{Usage!Windows Port } -\addcontentsline{toc}{subsubsection}{Windows Port Usage} +\addcontentsline{toc}{subsection}{Windows Port Usage} 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: @@ -399,10 +481,10 @@ listening, you can enter the following command in a shell window: \end{verbatim} \normalsize -\subsubsection*{Windows Disaster Recovery} +\subsection*{Windows Disaster Recovery} \index[general]{Recovery!Windows Disaster } \index[general]{Windows Disaster Recovery } -\addcontentsline{toc}{subsubsection}{Windows Disaster Recovery} +\addcontentsline{toc}{subsection}{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 @@ -426,10 +508,19 @@ 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/}. -\subsubsection*{Windows Ownership and Permissions Problems} +\subsection*{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. + + +\subsection*{Windows Ownership and Permissions Problems} \index[general]{Problems!Windows Ownership and Permissions } \index[general]{Windows Ownership and Permissions Problems } -\addcontentsline{toc}{subsubsection}{Windows Ownership and Permissions +\addcontentsline{toc}{subsection}{Windows Ownership and Permissions Problems} If you restore files backed up from WinNT/XP/2K to an alternate directory, @@ -444,16 +535,27 @@ 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/}. -\subsubsection*{Manually resetting the Permissions} +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, +then it is very unlikely that it will have sufficient permission to +access all your files. + +Some users have experienced problems restoring files that participate in +the Active Directory. They also report that changing the userid under which +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}{subsubsection}{Manually resetting the Permissions} +\addcontentsline{toc}{subsection}{Manually resetting the Permissions} 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 they should apply to most Win32 platforms. The procedure outlines how to deal with a problem which arises when a restore creates a top-level new directory. -In this example, ``top-level'' means something like {\bf +In this example, "top-level" means something like {\bf c:\textbackslash{}src}, not {\bf c:\textbackslash{}tmp\textbackslash{}src} where {\bf c:\textbackslash{}tmp} already exists. If a restore job specifies / as the {\bf Where:} value, this problem will arise. @@ -485,12 +587,12 @@ You should see something like this: {\bf SYSTEM} in this example as shown below). \includegraphics{./properties-security-advanced-owner.eps} -\item ensure the ``Replace owner on subcontainers and objects'' box is +\item ensure the "Replace owner on subcontainers and objects" box is checked \item click on OK -\item When the message ``You do not have permission to read the contents of - directory ''c:\textbackslash{}src\textbackslash{}basis. Do you wish to replace - the directory permissions with permissions granting you Full Control?``, click +\item When the message "You do not have permission to read the contents of + directory c:\textbackslash{}src\textbackslash{}basis. Do you wish to replace + the directory permissions with permissions granting you Full Control?", click on Yes. \includegraphics{./confirm.eps} @@ -500,10 +602,13 @@ on Yes. With the above procedure, you should now have full control over your restored directory. -\subsubsection*{Backing Up the WinNT/XP/2K System State} +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}{subsubsection}{Backing Up the WinNT/XP/2K System State} +\addcontentsline{toc}{subsection}{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 @@ -532,10 +637,10 @@ 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. -\subsubsection*{Windows Considerations for Filename Specifications} +\subsection*{Windows Considerations for Filename Specifications} \index[general]{Specifications!Windows Considerations for Filename } \index[general]{Windows Considerations for Filename Specifications } -\addcontentsline{toc}{subsubsection}{Windows Considerations for Filename +\addcontentsline{toc}{subsection}{Windows Considerations for Filename Specifications} Please see the @@ -543,13 +648,24 @@ Please see the for important considerations on how to specify Windows paths in Bacula FileSet Include and Exclude directives. -\subsubsection*{Command Line Options Specific to the Bacula Windows File +\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 +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. + +\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}{subsubsection}{Command Line Options Specific to the +\addcontentsline{toc}{subsection}{Command Line Options Specific to the Bacula Windows File Daemon (Client)} These options are not normally seen or used by the user, and are documented @@ -561,7 +677,7 @@ In order to avoid option clashes between the options necessary for {\bf Bacula} to run on Windows and the standard Bacula options, all Windows specific options are signaled with a forward slash character (/), while as usual, the standard Bacula options are signaled with a minus (-), or a minus -minus (\verb{--{). All the standard Bacula options can be used on the Windows +minus (\verb:--:). All the standard Bacula options can be used on the Windows version. In addition, the following Windows only options are implemented: \begin{description} @@ -612,14 +728,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. -\subsubsection*{Shutting down Windows Systems} +\subsection*{Shutting down Windows Systems} \index[general]{Shutting down Windows Systems } \index[general]{Systems!Shutting down Windows } -\addcontentsline{toc}{subsubsection}{Shutting down Windows Systems} +\addcontentsline{toc}{subsection}{Shutting down Windows Systems} 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{Sysinternals project}{http://www.sysinternals.com/ntw2k/freeware/psshutdown.shtml}. diff --git a/docs/manual/consoleconf.tex b/docs/manual/consoleconf.tex index d2f44e6a..22f4864d 100644 --- a/docs/manual/consoleconf.tex +++ b/docs/manual/consoleconf.tex @@ -3,12 +3,12 @@ \section*{Console Configuration} \label{_ChapterStart36} -\index[general]{Configuration!Console } -\index[general]{Console Configuration } +\index[general]{Configuration!Console} +\index[general]{Console Configuration} \addcontentsline{toc}{section}{Console Configuration} \subsection*{General} -\index[general]{General } +\index[general]{General} \addcontentsline{toc}{subsection}{General} The Console configuration file is the simplest of all the configuration files, @@ -32,8 +32,8 @@ Console program will ask you which one you want to use. \subsection*{The Director Resource} \label{DirectorResource3} -\index[general]{Director Resource } -\index[general]{Resource!Director } +\index[general]{Director Resource} +\index[general]{Resource!Director} \addcontentsline{toc}{subsection}{Director Resource} The Director resource defines the attributes of the Director running on the @@ -44,16 +44,16 @@ choose one when you start the {\bf Console} program. \begin{description} \item [Director] - \index[console]{Director } + \index[console]{Director} Start of the Director records. \item [Name = \lt{}name\gt{}] - \index[console]{Name } + \index[console]{Name} The director name used to select among different Directors, otherwise, this name is not used. \item [DIRPort = \lt{}port-number\gt{}] - \index[dir]{DIRPort } + \index[dir]{DIRPort} Specify the port to use to connect to the Director. This value will most likely already be set to the value you specified on the {\bf \verb:--:with-base-port} option of the {\bf ./configure} command. This port must be @@ -63,12 +63,12 @@ the default is 9101 so this record is not normally specified. \item [Address = \lt{}address\gt{}] - \index[dir]{Address } + \index[dir]{Address} Where the address is a host name, a fully qualified domain name, or a network address used to connect to the Director. \item [Password = \lt{}password\gt{}] - \index[dir]{Password } + \index[dir]{Password} Where the password is the password needed for the Director to accept the Console connection. This password must be identical to the {\bf Password} specified in the {\bf Director} resource of the @@ -89,8 +89,8 @@ Director { \normalsize \subsection*{The ConsoleFont Resource} -\index[general]{Resource!ConsoleFont } -\index[general]{ConsoleFont Resource } +\index[general]{Resource!ConsoleFont} +\index[general]{ConsoleFont Resource} \addcontentsline{toc}{subsection}{ConsoleFont Resource} The ConsoleFont resource is available only in the GNOME version of the @@ -100,21 +100,21 @@ the main listing window. \begin{description} \item [ConsoleFont] - \index[console]{ConsoleFont } + \index[console]{ConsoleFont} Start of the ConsoleFont records. \item [Name = \lt{}name\gt{}] - \index[console]{Name } + \index[console]{Name} The name of the font. -\item [Font = \lt{}X-Window Font Specification\gt{}] - \index[console]{Font } +\item [Font = \lt{}Pango Font Name\gt{}] + \index[console]{Font} The string value given here defines the desired font. It is specified in the -standard cryptic X Window format. For example, the default specification is: +Pango format. For example, the default specification is: \footnotesize \begin{verbatim} -Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1" +Font = "LucidaTypewriter 9" \end{verbatim} \normalsize @@ -122,21 +122,21 @@ Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1" Thanks to Phil Stracchino for providing the code for this feature. -An actual example might be: +An different example might be: \footnotesize \begin{verbatim} ConsoleFont { Name = Default -Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1" +Font = "Monospace 10" } \end{verbatim} \normalsize \subsection*{The Console Resource} \label{ConsoleResource} -\index[general]{Console Resource } -\index[general]{Resource!Console } +\index[general]{Console Resource} +\index[general]{Resource!Console} \addcontentsline{toc}{subsection}{Console Resource} As of Bacula version 1.33 and higher, there are three different kinds of @@ -190,12 +190,12 @@ perhaps the wx-console.conf file): DIRport = 9101 Address = myserver Password = "XXXXXXXXXXX" # no, really. this is not obfuscation. - } +} Console { Name = restricted-user Password = "UntrustedUser" - } +} \end{verbatim} \normalsize @@ -231,8 +231,8 @@ run} command. In other words, this user is rather limited in what he can see and do with Bacula. \subsection*{Console Commands} -\index[general]{Console Commands } -\index[general]{Commands!Console } +\index[general]{Console Commands} +\index[general]{Commands!Console} \addcontentsline{toc}{subsection}{Console Commands} For more details on running the console and its commands, please see the @@ -240,8 +240,8 @@ For more details on running the console and its commands, please see the \subsection*{Sample Console Configuration File} \label{SampleConfiguration2} -\index[general]{File!Sample Console Configuration } -\index[general]{Sample Console Configuration File } +\index[general]{File!Sample Console Configuration} +\index[general]{Sample Console Configuration File} \addcontentsline{toc}{subsection}{Sample Console Configuration File} An example Console configuration file might be the following: diff --git a/docs/manual/dirdconf.tex b/docs/manual/dirdconf.tex index b9920a4c..e3007140 100644 --- a/docs/manual/dirdconf.tex +++ b/docs/manual/dirdconf.tex @@ -1917,12 +1917,6 @@ The Pool Resource defined in the Director's configuration file The name of the pool. For most applications, you will use the default pool name {\bf Default}. This directive is required. -\item [Number of Volumes = \lt{}number\gt{}] - \index[dir]{Number of Volumes } - This directive specifies the number of volumes (tapes or files) - contained in the pool. Normally, it is defined and updated - automatically by the Bacula catalog handling routines. - \label{MaxVolumes} \item [Maximum Volumes = \lt{}number\gt{}] \index[dir]{Maximum Volumes } @@ -2157,7 +2151,7 @@ must use the {\bf update} command in the Console. However, if you use this directive and have only one Volume in the Pool, you will immediately recycle your Volume if you fill it and Bacula needs another one. Thus your backup will be totally invalid. - Please use this directive with care. The default is {\no}. + Please use this directive with care. The default is {\bf no}. \label{RecycleCurrent} @@ -2179,7 +2173,7 @@ must use the {\bf update} command in the Console. However, if you use this directive and have only one Volume in the Pool, you will immediately recycle your Volume if you fill it and Bacula needs another one. Thus your backup will be totally invalid. Please use this - directive with care. The default is {\no}. + directive with care. The default is {\bf no}. \label{PurgeOldest} @@ -2209,7 +2203,7 @@ must use the {\bf update} command in the Console. We {\bf highly} recommend against using this directive, because it is sure that some day, Bacula will recycle a Volume that contains current - data. The default is {\no}. + data. The default is {\bf no}. \item [Cleaning Prefix = \lt{}string\gt{}] \index[dir]{Cleaning Prefix } diff --git a/docs/manual/postgresql.tex b/docs/manual/postgresql.tex index c5768c5d..e8df71a7 100644 --- a/docs/manual/postgresql.tex +++ b/docs/manual/postgresql.tex @@ -86,7 +86,7 @@ user). 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 postgre}. + {\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 {\bf bacula}, you can do the following: @@ -94,10 +94,10 @@ user). \begin{verbatim} su (enter root password) - password pgsql (or postgre) + password pgsql (or postgres) (enter a password for this account) exit - su pgsql (or postgre) + 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 @@ -151,6 +151,73 @@ This solved the problem for me, but it is not always a good thing 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 +just prior the the existing ``local'' and ``host'' lines, add the line: + +\footnotesize +\begin{verbatim} + local bacula bacula md5 +\end{verbatim} +\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. + +Next, become the Postgres administrator, postgres, either by logging +on as the postgres user, or by using su to become root and then using +su - postgres to become postgres. Add a password to the bacula +database for the bacula user using: + +\footnotesize +\begin{verbatim} + \$ psql bacula + bacula=# alter user bacula with password 'secret'; + ALTER USER + bacula=# \\q +\end{verbatim} +\normalsize + +Next, 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: + +\footnotesize +\begin{verbatim} + dbname = bacula; user = bacula; password = "secret" + ... and ... + RunBeforeJob = "/etc/make_catalog_backup bacula bacula secret" +\end{verbatim} +\normalsize + +Naturally, you should choose your own significantly more random +password, and ensure that the bacula-dir.conf file containing this +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 +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 +this mechanism, create a file named .pgpass containing the single +line: + +\footnotesize +\begin{verbatim} + localhost:5432:bacula:bacula:secret +\end{verbatim} +\normalsize + +This file should be copied into the home directory of all accounts +that will need to gain access to the database: typically, root, +bacula, and any users who will make use of any of the console +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} \index[general]{Database!Re-initializing the Catalog } diff --git a/docs/manual/tapetesting.tex b/docs/manual/tapetesting.tex index b2ee2e83..875ace8f 100644 --- a/docs/manual/tapetesting.tex +++ b/docs/manual/tapetesting.tex @@ -1078,7 +1078,7 @@ number of sequential reads as it had written. \index[general]{Modes!Details} \index[general]{Details of Tape Modes} \addcontentsline{toc}{subsection}{Details of Tape Modes} -Rudolf Cejkar has provided the following information concerning +Rudolf Cejka has provided the following information concerning certain tape modes and MTEOM. \begin{description} diff --git a/docs/manual/tls.tex b/docs/manual/tls.tex index 237a165f..4174aa3b 100644 --- a/docs/manual/tls.tex +++ b/docs/manual/tls.tex @@ -123,6 +123,10 @@ valid for 10 years can be made with the following: The above script will ask you a number of questions. You may simply answer each of them by entering a return, or if you wish you may enter your own data. +An alternative is to generate your self-signed certificates with TinyCA, +which has a very nice Graphical User Interface. TinyCA can be found at +\elink{http://tinyca.sm-zone.net/}{http://tinyca.sm-zone.net/}. + \subsection*{Getting a CA Signed Certificate} \index[general]{Certificate!Getting a CA Signed } @@ -242,4 +246,3 @@ files, which should help you setting up your own. \normalsize -