From 3b27e059453b4872b49fa0acfee234e76d2647bc Mon Sep 17 00:00:00 2001 From: Philippe Chauvat Date: Fri, 12 Oct 2012 13:57:54 +0200 Subject: [PATCH] all manuals pdf and dvi. No web at this point --- docs/manuals/en/console/Makefile.in | 1 + docs/manuals/en/developers/Makefile.in | 1 + docs/manuals/en/main/Makefile.in | 3 +- docs/manuals/en/misc/Makefile.in | 1 + docs/manuals/en/misc/misc.tex | 2 +- docs/manuals/en/problems/Makefile.in | 2 +- docs/manuals/en/problems/problems.tex | 2 +- docs/manuals/en/utility/Makefile.in | 79 ++- docs/manuals/en/utility/bimagemgr-chapter.tex | 78 ++- docs/manuals/en/utility/progs.tex | 545 ++++++++---------- docs/manuals/en/utility/rpm-faq.tex | 216 +++---- docs/manuals/en/utility/utility.tex | 81 ++- docs/manuals/licences/coverpage.tex | 4 +- 13 files changed, 475 insertions(+), 540 deletions(-) diff --git a/docs/manuals/en/console/Makefile.in b/docs/manuals/en/console/Makefile.in index 2ef462e7..414271e9 100644 --- a/docs/manuals/en/console/Makefile.in +++ b/docs/manuals/en/console/Makefile.in @@ -174,6 +174,7 @@ mini-clean: clean: + @find . -type f -name ${DOC}.mtc* -exec rm {} \; @find . -type l -name "*.tex" -exec rm {} \; @rm -f 1 2 3 *.tex~ @rm -f *.png *.gif *.jpg *.eps diff --git a/docs/manuals/en/developers/Makefile.in b/docs/manuals/en/developers/Makefile.in index 375f8bf9..c629fb56 100644 --- a/docs/manuals/en/developers/Makefile.in +++ b/docs/manuals/en/developers/Makefile.in @@ -178,6 +178,7 @@ mini-clean: @rm -f ${DOC}/WARNINGS clean: + @find . -type f -name ${DOC}.mtc* -exec rm {} \; @find . -type l -name "*.tex" -exec rm {} \; @rm -f 1 2 3 @rm -f *.png *.gif *.jpg *.eps diff --git a/docs/manuals/en/main/Makefile.in b/docs/manuals/en/main/Makefile.in index e79656b1..b6e6c0fd 100644 --- a/docs/manuals/en/main/Makefile.in +++ b/docs/manuals/en/main/Makefile.in @@ -161,7 +161,6 @@ main_configs: pic2graph -density 100 main_configs.png mini-clean: - @rm ${DOC}.mtc* @rm -f 1 2 3 *.tex~ @rm -f *.gif *.jpg *.eps @rm -f *.aux *.cp *.fn *.ky *.log *.pg @@ -177,7 +176,7 @@ mini-clean: clean: - @rm ${DOC}.mtc* + @find . -type f -name ${DOC}.mtc* -exec rm {} \; @find . -type l -name "*.tex" -exec rm {} \; @rm -f 1 2 3 *.tex~ @rm -f *.png *.gif *.jpg *.eps diff --git a/docs/manuals/en/misc/Makefile.in b/docs/manuals/en/misc/Makefile.in index cdb5167a..262a4012 100644 --- a/docs/manuals/en/misc/Makefile.in +++ b/docs/manuals/en/misc/Makefile.in @@ -171,6 +171,7 @@ mini-clean: clean: + @find . -type f -name ${DOC}.mtc* -exec rm {} \; @find . -type l -name "*.tex" -exec rm {} \; @rm -f 1 2 3 *.tex~ @rm -f *.png *.gif *.jpg *.eps diff --git a/docs/manuals/en/misc/misc.tex b/docs/manuals/en/misc/misc.tex index 3d3b02b7..27e61d4e 100644 --- a/docs/manuals/en/misc/misc.tex +++ b/docs/manuals/en/misc/misc.tex @@ -43,7 +43,7 @@ \newindex{general}{idx}{ind}{General Index} \sloppy -\def\bsystitle{Bacula Miscellaneous Guide} +\def\bsystitle{Miscellaneous Guide} \begin{document} \sloppy diff --git a/docs/manuals/en/problems/Makefile.in b/docs/manuals/en/problems/Makefile.in index bfd60bc8..b16e30dd 100644 --- a/docs/manuals/en/problems/Makefile.in +++ b/docs/manuals/en/problems/Makefile.in @@ -157,7 +157,6 @@ main_configs: pic2graph -density 100 main_configs.png mini-clean: - @find . -type l -name "*.tex" -exec rm {} \; @rm -f 1 2 3 *.tex~ @rm -f *.gif *.jpg *.eps @rm -f *.aux *.cp *.fn *.ky *.log *.pg @@ -174,6 +173,7 @@ mini-clean: clean: + @find . -type f -name ${DOC}.mtc* -exec rm {} \; @find . -type l -name "*.tex" -exec rm {} \; @rm -f 1 2 3 *.tex~ @rm -f *.png *.gif *.jpg *.eps diff --git a/docs/manuals/en/problems/problems.tex b/docs/manuals/en/problems/problems.tex index a73416a0..0f2852a5 100644 --- a/docs/manuals/en/problems/problems.tex +++ b/docs/manuals/en/problems/problems.tex @@ -51,7 +51,7 @@ \frontmatter \tableofcontents -\listoftables +%\listoftables \listoffigures \mainmatter diff --git a/docs/manuals/en/utility/Makefile.in b/docs/manuals/en/utility/Makefile.in index afca4830..e27acf0f 100644 --- a/docs/manuals/en/utility/Makefile.in +++ b/docs/manuals/en/utility/Makefile.in @@ -33,40 +33,91 @@ # # # $ % & ~ _ ^ \ { } # - IMAGES=../../../images +MANUALSDIR=../.. DOC=utility MAINDOC=Bacula_Utility_Programs.html +BSYSMANUALDIR=../../../bsysmanual +COVERSDIR=../../../covers +PDFCOVERSDIR=$(COVERSDIR)/pdf +SVGCOVERSDIR=$(COVERSDIR)/svg +EPSCOVERSDIR=$(COVERSDIR)/eps +LICENSESDIR=$(MANUALSDIR)/licences +COVERNAME=coverpage-utility +BSYSMANNAME=bsysmanual-coverpagebackground +LICENCES=$(wildcard $(LICENSESDIR)/*.tex) +BSYSCOMPILERFILE=bsys-compiler-mode.tex +PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex +TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex +WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex + first_rule: all -all: tex web dvipdf mini-clean +all: tex pdflatex mini-clean + .SUFFIXES: .tex .html .PHONY: .DONTCARE: -tex: + +pdfcovers: + @echo -n "Linking coverpage and background PDF format..." + @(cd $(SVGCOVERSDIR) ; make pdf) + @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf + @echo "Done." + +pdfimages: + @echo "Generating PDF images..." + @(cd ${IMAGES}/svg ; make pdf) + @echo "Done." + +pngimages: + @echo "Generating PNG images..." + @(cd ${IMAGES}/svg ; make png) + @echo "Done." + +epsimages: + @echo "Generating EPS images..." + @(cd ${IMAGES}/svg ; make eps) + @rm -rf ${IMAGES}/png + @rm -rf ${IMAGES}/pdf + @echo "Done." + +epscovers: + @echo -n "Linking coverpage and background EPS format..." + @(cd $(SVGCOVERSDIR) ; make eps) + @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps + @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf + @echo "Done." + +commonfiles: @../../update_version - @echo "Making version `cat version.tex`" - @cp -fp ${IMAGES}/hires/*.eps . + @echo -n "Making version `cat version.tex`" + @echo -n "Linking shared files..." + @(for L in $(LICENCES); do ln -sf $$L .; done) + @echo "Done" + +tex: epscovers epsimages commonfiles + @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE) @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \ ${DOC}i-console.tex ${DOC}i-general.tex latex -interaction=batchmode ${DOC}.tex makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null latex -interaction=batchmode ${DOC}.tex -pdf: - @echo "Making pdfm" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdfm -p a4 ${DOC}.dvi -dvipdf: - @echo "Making dvi to pdf" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdf ${DOC}.dvi ${DOC}.pdf +pdflatex: pdfcovers pdfimages commonfiles + @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE) + @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \ + ${DOC}i-console.tex ${DOC}i-general.tex + pdflatex -interaction=batchmode ${DOC}.tex + makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null + pdflatex -interaction=batchmode ${DOC}.tex + pdflatex -interaction=batchmode ${DOC}.tex html: @echo " " @@ -127,6 +178,8 @@ mini-clean: clean: + @find . -type f -name ${DOC}.mtc* -exec rm {} \; + @find . -type l -name "*.tex" -exec rm {} \; @rm -f 1 2 3 *.tex~ @rm -f *.png *.gif *.jpg *.eps @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg diff --git a/docs/manuals/en/utility/bimagemgr-chapter.tex b/docs/manuals/en/utility/bimagemgr-chapter.tex index 7ae67a7e..63e36b7e 100644 --- a/docs/manuals/en/utility/bimagemgr-chapter.tex +++ b/docs/manuals/en/utility/bimagemgr-chapter.tex @@ -1,11 +1,3 @@ -%% -%% -%% The following characters must be preceded by a backslash -%% to be entered as printable characters: -%% -%% # $ % & ~ _ ^ \ { } -%% - \section{bimagemgr} \label{bimagemgr} \index[general]{Bimagemgr } @@ -13,17 +5,17 @@ {\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 and is used to monitor when a volume file needs to be burned to -disk. It requires: +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 DBD-SQLite or DBD-PostgreSQL modules - \end{itemize} +\begin{bsysitemize} +\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 DBD-SQLite or DBD-PostgreSQL modules + \end{bsysitemize} DVD burning is not supported by {\bf bimagemgr} at this -time, but both are planned for future releases. +time, but both are planned for future releases. \subsection{bimagemgr installation} \index[general]{bimagemgr!Installation } @@ -37,7 +29,7 @@ Installation from tarball: 4. Edit httpd.conf and change the Timeout value. The web server must not time out and close the connection before the burn process is finished. The exact value needed may vary depending upon your cd recorder speed and whether you are -burning on the bacula server on on another machine across your network. In my +burning on the bacula server on on another machine across your network. In my case I set it to 1000 seconds. Restart httpd. 5. Make sure that cdrecord is setuid root. % TODO: I am pretty sure cdrecord can be used without setuid root @@ -50,7 +42,7 @@ Installation from rpm package: 3. Edit httpd.conf and change the Timeout value. The web server must not time out and close the connection before the burn process is finished. The exact value needed may vary depending upon your cd recorder speed and whether you are -burning on the bacula server on on another machine across your network. In my +burning on the bacula server on on another machine across your network. In my case I set it to 1000 seconds. Restart httpd. 4. Make sure that cdrecord is setuid root. @@ -61,21 +53,21 @@ For bacula systems less than 1.36: server (as root) to add the CDImage table to your bacula database. Accessing the Volume files: -The Volume files by default have permissions 640 and can only be read by root. -The recommended approach to this is as follows (and only works if bimagemgr and +The Volume files by default have permissions 640 and can only be read by root. +The recommended approach to this is as follows (and only works if bimagemgr and apache are running on the same host as bacula. For bacula-1.34 or 1.36 installed from tarball - % TODO: use itemized list for this? -1. Create a new user group bacula and add the user apache to the group for -Red Hat or Mandrake systems. For SuSE systems add the user wwwrun to the +1. Create a new user group bacula and add the user apache to the group for +Red Hat or Mandrake systems. For SuSE systems add the user wwwrun to the bacula group. 2. Change ownership of all of your Volume files to root.bacula -3. Edit the /etc/bacula/bacula startup script and set SD\_USER=root and +3. Edit the /etc/bacula/bacula startup script and set SD\_USER=root and SD\_GROUP=bacula. Restart bacula. Note: step 3 should also be done in /etc/init.d/bacula-sd but released versions -of this file prior to 1.36 do not support it. In that case it would be necessary after +of this file prior to 1.36 do not support it. In that case it would be necessary after a reboot of the server to execute '/etc/bacula/bacula restart'. For bacula-1.38 installed from tarball - @@ -88,27 +80,27 @@ For bacula-1.38 installed from tarball - --with-sd-group=disk --with-fd-user=root --with-fd-group=bacula -2. Add the user apache to the bacula group for Red Hat or Mandrake systems. +2. Add the user apache to the bacula group for Red Hat or Mandrake systems. For SuSE systems add the user wwwrun to the bacula group. 3. Check/change ownership of all of your Volume files to root.bacula For bacula-1.36 or bacula-1.38 installed from rpm - % TODO: use itemized list for this? -1. Add the user apache to the group bacula for Red Hat or Mandrake systems. +1. Add the user apache to the group bacula for Red Hat or Mandrake systems. For SuSE systems add the user wwwrun to the bacula group. 2. Check/change ownership of all of your Volume files to root.bacula -bimagemgr installed from rpm > 1.38.9 will add the web server user to the -bacula group in a post install script. Be sure to edit the configuration +bimagemgr installed from rpm > 1.38.9 will add the web server user to the +bacula group in a post install script. Be sure to edit the configuration information in config.pm after installation of rpm package. -bimagemgr will now be able to read the Volume files but they are still not +bimagemgr will now be able to read the Volume files but they are still not world readable. If you are running bimagemgr on another host (not recommended) then you will -need to change the permissions on all of your backup volume files to 644 in -order to access them via nfs share or other means. This approach should only -be taken if you are sure of the security of your environment as it exposes +need to change the permissions on all of your backup volume files to 644 in +order to access them via nfs share or other means. This approach should only +be taken if you are sure of the security of your environment as it exposes the backup Volume files to world read. \subsection{bimagemgr usage} @@ -121,18 +113,19 @@ 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 rightmost column. +button will be displayed in the rightmost column. -\addcontentsline{lof}{figure}{Bacula CD Image Manager} -\includegraphics{\idir bimagemgr1.eps} \\Figure 1 +%\addcontentsline{lof}{figure}{Bacula CD Image Manager} +\bsysimageH{bimagemgr1}{Bacula CD Image Manager}{}%\includegraphics{\idir bimagemgr1.eps} \\Figure 1 % TODO: use tex to say figure number Place a blank CDR disk in your recorder and click the "Burn" button. This will -cause a pop up window as shown in Figure 2 to display the burn progress. +cause a pop up window as shown in Figure 2 to display the burn progress. % TODO: use tex to say figure number -\addcontentsline{lof}{figure}{Bacula CD Image Burn Progress Window} -\includegraphics{\idir bimagemgr2.eps} \\Figure 2 +%\addcontentsline{lof}{figure}{Bacula CD Image Burn Progress Window} +%\includegraphics{\idir bimagemgr2.eps} \\Figure 2 +\bsysimageH{bimagemgr2}{Bacula CD Image Burn Progress Window}{} % TODO: use tex to say figure number When the burn finishes the pop up window will display the results of cdrecord @@ -140,10 +133,11 @@ 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 its "Reset" link. +that volume by clicking its "Reset" link. -\addcontentsline{lof}{figure}{Bacula CD Image Burn Results} -\includegraphics{\idir bimagemgr3.eps} \\Figure 3 +%\addcontentsline{lof}{figure}{Bacula CD Image Burn Results} +%\includegraphics{\idir bimagemgr3.eps} \\Figure 3 +\bsysimageH{bimagemgr3}{Bacula CD Image Burn Results}{} % TODO: use tex to say figure number In the bottom row of the main display window are two more buttons labeled @@ -152,4 +146,4 @@ 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} ensures that you can rebuild easily in the event of some disaster -on the bacula server itself. +on the bacula server itself. diff --git a/docs/manuals/en/utility/progs.tex b/docs/manuals/en/utility/progs.tex index 88ed2b00..40e3230b 100644 --- a/docs/manuals/en/utility/progs.tex +++ b/docs/manuals/en/utility/progs.tex @@ -1,13 +1,10 @@ -%% -%% - \chapter{Volume Utility Tools} \label{_UtilityChapter} \index[general]{Volume Utility Tools} \index[general]{Tools!Volume Utility} This document describes the utility programs written to aid Bacula users and -developers in dealing with Volumes external to Bacula. +developers in dealing with Volumes external to Bacula. \section{Specifying the Configuration File} \index[general]{Specifying the Configuration File} @@ -18,7 +15,7 @@ configuration file that these programs need is the {\bf Device} resource definitions). This permits the programs to find the configuration parameters 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. +configuration file using the {\bf -c} option. \section{Specifying a Device Name For a Tape} @@ -29,7 +26,7 @@ Each of these programs require a {\bf device-name} where the Volume can be found. In the case of a tape, this is the physical device name such as {\bf /dev/nst0} or {\bf /dev/rmt/0ubn} depending on your system. For the program to work, it must find the identical name in the Device resource of the -configuration file. See below for specifying Volume names. +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 @@ -59,53 +56,43 @@ In general, you must specify the Volume name to each of the programs below the bootstrap file, you will then specify the Volume name or Volume names if more than one volume is needed. For example, suppose you want to read tapes {\bf tape1} and {\bf tape2}. First construct a {\bf bootstrap} file named say, -{\bf list.bsr} which contains: +{\bf list.bsr} which contains: -\footnotesize -\begin{verbatim} +\begin{lstlisting} Volume=test1|test2 -\end{verbatim} -\normalsize +\end{lstlisting} -where each Volume is separated by a vertical bar. Then simply use: +where each Volume is separated by a vertical bar. Then simply use: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bls -b list.bsr /dev/nst0 -\end{verbatim} -\normalsize +\end{lstlisting} In the case of Bacula Volumes that are on files, you may simply append volumes -as follows: +as follows: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bls /tmp/test1\|test2 -\end{verbatim} -\normalsize +\end{lstlisting} where the backslash (\textbackslash{}) was necessary as a shell escape to -permit entering the vertical bar (|). +permit entering the vertical bar (|). And finally, if you feel that specifying a Volume name is a bit complicated with a bootstrap file, you can use the {\bf -V} option (on all programs except {\bf bcopy}) to specify one or more Volume names separated by the vertical bar -(|). For example, +(|). For example, -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bls -V Vol001 /dev/nst0 -\end{verbatim} -\normalsize +\end{lstlisting} You may also specify an asterisk (*) to indicate that the program should -accept any volume. For example: +accept any volume. For example: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bls -V* /dev/nst0 -\end{verbatim} -\normalsize +\end{lstlisting} \section{bls} \label{bls} @@ -113,10 +100,9 @@ accept any volume. For example: \index[general]{program!bls} {\bf bls} can be used to do an {\bf ls} type listing of a {\bf Bacula} tape or -file. It is called: +file. It is called: -\footnotesize -\begin{verbatim} +\begin{lstlisting} Usage: bls [options] -b specify a bootstrap file -c specify a config file @@ -131,39 +117,33 @@ Usage: bls [options] -v be verbose -V specify Volume names (separated by |) -? print this message -\end{verbatim} -\normalsize +\end{lstlisting} -For example, to list the contents of a tape: +For example, to list the contents of a tape: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bls -V Volume-name /dev/nst0 -\end{verbatim} -\normalsize +\end{lstlisting} -Or to list the contents of a file: +Or to list the contents of a file: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bls /tmp/Volume-name or ./bls -V Volume-name /tmp -\end{verbatim} -\normalsize +\end{lstlisting} Note that, in the case of a file, the Volume name becomes the filename, so in the above example, you will replace the {\bf Volume-name} with the name of the volume -(file) you wrote. +(file) you wrote. Normally if no options are specified, {\bf bls} will produce the equivalent output to the {\bf ls -l} command for each file on the tape. Using other options listed above, it is possible to display only the Job records, only the -tape blocks, etc. For example: +tape blocks, etc. For example: + +\begin{lstlisting} -\footnotesize -\begin{verbatim} - ./bls /tmp/File002 bls: butil.c:148 Using device: /tmp drwxrwxr-x 3 k k 4096 02-10-19 21:08 /home/kern/bacula/k/src/dird/ @@ -181,8 +161,7 @@ drwxrwxr-x 2 k k 4096 02-10-10 18:59 /home/kern/bacula/k/src/dird/CVS/ -rw-rw-r-- 1 k k 83 02-08-31 19:19 /home/kern/bacula/k/src/dird/.cvsignore bls: Got EOF on device /tmp 84 files found. -\end{verbatim} -\normalsize +\end{lstlisting} \subsection{Listing Jobs} \index[general]{Listing Jobs with bls} @@ -190,10 +169,9 @@ bls: Got EOF on device /tmp 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 -don't have multiple clients. For example, +don't have multiple clients. For example, -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./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). @@ -212,13 +190,12 @@ End Job Session Record: File:blk=0:109 SessId=4 SessTime=1121074625 JobId=1 Leve 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 +\end{lstlisting} -shows a full save followed by two incremental saves. +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: +available for each record: \subsection{Listing Blocks} \index[general]{Listing Blocks with bls} @@ -226,10 +203,9 @@ available for each record: 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 -do so with: +do so with: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bls -k /tmp/File002 bls: butil.c:148 Using device: /tmp Block: 1 size=64512 @@ -239,14 +215,12 @@ Block: 65 size=64512 Block: 66 size=19195 bls: Got EOF on device /tmp End of File on device -\end{verbatim} -\normalsize +\end{lstlisting} By adding the {\bf -v} option, you can get more information, which can be -useful in knowing what sessions were written to the volume: +useful in knowing what sessions were written to the volume: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bls -k -v /tmp/File002 Volume Label: Id : Bacula 0.9 mortal @@ -270,17 +244,15 @@ Block: 65 blen=64512 First rec FI=83 SessId=1 SessTim=1035062102 Strm=DATA rlen= Block: 66 blen=19195 First rec FI=83 SessId=1 SessTim=1035062102 Strm=DATA rlen=2973 bls: Got EOF on device /tmp End of File on device -\end{verbatim} -\normalsize +\end{lstlisting} Armed with the SessionId and the SessionTime, you can extract just about -anything. +anything. If you want to know even more, add a second {\bf -v} to the command line to -get a dump of every record in every block. +get a dump of every record in every block. -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bls -k -v -v /tmp/File002 bls: block.c:79 Dump block 80f8ad0: size=64512 BlkNum=1 Hdrcksum=b1bdfd6d cksum=b1bdfd6d @@ -306,8 +278,7 @@ bls: block.c:92 Rec: VId=1 VT=1035062102 FI=6 Strm=contDATA len=4087 p=80f8b4 bls: block.c:92 Rec: VId=1 VT=1035062102 FI=6 Strm=DATA len=31970 p=80f9b4b bls: block.c:92 Rec: VId=1 VT=1035062102 FI=6 Strm=MD5 len=16 p=8101841 ... -\end{verbatim} -\normalsize +\end{lstlisting} \section{bextract} \label{bextract} @@ -324,7 +295,7 @@ Console} program. However, {\bf bextract} can be used to extract a single file or a list of files from a Bacula tape or file. In fact, {\bf bextract} can be a useful tool to restore files to an empty system assuming you are able to boot, you have statically linked {\bf bextract} and you have an appropriate -{\bf bootstrap} file. +{\bf bootstrap} file. Please note that some of the current limitations of bextract are: @@ -339,11 +310,10 @@ Please note that some of the current limitations of bextract are: \end{enumerate} -It is called: +It is called: + +\begin{lstlisting} -\footnotesize -\begin{verbatim} - Usage: bextract [-d debug_level] -b specify a bootstrap file -dnn set debug level to nn @@ -352,18 +322,17 @@ Usage: bextract [-d debug_level] -p proceed inspite of I/O errors -V specify Volume names (separated by |) -? print this message -\end{verbatim} -\normalsize +\end{lstlisting} where {\bf device-name} is the Archive Device (raw device name or full filename) of the device to be read, and {\bf directory-to-store-files} is a -path prefix to prepend to all the files restored. +path prefix to prepend to all the files restored. NOTE: On Windows systems, if you specify a prefix of say d:/tmp, any file that would have been restored to {\bf c:/My Documents} will be restored to {\bf d:/tmp/My Documents}. That is, the original drive specification will be stripped. If no prefix is specified, the file will be restored to the original -drive. +drive. \subsection{Extracting with Include or Exclude Lists} \index[general]{Lists!Extracting with Include or Exclude} @@ -374,7 +343,7 @@ to be excluded. Wildcards can be used in the exclusion list. This option will normally be used in conjunction with the {\bf -i} option (see below). Both the {\bf -e} and the {\bf -i} options may be specified at the same time as the {\bf -b} option. The bootstrap filters will be applied first, then the include -list, then the exclude list. +list, then the exclude list. Likewise, and probably more importantly, with the {\bf -i} option, you can specify a file that contains a list (one file per line) of files and @@ -382,30 +351,26 @@ directories to include to be restored. The list must contain the full filename with the path. If you specify a path name only, all files and subdirectories of that path will be restored. If you specify a line containing only the filename (e.g. {\bf my-file.txt}) it probably will not be extracted because -you have not specified the full path. +you have not specified the full path. -For example, if the file {\bf include-list} contains: +For example, if the file {\bf include-list} contains: -\footnotesize -\begin{verbatim} +\begin{lstlisting} /home/kern/bacula /usr/local/bin -\end{verbatim} -\normalsize +\end{lstlisting} -Then the command: +Then the command: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bextract -i include-list -V Volume /dev/nst0 /tmp -\end{verbatim} -\normalsize +\end{lstlisting} will restore from the Bacula archive {\bf /dev/nst0} all files and directories in the backup from {\bf /home/kern/bacula} and from {\bf /usr/local/bin}. The restored files will be placed in a file of the original name under the directory {\bf /tmp} (i.e. /tmp/home/kern/bacula/... and -/tmp/usr/local/bin/...). +/tmp/usr/local/bin/...). \subsection{Extracting With a Bootstrap File} \index[general]{File!Extracting With a Bootstrap} @@ -415,22 +380,20 @@ The {\bf -b} option is used to specify a {\bf bootstrap} file containing the information needed to restore precisely the files you want. Specifying a {\bf bootstrap} file is optional but recommended because it gives you the most control over which files will be restored. For more details on the {\bf -bootstrap} file, please see +bootstrap} file, please see \ilink{Restoring Files with the Bootstrap File}{BootstrapChapter} chapter of this document. Note, you may also use a bootstrap file produced by -the {\bf restore} command. For example: +the {\bf restore} command. For example: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bextract -b bootstrap-file /dev/nst0 /tmp -\end{verbatim} -\normalsize +\end{lstlisting} The bootstrap file allows detailed specification of what files you want restored (extracted). You may specify a bootstrap file and include and/or exclude files at the same time. The bootstrap conditions will first be applied, and then each file record seen will be compared to the include and -exclude lists. +exclude lists. \subsection{Extracting From Multiple Volumes} \index[general]{Volumes!Extracting From Multiple} @@ -476,13 +439,12 @@ the details of making a copy of your database. loss of a hard disk, if you do not have a valid {\bf bootstrap} file for reloading your system, or if a Volume has been recycled but not overwritten, you can use {\bf bscan} to re-create your database, which can then be used to -{\bf restore} your system or a file to its previous state. +{\bf restore} your system or a file to its previous state. -It is called: +It is called: + +\begin{lstlisting} -\footnotesize -\begin{verbatim} - Usage: bscan [options] -b bootstrap specify a bootstrap file -c specify configuration file @@ -499,18 +461,17 @@ Usage: bscan [options] -V specify Volume names (separated by |) -w specify working directory (default from conf file) -? print this message -\end{verbatim} -\normalsize +\end{lstlisting} If you are using MySQL or PostgreSQL, there is no need to supply a working directory since in that case, bscan knows where the databases are. However, if 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. +password ({\bf -p}) options. NOTE: before {\bf bscan} can work, it needs at least a bare bones valid database. If your database exists but some records are missing because -they were pruned, then you are all set. If your database was lost or +they were pruned, then you are all set. If your database was lost or destroyed, then you must first ensure that you have the SQL program running (MySQL or PostgreSQL), then you must create the Bacula database (normally named bacula), and you must create the Bacula tables using the scripts in @@ -522,19 +483,17 @@ Storage records which are not stored on the Volumes. Without these records, scanning is unable to connect the Job records to the proper client. -Forgetting for the moment the extra complications of a full rebuild of -your catalog, let's suppose that you did a backup to Volumes "Vol001" +Forgetting for the moment the extra complications of a full rebuild of +your catalog, 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: +whatever you want. A command something like: -\footnotesize -\begin{verbatim} +\begin{lstlisting} bscan -c bacula-sd.conf -v -V Vol001\|Vol002 /dev/nst0 -\end{verbatim} -\normalsize +\end{lstlisting} 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 @@ -543,30 +502,26 @@ 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 Volumes. This must correspond to -the Archive Device in the conf file. +the Archive Device in the conf file. Then to actually write or store the records in the catalog, add the {\bf -s} -option as follows: +option as follows: -\footnotesize -\begin{verbatim} +\begin{lstlisting} bscan -s -m -c bacula-sd.conf -v -V Vol001\|Vol002 /dev/nst0 -\end{verbatim} -\normalsize +\end{lstlisting} 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 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. +added. -If you have multiple tapes, you should scan them with: +If you have multiple tapes, you should scan them with: -\footnotesize -\begin{verbatim} +\begin{lstlisting} bscan -s -m -c bacula-sd.conf -v -V Vol001\|Vol002\|Vol003 /dev/nst0 -\end{verbatim} -\normalsize +\end{lstlisting} Since there is a limit on the command line length (511 bytes) accepted by {\bf bscan}, if you have too many Volumes, you will need to manually @@ -575,13 +530,11 @@ chapter of this manual for more details, in particular the section entitled \ilink{Bootstrap for bscan}{bscanBootstrap}. Basically, the .bsr file for the above example might look like: -\footnotesize -\begin{verbatim} +\begin{lstlisting} Volume=Vol001 Volume=Vol002 Volume=Vol003 -\end{verbatim} -\normalsize +\end{lstlisting} Note: {\bf bscan} does not support supplying Volume names on the command line and at the same time in a bootstrap file. Please @@ -629,7 +582,7 @@ changing the catalog, you can safely do so if and only if you do {\bf not} specify either the {\bf -m} or the {\bf -s} options. However, at this time (Bacula version 1.26), the comparison routines are not as good or as thorough as they should be, so we don't particularly recommend this mode other than for -testing. +testing. \subsection{Using bscan to Recreate a Catalog from a Volume} \index[general]{Volume!Using bscan to Recreate a Catalog from a Volume} @@ -638,16 +591,14 @@ testing. This is the mode for which {\bf bscan} is most useful. You can either {\bf bscan} into a freshly created catalog, or directly into your existing catalog (after having made an ASCII copy as described above). Normally, you should -start with a freshly created catalog that contains no data. +start with a freshly created catalog that contains no data. Starting with a single Volume named {\bf TestVolume1}, you run a command such -as: +as: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bscan -V TestVolume1 -v -s -m -c bacula-sd.conf /dev/nst0 -\end{verbatim} -\normalsize +\end{lstlisting} If there is more than one volume, simply append it to the first one separating it with a vertical bar. You may need to precede the vertical bar with a @@ -655,22 +606,19 @@ forward slash escape the shell -- e.g. {\bf TestVolume1\textbackslash{}|TestVolume2}. The {\bf -v} option was added for verbose output (this can be omitted if desired). The {\bf -s} option that tells {\bf bscan} to store information in the database. The physical device -name {\bf /dev/nst0} is specified after all the options. +name {\bf /dev/nst0} is specified after all the options. {\bf} For example, after having done a full backup of a directory, then two incrementals, I reinitialized the SQLite database as described above, and -using the bootstrap.bsr file noted above, I entered the following command: +using the bootstrap.bsr file noted above, I entered the following command: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./bscan -b bootstrap.bsr -v -s -c bacula-sd.conf /dev/nst0 -\end{verbatim} -\normalsize +\end{lstlisting} -which produced the following output: +which produced the following output: -\footnotesize -\begin{verbatim} +\begin{lstlisting} bscan: bscan.c:182 Using Database: bacula, User: bacula bscan: bscan.c:673 Created Pool record for Pool: Default bscan: bscan.c:271 Pool type "Backup" is OK. @@ -697,34 +645,32 @@ bscan: bscan.c:905 Created JobMedia record JobId 3, MediaId 1 bscan: Got EOF on device /dev/nst0 bscan: bscan.c:652 Updated Media record at end of Volume: TestVolume1 bscan: bscan.c:428 End of Volume. VolFiles=3 VolBlocks=57 VolBytes=10,027,437 -\end{verbatim} -\normalsize +\end{lstlisting} The key points to note are that {\bf bscan} prints a line when each major record is created. Due to the volume of output, it does not print a line for each file record unless you supply the {\bf -v} option twice or more on the -command line. +command line. In the case of a Job record, the new JobId will not normally be the same as the original Jobid. For example, for the first JobId above, the new JobId is 1, but the original JobId is 2. This is nothing to be concerned about as it is -the normal nature of databases. {\bf bscan} will keep everything straight. +the normal nature of databases. {\bf bscan} will keep everything straight. Although {\bf bscan} claims that it created a Client record for Client: Rufus -three times, it was actually only created the first time. This is normal. +three times, it was actually only created the first time. This is normal. You will also notice that it read an end of file after each Job (Got EOF on -device ...). Finally the last line gives the total statistics for the bscan. +device ...). Finally the last line gives the total statistics for the bscan. If you had added a second {\bf -v} option to the command line, Bacula would have been even more verbose, dumping virtually all the details of each Job -record it encountered. +record it encountered. Now if you start Bacula and enter a {\bf list jobs} command to the console -program, you will get: +program, you will get: -\footnotesize -\begin{verbatim} +\begin{lstlisting} +-------+----------+------------------+------+-----+----------+----------+---------+ | JobId | Name | StartTime | Type | Lvl | JobFiles | JobBytes | JobStat | +-------+----------+------------------+------+-----+----------+----------+---------+ @@ -732,20 +678,19 @@ program, you will get: | 2 | kernsave | 2002-10-07 15:00 | B | I | 15 | 2170314 | T | | 3 | kernsave | 2002-10-07 15:01 | B | I | 33 | 3662184 | T | +-------+----------+------------------+------+-----+----------+----------+---------+ -\end{verbatim} -\normalsize +\end{lstlisting} which corresponds virtually identically with what the database contained before it was re-initialized and restored with bscan. All the Jobs and Files found on the tape are restored including most of the Media record. The Volume (Media) records restored will be marked as {\bf Full} so that they cannot be -rewritten without operator intervention. +rewritten without operator intervention. It should be noted that {\bf bscan} cannot restore a database to the exact condition it was in previously because a lot of the less important information contained in the database is not saved to the tape. Nevertheless, the reconstruction is sufficiently complete, that you can run {\bf restore} -against it and get valid results. +against it and get valid results. An interesting aspect of restoring a catalog backup using {\bf bscan} is that the backup was made while Bacula was running and writing to a tape. At @@ -756,7 +701,7 @@ between what is contained in the backed up catalog and what is actually on the tape. If after restoring a catalog, you attempt to write on the same tape that was used to backup the catalog, Bacula will detect the difference in the number of files registered in the catalog compared to what is on the -tape, and will mark the tape in error. +tape, and will mark the tape in error. There are two solutions to this problem. The first is possibly the simplest and is to mark the volume as Used before doing any backups. The second is @@ -771,12 +716,12 @@ using the {\bf update volume} command in {\bf bconsole}. 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. +the catalog record for the Volume indicates only 19 files. Bacula refuses to write on a tape that contains a different number of files from what is in the catalog. To correct this situation, you may run a {\bf bscan} with the {\bf -m} option (but {\bf without} the {\bf -s} option) to -update only the final Media record for the Volumes read. +update only the final Media record for the Volumes read. \subsection{After bscan} \index[general]{After bscan} @@ -790,7 +735,7 @@ 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 having it immediately purged. When you have restored and backed up the data, you can reset the VolStatus to {\bf Used} and the Volume will be purged from -the catalog. +the catalog. \section{bcopy} \label{bcopy} @@ -805,14 +750,13 @@ process of making the copy, no record of the information written to the new Volume is stored in the catalog. This means that the new Volume, though it contains valid backup data, cannot be accessed directly from existing catalog entries. If you wish to be able to use the Volume with the Console restore -command, for example, you must first bscan the new Volume into the catalog. +command, for example, you must first bscan the new Volume into the catalog. \subsection{bcopy Command Options} \index[general]{Options!bcopy Command} \index[general]{Bcopy Command Options} -\footnotesize -\begin{verbatim} +\begin{lstlisting} Usage: bcopy [-d debug_level] -b bootstrap specify a bootstrap file -c specify configuration file @@ -823,19 +767,18 @@ Usage: bcopy [-d debug_level] -v verbose -w dir specify working directory (default /tmp) -? print this message -\end{verbatim} -\normalsize +\end{lstlisting} By using a {\bf bootstrap} file, you can copy parts of a Bacula archive file -to another archive. +to another archive. One of the objectives of this program is to be able to recover as much data as possible from a damaged tape. However, the current version does not yet have -this feature. +this feature. As this is a new program, any feedback on its use would be appreciated. In addition, I only have a single tape drive, so I have never been able to test -this program with two tape drives. +this program with two tape drives. \section{btape} \label{btape} @@ -852,19 +795,18 @@ Aside from initial testing of tape drive compatibility with {\bf Bacula}, {\bf btape} can be dangerous to use with existing {\bf Bacula} tapes because it will relabel a tape or write on the tape if so requested regardless that the tape may contain valuable data, so please be careful and use it only on -blank tapes. +blank tapes. To work properly, {\bf btape} needs to read the Storage daemon's configuration 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. +option to specify where. 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} +read by {\bf btape} -\footnotesize -\begin{verbatim} +\begin{lstlisting} Usage: btape -b specify bootstrap file -c set configuration file to file @@ -873,8 +815,7 @@ Usage: btape -s turn off signals -v be verbose -? print this message. -\end{verbatim} -\normalsize +\end{lstlisting} \subsection{Using btape to Verify your Tape Drive} \index[general]{Using btape to Verify your Tape Drive} @@ -882,24 +823,23 @@ Usage: btape An important reason for this program is to ensure that a Storage daemon configuration file is defined so that Bacula will correctly read and write -tapes. +tapes. It is highly recommended that you run the {\bf test} command before running your first Bacula job to ensure that the parameters you have defined for your storage device (tape drive) will permit {\bf Bacula} to function properly. You only need to mount a blank tape, enter the command, and the output should be -reasonably self explanatory. Please see the +reasonably self explanatory. Please see the \ilink{Tape Testing}{TapeTestingChapter} Chapter of this manual for -the details. +the details. \subsection{btape Commands} \index[general]{Btape Commands} \index[general]{Commands!btape} -The full list of commands are: +The full list of commands are: -\footnotesize -\begin{verbatim} +\begin{lstlisting} Command Description ======= =========== autochanger test autochanger @@ -930,22 +870,21 @@ The full list of commands are: wr write a single Bacula block rr read a single record qfill quick fill command -\end{verbatim} -\normalsize +\end{lstlisting} -The most useful commands are: +The most useful commands are: -\begin{itemize} -\item test -- test writing records and EOF marks and reading them back. +\begin{bsysitemize} +\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. + 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. + 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. - \end{itemize} + file and as perceived by the Storage daemon. + \end{bsysitemize} The {\bf readlabel} command can be used to display the details of a Bacula tape label. This can be useful if the physical tape label was lost or damaged. @@ -954,7 +893,7 @@ tape label. This can be useful if the physical tape label was lost or damaged. In the event that you want to relabel a {\bf Bacula}, you can simply use the {\bf label} command which will write over any existing label. However, please note for labeling tapes, we recommend that you use the {\bf label} command in -the {\bf Console} program since it will never overwrite a valid Bacula tape. +the {\bf Console} program since it will never overwrite a valid Bacula tape. \subsubsection*{Testing your Tape Drive} \label{sec:btapespeed} @@ -963,7 +902,7 @@ To determine the best configuration of your tape drive, you can run the new \texttt{speed} command available in the \texttt{btape} program. This command can have the following arguments: -\begin{itemize} +\begin{bsysitemize} \item[\texttt{file\_size=n}] Specify the Maximum File Size for this test (between 1 and 5GB). This counter is in GB. \item[\texttt{nb\_file=n}] Specify the number of file to be written. The amount @@ -975,9 +914,9 @@ This command can have the following arguments: \item[\texttt{skip\_raw}] This flag permits to skip tests with raw access. \item[\texttt{skip\_block}] This flag permits to skip tests with Bacula block access. -\end{itemize} +\end{bsysitemize} -\begin{verbatim} +\begin{lstlisting} *speed file_size=3 skip_raw btape.c:1078 Test with zero data and bacula block structure. btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes. @@ -996,7 +935,7 @@ btape.c:406 Volume bytes=3.221 GB. Write rate = 7.271 MB/s ... btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s -\end{verbatim} +\end{lstlisting} When using compression, the random test will give your the minimum throughput of your drive . The test using constant string will give you the maximum speed @@ -1009,7 +948,7 @@ You can change the block size in the Storage Daemon configuration file. \index[general]{Other Programs} The following programs are general utility programs and in general do not need -a configuration file nor a device name. +a configuration file nor a device name. \section{bsmtp} \label{bsmtp} @@ -1018,12 +957,11 @@ a configuration file nor a device name. {\bf bsmtp} is a simple mail transport program that permits more flexibility than the standard mail programs typically found on Unix systems. It can even -be used on Windows machines. +be used on Windows machines. -It is called: +It is called: -\footnotesize -\begin{verbatim} +\begin{lstlisting} Usage: bsmtp [-f from] [-h mailhost] [-s subject] [-c copy] [recipient ...] -c set the Cc: field -dnn set debug level to nn @@ -1032,13 +970,12 @@ Usage: bsmtp [-f from] [-h mailhost] [-s subject] [-c copy] [recipient ...] -l limit the lines accepted to nn -s set the Subject: field -? print this message. -\end{verbatim} -\normalsize +\end{lstlisting} If the {\bf -f} option is not specified, {\bf bsmtp} will use your userid. If the option {\bf -h} is not specified {\bf bsmtp} will use the value in the environment variable {\bf bsmtpSERVER} or if there is none {\bf localhost}. By default -port 25 is used. +port 25 is used. If a line count limit is set with the {\bf -l} option, {\bf bsmtp} will not send an email with a body text exceeding that number of lines. This @@ -1049,30 +986,28 @@ job report and any error messages unless you check the log file written by the Director (see the messages resource in this manual for details). -{\bf recipients} is a space separated list of email recipients. +{\bf recipients} is a space separated list of email recipients. -The body of the email message is read from standard input. +The body of the email message is read from standard input. An example of the use of {\bf bsmtp} would be to put the following statement in the {\bf Messages} resource of your {\bf bacula-dir.conf} file. Note, these -commands should appear on a single line each. +commands should appear on a single line each. -\footnotesize -\begin{verbatim} +\begin{lstlisting} mailcommand = "/home/bacula/bin/bsmtp -h mail.domain.com -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r" operatorcommand = "/home/bacula/bin/bsmtp -h mail.domain.com -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r" -\end{verbatim} -\normalsize +\end{lstlisting} Where you replace {\bf /home/bacula/bin} with the path to your {\bf Bacula} binary directory, and you replace {\bf mail.domain.com} with the fully qualified name of your bsmtp (email) server, which normally listens on port 25. For more details on the substitution characters (e.g. \%r) used in the -above line, please see the documentation of the +above line, please see the documentation of the \ilink{ MailCommand in the Messages Resource}{mailcommand} -chapter of this manual. +chapter of this manual. It is HIGHLY recommended that you test one or two cases by hand to make sure that the {\bf mailhost} that you specified is correct and that it will accept @@ -1082,10 +1017,10 @@ being rejected because it does not contain a valid domain, or because your message is caught in your spam filtering rules. Generally, you should specify a fully qualified domain name in the {\bf from} field, and depending on whether your bsmtp gateway is Exim or Sendmail, you may need to modify the -syntax of the from part of the message. Please test. +syntax of the from part of the message. Please test. When running {\bf bsmtp} by hand, you will need to terminate the message by -entering a ctl-d in column 1 of the last line. +entering a ctl-d in column 1 of the last line. % TODO: is "column" the correct terminology for this? If you are getting incorrect dates (e.g. 1970) and you are @@ -1108,24 +1043,23 @@ to the Bacula {\bf mailcommand} or {\bf operatorcommand} and when \index[general]{Dbcheck} \index[general]{program!dbcheck} {\bf dbcheck} is a simple program that will search for logical -inconsistencies in the Bacula tables in your database, and optionally fix them. +inconsistencies in the Bacula tables in your database, and optionally fix them. It is a database maintenance routine, in the sense that it can detect and remove unused rows, but it is not a database repair routine. To repair a database, see the tools furnished by the database vendor. Normally dbcheck should never need to be run, but if Bacula has crashed or you have a lot of Clients, Pools, or -Jobs that you have removed, it could be useful. - +Jobs that you have removed, it could be useful. + 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: +It is called: -\footnotesize -\begin{verbatim} -Usage: dbcheck [-c config ] [-B] [-C catalog name] [-d debug_level] +\begin{lstlisting} +Usage: dbcheck [-c config ] [-B] [-C catalog name] [-d debug_level] [] [] -b batch mode -C catalog name in the director conf file @@ -1136,15 +1070,14 @@ Usage: dbcheck [-c config ] [-B] [-C catalog name] [-d debug_level] -f fix inconsistencies -v verbose -? print this message -\end{verbatim} -\normalsize +\end{lstlisting} If the \textbf{-B} option is specified, dbcheck will print out catalog information in a simple text based format. This is useful to backup it in a secure way. -\begin{verbatim} - $ dbcheck -B +\begin{lstlisting} + $ dbcheck -B catalog=MyCatalog db_type=SQLite db_name=regress @@ -1154,22 +1087,21 @@ secure way. db_address= db_port=0 db_socket= -\end{verbatim} %$ +\end{lstlisting} %$ If the {\bf -c} option is given with the Director's conf file, there is no need to enter any of the command line arguments, in particular the working -directory as dbcheck will read them from the file. +directory as dbcheck will read them from the file. If the {\bf -f} option is specified, {\bf dbcheck} will repair ({\bf fix}) the -inconsistencies it finds. Otherwise, it will report only. +inconsistencies it finds. Otherwise, it will report only. If the {\bf -b} option is specified, {\bf dbcheck} will run in batch mode, and it will proceed to examine and fix (if -f is set) all programmed inconsistency checks. If the {\bf -b} option is not specified, {\bf dbcheck} will enter -interactive mode and prompt with the following: +interactive mode and prompt with the following: -\footnotesize -\begin{verbatim} +\begin{lstlisting} Hello, this is the database check/correct program. Please select the function you want to perform. 1) Toggle modify database flag @@ -1190,40 +1122,39 @@ Please select the function you want to perform. 16) All (3-15) 17) Quit Select function number: -\end{verbatim} -\normalsize +\end{lstlisting} By entering 1 or 2, you can toggle the modify database flag (-f option) and the verbose flag (-v). It can be helpful and reassuring to turn off the modify database flag, then select one or more of the consistency checks (items 3 through 9) to see what will be done, then toggle the modify flag on and re-run -the check. +the check. -The inconsistencies examined are the following: +The inconsistencies examined are the following: -\begin{itemize} +\begin{bsysitemize} \item Duplicate filename records. This can happen if you accidentally run two copies of Bacula at the same time, and they are both adding filenames simultaneously. It is a rare occurrence, but will create an inconsistent 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. + messages, there is no reason to run this check. \item Repair bad Filename records. This checks and corrects filenames that - have a trailing slash. They should not. + 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. + not have a trailing slash. They should. \item Duplicate path records. This can happen if you accidentally run two copies of Bacula at the same time, and they are both adding filenames simultaneously. It is a rare occurrence, but will create an inconsistent database. See the item above for why this occurs and how you know it is - happening. -\item Orphaned JobMedia records. This happens when a Job record is deleted + happening. +\item Orphaned JobMedia records. This happens when a Job record is deleted (perhaps by a user issued SQL statement), but the corresponding JobMedia record (one for each Volume used in the Job) was not deleted. Normally, this should not happen, and even if it does, these records generally do not take much space in your database. However, by running this check, you can - eliminate any such orphans. -\item Orphaned File records. This happens when a Job record is deleted + eliminate any such orphans. +\item Orphaned File records. This happens when a Job record is deleted (perhaps by a user issued SQL statement), but the corresponding File record (one for each Volume used in the Job) was not deleted. Note, searching for these records can be {\bf very} time consuming (i.e. it may take hours) for a @@ -1234,37 +1165,37 @@ The inconsistencies examined are the following: want to ensure that you have indexes on JobId, FilenameId, and PathId for the File table in your catalog before running this command. -\item Orphaned Path records. This condition happens any time a directory is - deleted from your system and all associated Job records have been purged. +\item Orphaned Path records. This condition happens any time a directory is + deleted from your system and all associated Job records have been purged. During standard purging (or pruning) of Job records, Bacula does not check for orphaned Path records. As a consequence, over a period of time, old unused Path records will tend to accumulate and use space in your database. This check will eliminate them. It is recommended that you run this - check at least once a year. -\item Orphaned Filename records. This condition happens any time a file is - deleted from your system and all associated Job records have been purged. + check at least once a year. +\item Orphaned Filename records. This condition happens any time a file is + deleted from your system and all associated Job records have been purged. This can happen quite frequently as there are quite a large number of files that are created and then deleted. In addition, if you do a system update or delete an entire directory, there can be a very large number of Filename - records that remain in the catalog but are no longer used. + records that remain in the catalog but are no longer used. During standard purging (or pruning) of Job records, Bacula does not check for orphaned Filename records. As a consequence, over a period of time, old unused Filename records will accumulate and use space in your database. This check will eliminate them. It is strongly recommended that you run this check at least once a year, and for large database (more than 200 Megabytes), it is - probably better to run this once every 6 months. + probably better to run this once every 6 months. \item Orphaned Client records. These records can remain in the database long - after you have removed a client. + after you have removed a client. \item Orphaned Job records. If no client is defined for a job or you do not run a job for a long time, you can accumulate old job records. This option allow you to remove jobs that are not attached to any client (and thus - useless). -\item All Admin records. This command will remove all Admin records, - regardless of their age. -\item All Restore records. This command will remove all Restore records, - regardless of their age. -\end{itemize} + useless). +\item All Admin records. This command will remove all Admin records, + regardless of their age. +\item All Restore records. This command will remove all Restore records, + regardless of their age. +\end{bsysitemize} If you are using Mysql, dbcheck will ask you if you want to create temporary @@ -1291,35 +1222,35 @@ waste their time running dbcheck too often. \index[general]{bregex} \index[general]{program!bregex} -{\bf bregex} is a simple program that will allow you to test +{\bf bregex} is a simple program that will allow you to test regular expressions against a file of data. This can be useful because the regex libraries on most systems differ, and in addition, regex expressions can be complicated. -{\bf bregex} is found in the src/tools directory and it is +{\bf bregex} is found in the src/tools directory and it is normally installed with your system binaries. To run it, use: -\begin{verbatim} +\begin{lstlisting} Usage: bregex [-d debug_level] -f -f specify file of data to be matched -l suppress line numbers -n print lines that do not match -? print this message. -\end{verbatim} +\end{lstlisting} The \lt{}data-file\gt{} is a filename that contains lines of data to be matched (or not) against one or more patterns. -When the program is run, it will prompt you for a regular +When the program is run, it will prompt you for a regular expression pattern, then apply it one line at a time against -the data in the file. Each line that matches will be printed -preceded by its line number. You will then be prompted again -for another pattern. +the data in the file. Each line that matches will be printed +preceded by its line number. You will then be prompted again +for another pattern. Enter an empty line for a pattern to terminate the program. You can print only lines that do not match by using the -n option, and you can suppress printing of line numbers with the -l option. -This program can be useful for testing regex expressions to be +This program can be useful for testing regex expressions to be applied against a list of filenames. \section{bwild} @@ -1327,33 +1258,33 @@ applied against a list of filenames. \index[general]{bwild} \index[general]{program!bwild} -{\bf bwild} is a simple program that will allow you to test +{\bf bwild} is a simple program that will allow you to test wild-card expressions against a file of data. -{\bf bwild} is found in the src/tools directory and it is +{\bf bwild} is found in the src/tools directory and it is normally installed with your system binaries. To run it, use: -\begin{verbatim} +\begin{lstlisting} Usage: bwild [-d debug_level] -f -f specify file of data to be matched -l suppress line numbers -n print lines that do not match -? print this message. -\end{verbatim} +\end{lstlisting} The \lt{}data-file\gt{} is a filename that contains lines of data to be matched (or not) against one or more patterns. When the program is run, it will prompt you for a wild-card pattern, then apply it one line at a time against -the data in the file. Each line that matches will be printed -preceded by its line number. You will then be prompted again -for another pattern. +the data in the file. Each line that matches will be printed +preceded by its line number. You will then be prompted again +for another pattern. Enter an empty line for a pattern to terminate the program. You can print only lines that do not match by using the -n option, and you can suppress printing of line numbers with the -l option. -This program can be useful for testing wild expressions to be +This program can be useful for testing wild expressions to be applied against a list of filenames. \section{testfind} @@ -1364,20 +1295,19 @@ applied against a list of filenames. {\bf testfind} permits listing of files using the same search engine that is used for the {\bf Include} resource in Job resources. Note, much of the functionality of this program (listing of files to be included) is present in -the -\ilink{estimate command}{estimate} in the Console program. +the +\ilink{estimate command}{estimate} in the Console program. The original use of testfind was to ensure that Bacula's file search engine 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: +It is called: -\footnotesize -\begin{verbatim} +\begin{lstlisting} Usage: testfind [-d debug_level] [-] [pattern1 ...] -a print extended attributes (Win32 debug) -dnn set debug level to nn @@ -1389,23 +1319,19 @@ Debug level>= 10 prints path/file for catalog. Errors are always printed. Files/paths truncated is a number with len> 255. Truncation is only in the catalog. -\end{verbatim} -\normalsize +\end{lstlisting} Where a pattern is any filename specification that is valid within an {\bf Include} resource definition. If none is specified, {\bf /} (the root -directory) is assumed. For example: +directory) is assumed. For example: -\footnotesize -\begin{verbatim} +\begin{lstlisting} ./testfind /bin -\end{verbatim} -\normalsize +\end{lstlisting} -Would print the following: +Would print the following: -\footnotesize -\begin{verbatim} +\begin{lstlisting} Dir: /bin Reg: /bin/bash Lnk: /bin/bash2 -> bash @@ -1426,16 +1352,17 @@ Max file length: 13 Max path length: 5 Files truncated: 0 Paths truncated: 0 -\end{verbatim} -\normalsize +\end{lstlisting} Even though {\bf testfind} uses the same search engine as {\bf Bacula}, each directory to be listed, must be entered as a separate command line entry or entered one line at a time to standard input if the {\bf -} option was -specified. +specified. Specifying a debug level of one (i.e. {\bf -d1}) on the command line will 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. +used when putting filenames into the Catalog database. + +\input{bimagemgr-chapter} diff --git a/docs/manuals/en/utility/rpm-faq.tex b/docs/manuals/en/utility/rpm-faq.tex index 36dbb88b..b94d515c 100644 --- a/docs/manuals/en/utility/rpm-faq.tex +++ b/docs/manuals/en/utility/rpm-faq.tex @@ -1,44 +1,41 @@ -%% -%% - \chapter{Bacula RPM Packaging FAQ} \label{RpmFaqChapter} \index[general]{FAQ!Bacula\textsuperscript{\textregistered} - RPM Packaging } \index[general]{Bacula\textsuperscript{\textregistered} - RPM Packaging FAQ } \begin{enumerate} -\item - \ilink{How do I build Bacula for platform xxx?}{faq1} -\item - \ilink{How do I control which database support gets built?}{faq2} - -\item - \ilink{What other defines are used?}{faq3} -\item +\item + \ilink{How do I build Bacula for platform xxx?}{faq1} +\item + \ilink{How do I control which database support gets built?}{faq2} + +\item + \ilink{What other defines are used?}{faq3} +\item \ilink{I'm getting errors about not having permission when I try to build the - packages. Do I need to be root?}{faq4} -\item + packages. Do I need to be root?}{faq4} +\item \ilink{I'm building my own rpms but on all platforms and compiles I get an unresolved dependency for something called - /usr/afsws/bin/pagsh.}{faq5} -\item + /usr/afsws/bin/pagsh.}{faq5} +\item \ilink{I'm building my own rpms because you don't publish for my platform. - Can I get my packages released to sourceforge for other people to use?}{faq6} -\item + Can I get my packages released to sourceforge for other people to use?}{faq6} +\item \ilink{Is there an easier way than sorting out all these command line options?}{faq7} -\item - \ilink{I just upgraded from 1.36.x to 1.38.x and now my director daemon won't start. It appears to start but dies silently and I get a "connection refused" error when starting the console. What is wrong?}{faq8} -\item - \ilink{There are a lot of rpm packages. Which packages do I need for what?}{faq9} -\item - \ilink{What happened to the build switches for gnome console, wxconsole and bat?}{faq10} +\item + \ilink{I just upgraded from 1.36.x to 1.38.x and now my director daemon won't start. It appears to start but dies silently and I get a "connection refused" error when starting the console. What is wrong?}{faq8} +\item + \ilink{There are a lot of rpm packages. Which packages do I need for what?}{faq9} +\item + \ilink{What happened to the build switches for gnome console, wxconsole and bat?}{faq10} \end{enumerate} \section{Answers} \index[general]{Answers } \begin{enumerate} -\item +\item \label{faq1} {\bf How do I build Bacula for platform xxx?} The bacula spec file contains defines to build for several platforms: \\ @@ -47,84 +44,72 @@ Fedora Core (fc1, fc3, fc4, fc5, fc6, fc7, fc8, fc9, fc10), \\ Whitebox Enterprise Linux 3.0 (wb3), \\ Red Hat Enterprise Linux (rhel3, rhel4, rhel5), \\ - Mandrake 10.x (mdk), Mandriva 2006.x (mdv), \\ - CentOS (centos3, centos4, centos5) \\ + Mandrake 10.x (mdk), Mandriva 2006.x (mdv), \\ + CentOS (centos3, centos4, centos5) \\ Scientific Linux (sl3, sl4, sl5) and \\ SuSE (su9, su10, su102, su103, su110, su111, su112). \\ \\ - The package build is controlled by a mandatory define set at the beginning of the file. These defines basically just control the dependency information that gets coded into the finished rpm package as well - as any special configure options required. The platform define may be edited - in the spec file directly (by default all defines are set to 0 or "not set"). + The package build is controlled by a mandatory define set at the beginning of the file. These defines basically just control the dependency information that gets coded into the finished rpm package as well + as any special configure options required. The platform define may be edited + in the spec file directly (by default all defines are set to 0 or "not set"). For example, to build the Red Hat 7.x package find the line in the spec file which reads -\footnotesize -\begin{verbatim} +\begin{lstlisting} %define rh7 0 - -\end{verbatim} -\normalsize -and edit it to read +\end{lstlisting} + +and edit it to read -\footnotesize -\begin{verbatim} +\begin{lstlisting} %define rh7 1 - -\end{verbatim} -\normalsize + +\end{lstlisting} Alternately you may pass the define on the command line when calling rpmbuild: - -\footnotesize -\begin{verbatim} + +\begin{lstlisting} rpmbuild -ba --define "build_rh7 1" bacula.spec rpmbuild --rebuild --define build_rh7 1" bacula-x.x.x-x.src.rpm - -\end{verbatim} -\normalsize -\item +\end{lstlisting} + +\item \label{faq2} {\bf How do I control which database support gets built?} Another mandatory build define controls which database support is compiled, one of build\_sqlite, build\_mysql or build\_postgresql. To get the MySQL - package and support either set the + package and support either set the -\footnotesize -\begin{verbatim} +\begin{lstlisting} %define mysql 0 - -\end{verbatim} -\normalsize -to +\end{lstlisting} + +to -\footnotesize -\begin{verbatim} +\begin{lstlisting} %define mysql 1 - -\end{verbatim} -\normalsize -in the spec file directly or pass it to rpmbuild on the command line: +\end{lstlisting} -\footnotesize -\begin{verbatim} +in the spec file directly or pass it to rpmbuild on the command line: + +\begin{lstlisting} rpmbuild -ba --define "build_rh7 1" --define "build_mysql 1" bacula.spec - -\end{verbatim} -\normalsize -\item +\end{lstlisting} + +\item \label{faq3} {\bf What other defines are used?} \\ - One other building define of note is the depkgs\_version. This define is set with each release and must - match the version of the source that is being used to build the packages. - You would not ordinarily need to edit this. See also the Build Options section + One other building define of note is the depkgs\_version. This define is set with each release and must + match the version of the source that is being used to build the packages. + You would not ordinarily need to edit this. See also the Build Options section below for other build time options that can be passed on the command line. -\item +\item \label{faq4} {\bf I'm getting errors about not having permission when I try to build the packages. Do I need to be root?} \\ @@ -133,34 +118,30 @@ in the spec file directly or pass it to rpmbuild on the command line: be built by a regular user but you must make a few changes on your system to do this. If you are building on your own system then the simplest method is to add write permissions for all to the build - directory (/usr/src/redhat/, /usr/src/RPM or /usr/src/packages). + directory (/usr/src/redhat/, /usr/src/RPM or /usr/src/packages). To accomplish this, execute the following command as root: -\footnotesize -\begin{verbatim} +\begin{lstlisting} chmod -R 777 /usr/src/redhat chmod -R 777 /usr/src/RPM chmod -R 777 /usr/src/packages - -\end{verbatim} -\normalsize + +\end{lstlisting} If you are working on a shared system where you can not use the method above then you need to recreate the appropriate above directory tree with all of its subdirectories inside your home directory. Then create a file named -{\tt .rpmmacros} +{\tt .rpmmacros} in your home directory (or edit the file if it already exists) -and add the following line: +and add the following line: -\footnotesize -\begin{verbatim} +\begin{lstlisting} %_topdir /home/myuser/redhat %_tmppath /tmp - -\end{verbatim} -\normalsize + +\end{lstlisting} It should be noted that Fedora from verion 10 and up is configured to build in the directory ~/rpmbuild. @@ -168,15 +149,13 @@ the directory ~/rpmbuild. Another handy directive for the .rpmmacros file if you wish to suppress the creation of debug rpm packages is: -\footnotesize -\begin{verbatim} +\begin{lstlisting} %debug_package %{nil} - -\end{verbatim} -\normalsize +\end{lstlisting} + -\item +\item \label{faq5} {\bf I'm building my own rpms but on all platforms and compiles I get an unresolved dependency for something called /usr/afsws/bin/pagsh.} \\ @@ -189,7 +168,7 @@ creation of debug rpm packages is: this problem you are building a very old bacula package as the examples have been removed from the doc packaging. -\item +\item \label{faq6} {\bf I'm building my own rpms because you don't publish for my platform. Can I get my packages released to sourceforge for other people to use?} @@ -198,7 +177,7 @@ creation of debug rpm packages is: examine the directory platforms/contrib-rpm in the source code for further information. -\item +\item \label{faq7} {\bf Is there an easier way than sorting out all these command line options?} \\ @@ -207,7 +186,7 @@ creation of debug rpm packages is: platforms/contrib-rpm/rpm\_wizard.sh. This script will allow you to specify build options using GNOME dialog screens. It requires zenity. -\item +\item \label{faq8} {\bf I just upgraded from 1.36.x to 1.38.x and now my director daemon won't start. It appears to start but dies silently and I get a "connection @@ -219,19 +198,17 @@ refused" error when starting the console. What is wrong?} \\ you will need to change some file permissions for things to work. Execute the following commands as root: -\footnotesize -\begin{verbatim} +\begin{lstlisting} chown bacula.bacula /var/bacula/* chown root.bacula /var/bacula/bacula-fd.9102.state chown bacula.disk /var/bacula/bacula-sd.9103.state - -\end{verbatim} -\normalsize + +\end{lstlisting} Further, if you are using File storage volumes rather than tapes those files will also need to have ownership set to user bacula and group bacula. -\item +\item \label{faq9} {\bf There are a lot of rpm packages. Which packages do I need for what?} \\ @@ -241,30 +218,29 @@ bacula-sqlite. If your system does not provide an mtx package you also need bacula-mtx to satisfy that dependancy. For a client machine you need only install bacula-client. Optionally, for either server or client machines, you may install a graphical console bacula-gconsole and/or -bacula-wxconsole. The Bacula Administration Tool is installed with the +bacula-wxconsole. The Bacula Administration Tool is installed with the bacula-bat package. One last package, bacula-updatedb is required only when upgrading a server more than one database revision level. -\item +\item \label{faq10} -The gnome console and wxconsole software is deprecated in favor of bat. The -bat (bacula administrative tool) is now packaged in it's own source RPM. There -are no command line switches to build it. The SRPM contains the current version -of QT that bat is developed against. Building the RPM will build QT and then build -bat against it. It will not install QT on your system. The resulting bat binary -can then be installed on a system without QT or with a different version of QT as it +The gnome console and wxconsole software is deprecated in favor of bat. The +bat (bacula administrative tool) is now packaged in it's own source RPM. There +are no command line switches to build it. The SRPM contains the current version +of QT that bat is developed against. Building the RPM will build QT and then build +bat against it. It will not install QT on your system. The resulting bat binary +can then be installed on a system without QT or with a different version of QT as it will not use the QT shared objects. \item {\bf Support for RHEL3/4/5, CentOS 3/4/5, Scientific Linux 3/4/5 and x86\_64} \\ The examples below show - explicit build support for RHEL4 and CentOS 4. Build support - for x86\_64 has also been added. + explicit build support for RHEL4 and CentOS 4. Build support + for x86\_64 has also been added. \end{enumerate} -\footnotesize -\begin{verbatim} +\begin{lstlisting} Build with one of these 3 commands: rpmbuild --rebuild \ @@ -282,18 +258,16 @@ rpmbuild --rebuild \ --define "build_mysql4 1" \ bacula-1.38.3-1.src.rpm -For CentOS substitute '--define "build_centos4 1"' in place of rhel4. +For CentOS substitute '--define "build_centos4 1"' in place of rhel4. For Scientific Linux substitute '--define "build_sl4 1"' in place of rhel4. For 64 bit support add '--define "build_x86_64 1"' -\end{verbatim} -\normalsize +\end{lstlisting} \section{Build Options} \index[general]{Build Options} The spec file currently supports building on the following platforms: -\footnotesize -\begin{verbatim} +\begin{lstlisting} Red Hat builds --define "build_rh7 1" --define "build_rh8 1" @@ -370,24 +344,23 @@ Modify the Packager tag for third party packages: Install most files to /opt/bacula directory: --define "single_dir_install 1" -\end{verbatim} -\normalsize +\end{lstlisting} \section{RPM Install Problems} \index[general]{RPM Install Problems} In general the RPMs, once properly built should install correctly. However, when attempting to run the daemons, a number of problems can occur: -\begin{itemize} +\begin{bsysitemize} \item Wrong /var/bacula Permissions \\ By default, the Director and Storage daemon do not run with root permission. If the /var/bacula is owned by root, then it is possible that the Director and the Storage daemon will not be able to access this directory, which is used as the Working Directory. To fix this, the easiest thing to do is: -\begin{verbatim} +\begin{lstlisting} chown bacula:bacula /var/bacula -\end{verbatim} +\end{lstlisting} Note: as of 1.38.8 /var/bacula is installed root:bacula with permissions 770. \item The Storage daemon cannot Access the Tape drive \\ @@ -401,5 +374,4 @@ can occur: device as well, which is usually /dev/sg0. The exact names depend on your configuration, please see the Tape Testing chapter for more information on devices. -\end{itemize} - +\end{bsysitemize} diff --git a/docs/manuals/en/utility/utility.tex b/docs/manuals/en/utility/utility.tex index 9c3a0d2f..f8971c71 100644 --- a/docs/manuals/en/utility/utility.tex +++ b/docs/manuals/en/utility/utility.tex @@ -5,16 +5,30 @@ %% %% # $ % & ~ _ ^ \ { } %% +\documentclass[10pt,bsyspaper,english,logo,titlepage]{bsysmanual} + +\renewcommand{\familydefault}{\sfdefault} +\usepackage[utf8]{inputenc} +\usepackage[toc,title,header,page]{appendix} +\usepackage[T1]{fontenc} +\usepackage{longtable,graphicx,fancyhdr,lastpage,eurosym,dcolumn,ltxtable} +\usepackage{textcomp,varioref,lscape,pdfpages,ifthen,setspace,colortbl,diagbox} +\usepackage{lmodern,minitoc} +\usepackage{MnSymbol} +\usepackage{bbding,multirow} +\usepackage[hyphens]{url} +\usepackage[plainpages=true,bookmarks=false,bookmarksopen=false,filecolor=black,linkcolor=black,urlcolor=bsysredtwo,filebordercolor={0. 0. 0.},menubordercolor={0. 0. 0.},urlbordercolor={0. 0. 0.},linkbordercolor={0. 0. 0.},hyperindex=false,colorlinks=true]{hyperref} +\usepackage{babel,xr,xr-hyper} +\usepackage[font={sf,bf},textfont=md]{caption} +\usepackage[printonlyused]{acronym} +\setlength\arrayrulewidth{0.4pt} +\include{bsyscommondefs} +\usepackage[left=4cm,right=3cm,bottom=2cm,top=2.5cm]{geometry} +\usepackage{moreverb,fancyvrb} +\usepackage{listings} +\input{external-references} +\pdfminorversion=4 -\documentclass[10pt,a4paper]{book} - -\topmargin -0.5in -\oddsidemargin 0.0in -\evensidemargin 0.0in -\textheight 10in -\textwidth 6.5in - -\usepackage{html} \usepackage{float} \usepackage{graphicx} \usepackage{bacula} @@ -22,60 +36,33 @@ \usepackage{makeidx} \usepackage{index} \usepackage{setspace} -\usepackage{hyperref} \usepackage{url} - \makeindex \newindex{general}{idx}{ind}{General Index} \sloppy - +\def\bsystitle{Utility programs} \begin{document} +\lstset{escapechar=,breaklines=true,basicstyle=\ttfamily\scriptsize,backgroundcolor=\color{lightbsysgrey}} \sloppy -\newfont{\bighead}{cmr17 at 36pt} -\parskip 10pt -\parindent 0pt - -\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip - \Huge{Bacula Utility Programs} - \begin{center} - \large{The Leading Open Source Backup Solution. } - \end{center} -} +\include{coverpage} - -\author{Kern Sibbald} -\date{\vspace{1.0in}\today \\ - This manual documents Bacula version \input{version} \\ - \vspace{0.2in} - Copyright \copyright 1999-2010, Free Software Foundation Europe - e.V. \\ - \vspace{0.2in} - Permission is granted to copy, distribute and/or modify this document under the terms of the - GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU Free Documentation License". -} - -\maketitle - -\clearpage +\frontmatter \tableofcontents -\clearpage +%\listoftables +\listoffigures +\mainmatter \include{progs} -\include{bimagemgr-chapter} \include{rpm-faq} +\begin{appendices} +\begin{small} \include{fdl} +\end{small} +\end{appendices} - -% The following line tells link_resolver.pl to not include these files: -% nolinks developersi baculai-dir baculai-fd baculai-sd baculai-console baculai-main - -% pull in the index -\clearpage \printindex[general] \end{document} diff --git a/docs/manuals/licences/coverpage.tex b/docs/manuals/licences/coverpage.tex index b66da733..798d414b 100644 --- a/docs/manuals/licences/coverpage.tex +++ b/docs/manuals/licences/coverpage.tex @@ -26,10 +26,10 @@ \fancyhf{}% \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\headrulewidth}{0.4pt} -\fancyhead[LE,RO]{\small{\textit{Bacula Enterprise \bsystitle{}}}}% +\fancyhead[LE,RO]{\small{\textit{Enterprise \bsystitle{}}}}% \fancyhead[RE,LO]{\small{\textit{\textcolor{bsysredtwo}{\leftmark}}}}%Bacula Console and Opertors Guide}}}}% \fancyfoot[RE,LO]{\small{\href{http://www.baculasystems.com}{www.baculasystems.com} -- \textit{Bacula Enterprise \bsystitle}}}% -- DRAFT}}} +- \textit{Enterprise \bsystitle}}}% -- DRAFT}}} \fancyfoot[LE,RO]{\small{\textit{\thepage/\pageref{LastPage}}}} } -- 2.39.5