Update of /cvsroot/bacula/docs/developers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21039/developers Modified Files: generaldevel.tex mediaformat.tex mempool.tex netprotocol.tex porting.tex regression.tex storage.tex tls-techdoc.tex Log Message: Update developers doc Index: generaldevel.tex =================================================================== RCS file: /cvsroot/bacula/docs/developers/generaldevel.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- generaldevel.tex 24 Oct 2005 17:13:23 -0000 1.3 +++ generaldevel.tex 28 Oct 2005 09:54:21 -0000 1.4 @@ -158,6 +158,8 @@ bacula (Bacula source code) docs (Bacula documentation) + gui (Some of the GUI programs that do not use + the Bacula core code) rescue (Bacula CDROM rescue code) regress (Bacula regression scripts) ryol (Roll your own Linux -- incomplete project) Index: netprotocol.tex =================================================================== RCS file: /cvsroot/bacula/docs/developers/netprotocol.tex,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- netprotocol.tex 13 May 2005 17:22:41 -0000 1.1.1.1 +++ netprotocol.tex 28 Oct 2005 09:54:21 -0000 1.2 @@ -3,12 +3,12 @@ \section*{TCP/IP Network Protocol} \label{_ChapterStart5} -\index{TCP/IP Network Protocol } -\index{Protocol!TCP/IP Network } +\index{TCP/IP Network Protocol} +\index{Protocol!TCP/IP Network} \addcontentsline{toc}{section}{TCP/IP Network Protocol} \subsection*{General} -\index{General } +\index{General} \addcontentsline{toc}{subsection}{General} This document describes the TCP/IP protocol used by Bacula to communicate @@ -29,8 +29,8 @@ considered to be binary data. \subsection*{bnet and Threads} -\index{Threads!bnet and } -\index{Bnet and Threads } +\index{Threads!bnet and} +\index{Bnet and Threads} \addcontentsline{toc}{subsection}{bnet and Threads} These bnet routines work fine in a threaded environment. However, they assume @@ -45,7 +45,7 @@ appropriate to put locks inside the bnet subroutines for efficiency reasons. \subsection*{bnet\_open} -\index{Bnet\_open } +\index{Bnet\_open} \addcontentsline{toc}{subsection}{bnet\_open} To establish a connection to a server, use the subroutine: @@ -58,7 +58,7 @@ message will generally be sent to the JCR. \subsection*{bnet\_send} -\index{Bnet\_send } +\index{Bnet\_send} \addcontentsline{toc}{subsection}{bnet\_send} To send a packet, one uses the subroutine: @@ -80,7 +80,7 @@ within the bsock packet. \subsection*{bnet\_fsend} -\index{Bnet\_fsend } +\index{Bnet\_fsend} \addcontentsline{toc}{subsection}{bnet\_fsend} This form uses: @@ -90,8 +90,8 @@ bnet\_send. \subsection*{Additional Error information} -\index{Information!Additional Error } -\index{Additional Error information } +\index{Information!Additional Error} +\index{Additional Error information} \addcontentsline{toc}{subsection}{Additional Error information} Fro additional error information, you can call {\bf is\_bnet\_error(BSOCK @@ -102,7 +102,7 @@ transmissions should be sent). \subsection*{bnet\_recv} -\index{Bnet\_recv } +\index{Bnet\_recv} \addcontentsline{toc}{subsection}{bnet\_recv} To read a packet, one uses the subroutine: @@ -126,7 +126,7 @@ It should be noted that bnet\_recv() is a blocking read. \subsection*{bnet\_sig} -\index{Bnet\_sig } +\index{Bnet\_sig} \addcontentsline{toc}{subsection}{bnet\_sig} To send a ``signal'' from one daemon to another, one uses the subroutine: @@ -146,13 +146,13 @@ \end{enumerate} \subsection*{bnet\_strerror} -\index{Bnet\_strerror } +\index{Bnet\_strerror} \addcontentsline{toc}{subsection}{bnet\_strerror} Returns a formated string corresponding to the last error that occurred. \subsection*{bnet\_close} -\index{Bnet\_close } +\index{Bnet\_close} \addcontentsline{toc}{subsection}{bnet\_close} The connection with the server remains open until closed by the subroutine: @@ -160,8 +160,8 @@ void bnet\_close(BSOCK *sock) \subsection*{Becoming a Server} -\index{Server!Becoming a } -\index{Becoming a Server } +\index{Server!Becoming a} +\index{Becoming a Server} \addcontentsline{toc}{subsection}{Becoming a Server} The bnet\_open() and bnet\_close() routines described above are used on the @@ -172,8 +172,8 @@ each daemon as examples of how to call it. \subsection*{Higher Level Conventions} -\index{Conventions!Higher Level } -\index{Higher Level Conventions } +\index{Conventions!Higher Level} +\index{Higher Level Conventions} \addcontentsline{toc}{subsection}{Higher Level Conventions} Within Bacula, we have established the convention that any time a single Index: regression.tex =================================================================== RCS file: /cvsroot/bacula/docs/developers/regression.tex,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- regression.tex 13 May 2005 17:22:42 -0000 1.1.1.1 +++ regression.tex 28 Oct 2005 09:54:21 -0000 1.2 @@ -3,12 +3,12 @@ \section*{Bacula Regression Testing} \label{_ChapterStart8} -\index{Testing!Bacula Regression } -\index{Bacula Regression Testing } +\index{Testing!Bacula Regression} +\index{Bacula Regression Testing} \addcontentsline{toc}{section}{Bacula Regression Testing} \subsection*{General} -\index{General } +\index{General} \addcontentsline{toc}{subsection}{General} This document is intended mostly for developers who wish to ensure that their @@ -21,8 +21,8 @@ discuss: 1. Running the Regression Script, 2. Writing a Regression test. \subsection*{Running the Regression Script} -\index{Running the Regression Script } -\index{Script!Running the Regression } +\index{Running the Regression Script} +\index{Script!Running the Regression} \addcontentsline{toc}{subsection}{Running the Regression Script} There are a number of different tests that may be run, such as: the standard @@ -31,8 +31,8 @@ To date, each subset of tests runs no more than about 15 minutes. \subsubsection*{Setting the Configuration Parameters} -\index{Setting the Configuration Parameters } -\index{Parameters!Setting the Configuration } +\index{Setting the Configuration Parameters} +\index{Parameters!Setting the Configuration} \addcontentsline{toc}{subsubsection}{Setting the Configuration Parameters} Once you have the regression directory loaded, you will first need to create a @@ -45,21 +45,34 @@ \begin{verbatim} # Where to get the source to be tested +# BACULA_SOURCE="${HOME}/bacula/branch-1.36.2" BACULA_SOURCE="${HOME}/bacula/k" - -# Where to send email !!!! Change me !!!!!!! -EMAIL=you...@do... - -# Full path where to find sqlite -DEPKGS="${HOME}/bacula/depkgs/sqlite" - + +# Where to send email !!!!! Change me !!!!!!! +EMAIL=ke...@si... +SMTP_HOST="localhost" + +# Full "default" path where to find sqlite (no quotes!) +#SQLITE_DIR=${HOME}/bacula/depkgs/sqlite3 +SQLITE_DIR=${HOME}/bacula/depkgs/sqlite + TAPE_DRIVE="/dev/nst0" -# if you don't have an autochanger set -# AUTOCHANGER to /dev/null +# if you don't have an autochanger set AUTOCHANGER to /dev/null AUTOCHANGER="/dev/sg0" -# This must be the path to the autochanger -# including its name -AUTOCHANGER_PATH="/bin/mtx" +# For two drive tests -- set to /dev/null if you do not have it +TAPE_DRIVE1="/dev/nst1" + +# This must be the path to the autochanger including its name +AUTOCHANGER_PATH="/usr/sbin/mtx" + +# Set your database here +#SQLITE_DIR=${HOME}/bacula/depkgs/sqlite3 +WHICHDB?="--with-sqlite=${SQLITE_DIR}" +#WHICHDB="--with-mysql=${HOME}/mysql" + +# Set this to "--with-tcp-wrappers" or "--without-tcp-wrappers" +TCPWRAPPERS="--with-tcp-wrappers" + \end{verbatim} \normalsize @@ -70,25 +83,38 @@ \item {\bf EMAIL} should be your email addres. Please remember to change this or I will get a flood of unwanted messages. You may or may not want to see these emails. In my case, I don't need them so I direct it to the bit bucket. +\item {\bf SMTP_HOST} defines where your SMTP server is. \item {\bf SQLITE\_DIR} should be the full path to the sqlite package, must be build before running a Bacula regression, if you are using SQLite. This variable is ignored if you are using MySQL or PostgreSQL. To use PostgreSQL, edit the Makefile and change (or add) WHICHDB?=``\verb{--{with-postgresql''. For MySQL use ``WHICHDB?=''\verb{--{with-mysql``. + \item {\bf TAPE\_DRIVE} is the full path to your tape drive. The base set of regression tests do not use a tape, so this is only important if you want to run the full tests. + +\item {\bf TAPE\_DRIVE1} is the full path to your second tape drive, if + have one. The base set of + regression tests do not use a tape, so this is only important if you want to + run the full two drive tests. + \item {\bf AUTOCHANGER} is the name of your autochanger device. Set this to /dev/null if you do not have one. + \item {\bf AUTOCHANGER\_PATH} is the full path including the program name for your autochanger program (normally {\bf mtx}. Leave the default value if you do not have one. + +\item {\bf TCPWRAPPERS} defines whether or not you want the ./configure + to be performed with tcpwrappers enabled. + \end{itemize} \subsubsection*{Building the Test Bacula} -\index{Building the Test Bacula } -\index{Bacula!Building the Test } +\index{Building the Test Bacula} +\index{Bacula!Building the Test} \addcontentsline{toc}{subsubsection}{Building the Test Bacula} Once the above variables are set, you can build Bacula by entering: @@ -107,8 +133,8 @@ continuing. \subsubsection*{Running the Disk Only Regression} -\index{Regression!Running the Disk Only } -\index{Running the Disk Only Regression } +\index{Regression!Running the Disk Only} +\index{Running the Disk Only Regression} \addcontentsline{toc}{subsubsection}{Running the Disk Only Regression} Once Bacula is built, you can run the basic disk only non-root regression test @@ -176,8 +202,8 @@ that it does not intefere with a production system. \subsubsection*{Other Tests} -\index{Other Tests } -\index{Tests!Other } +\index{Other Tests} +\index{Tests!Other} \addcontentsline{toc}{subsubsection}{Other Tests} There are a number of other tests that can be run as well. All the tests are a @@ -187,34 +213,34 @@ \begin{description} \item [all\_non-root-tests] - \index{all\_non-root-tests } + \index{all\_non-root-tests} All non-tape tests not requiring root. This is the standard set of tests, that in general, backup some data, then restore it, and finally compares the restored data with the original data. \item [all-root-tests] - \index{all-root-tests } + \index{all-root-tests} All non-tape tests requiring root permission. These are a relatively small number of tests that require running as root. The amount of data backed up can be quite large. For example, one test backs up /usr, another backs up /etc. One or more of these tests reports an error -- I'll fix it one day. \item [all-non-root-tape-tests] - \index{all-non-root-tape-tests } + \index{all-non-root-tape-tests} All tape test not requiring root. There are currently three tests, all run without being root, and backup to a tape. The first two tests use one volume, and the third test requires an autochanger, and uses two volumes. If you don't have an autochanger, then this script will probably produce an error. \item [all-tape-and-file-tests] - \index{all-tape-and-file-tests } + \index{all-tape-and-file-tests} All tape and file tests not requiring root. This includes just about everything, and I don't run it very often. \end{description} \subsubsection*{If a Test Fails} -\index{Fails!If a Test } -\index{If a Test Fails } +\index{Fails!If a Test} +\index{If a Test Fails} \addcontentsline{toc}{subsubsection}{If a Test Fails} If you one or more tests fail, the line output will be similar to: @@ -240,8 +266,8 @@ {\bf bacula}, {\bf bconsole}, or {\bf diff} lines, but this is rare. \subsection*{Writing a Regression Test} -\index{Test!Writing a Regression } -\index{Writing a Regression Test } +\index{Test!Writing a Regression} +\index{Writing a Regression Test} \addcontentsline{toc}{subsection}{Writing a Regression Test} Any developer, who implements a major new feature, should write a regression @@ -250,8 +276,8 @@ database, starts Bacula, then runs the test by using the console program. \subsubsection*{Running the Tests by Hand} -\index{Hand!Running the Tests by } -\index{Running the Tests by Hand } +\index{Hand!Running the Tests by} +\index{Running the Tests by Hand} \addcontentsline{toc}{subsubsection}{Running the Tests by Hand} You can run any individual test by hand by cd'ing to the {\bf regress} @@ -264,8 +290,8 @@ \normalsize \subsubsection*{Directory Structure} -\index{Structure!Directory } -\index{Directory Structure } +\index{Structure!Directory} +\index{Directory Structure} \addcontentsline{toc}{subsubsection}{Directory Structure} The directory structure of the regression tests is: @@ -291,8 +317,8 @@ \normalsize \subsubsection*{Adding a New Test} -\index{Adding a New Test } -\index{Test!Adding a New } +\index{Adding a New Test} +\index{Test!Adding a New} \addcontentsline{toc}{subsubsection}{Adding a New Test} If you want to write a new regression test, it is best to start with one of Index: porting.tex =================================================================== RCS file: /cvsroot/bacula/docs/developers/porting.tex,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- porting.tex 13 May 2005 17:22:41 -0000 1.1.1.1 +++ porting.tex 28 Oct 2005 09:54:21 -0000 1.2 @@ -3,8 +3,8 @@ \section*{Bacula Porting Notes} \label{_ChapterStart1} -\index{Notes!Bacula Porting } -\index{Bacula Porting Notes } +\index{Notes!Bacula Porting} +\index{Bacula Porting Notes} \addcontentsline{toc}{section}{Bacula Porting Notes} This document is intended mostly for developers who wish to port Bacula to a @@ -16,8 +16,8 @@ them. \subsection*{Porting Requirements} -\index{Requirements!Porting } -\index{Porting Requirements } +\index{Requirements!Porting} +\index{Porting Requirements} \addcontentsline{toc}{subsection}{Porting Requirements} In General, the following holds true: @@ -49,8 +49,8 @@ \end{itemize} \subsection*{Steps to Take for Porting} -\index{Porting!Steps to Take for } -\index{Steps to Take for Porting } +\index{Porting!Steps to Take for} +\index{Steps to Take for Porting} \addcontentsline{toc}{subsection}{Steps to Take for Porting} \begin{itemize} Index: tls-techdoc.tex =================================================================== RCS file: /cvsroot/bacula/docs/developers/tls-techdoc.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- tls-techdoc.tex 21 Jul 2005 14:54:13 -0000 1.2 +++ tls-techdoc.tex 28 Oct 2005 09:54:21 -0000 1.3 @@ -17,10 +17,11 @@ \addcontentsline{toc}{subsection}{TLS Introduction} This patch includes all the back-end code necessary to add complete TLS -support to Bacula. In addition, support for TLS in Console/Director -communications has been added as a proof of concept. Adding support for -the remaining daemons will be straight-forward. Supported features of this -patchset include: +data encryption support to Bacula. In addition, support for TLS in +Console/Director communications has been added as a proof of concept. +Adding support for the remaining daemons will be straight-forward. +Supported features of this patchset include: + \begin{itemize} \item Client/Server TLS Requirement Negotiation \item TLSv1 Connections with Server and Client Certificate @@ -44,10 +45,6 @@ \emph{src/lib/tls.c} to facilitate the support of alternative TLS implementations. -I have submitted the code in \emph{src/lib/tls.c} under the 3 clause BSD -license. I prefer the stronger warranty disclaimer of an actual license, -but I'm also willing to provide access to the code under the public domain. - \subsection{New Configuration Directives} \index{TLS Configuration Directives} \index{Directives!TLS Configuration} Index: storage.tex =================================================================== RCS file: /cvsroot/bacula/docs/developers/storage.tex,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- storage.tex 13 May 2005 17:22:41 -0000 1.1.1.1 +++ storage.tex 28 Oct 2005 09:54:21 -0000 1.2 @@ -12,6 +12,8 @@ system administrators that want or need to know more of the working details of {\bf Bacula}. +This document is somewhat out of date. + \subsection*{SD Design Introduction} \index{Introduction!SD Design } \index{SD Design Introduction } Index: mempool.tex =================================================================== RCS file: /cvsroot/bacula/docs/developers/mempool.tex,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- mempool.tex 13 May 2005 17:22:42 -0000 1.1.1.1 +++ mempool.tex 28 Oct 2005 09:54:21 -0000 1.2 @@ -3,12 +3,12 @@ \section*{Bacula Memory Management} \label{_ChapterStart7} -\index{Management!Bacula Memory } -\index{Bacula Memory Management } +\index{Management!Bacula Memory} +\index{Bacula Memory Management} \addcontentsline{toc}{section}{Bacula Memory Management} \subsection*{General} -\index{General } +\index{General} \addcontentsline{toc}{subsection}{General} This document describes the memory management routines that are used in Bacula @@ -29,8 +29,8 @@ \end{itemize} \subsubsection*{Statically Allocated Memory} -\index{Statically Allocated Memory } -\index{Memory!Statically Allocated } +\index{Statically Allocated Memory} +\index{Memory!Statically Allocated} \addcontentsline{toc}{subsubsection}{Statically Allocated Memory} Statically allocated memory is of the form: @@ -49,8 +49,8 @@ value. \subsubsection*{Dynamically Allocated Memory} -\index{Dynamically Allocated Memory } -\index{Memory!Dynamically Allocated } +\index{Dynamically Allocated Memory} +\index{Memory!Dynamically Allocated} \addcontentsline{toc}{subsubsection}{Dynamically Allocated Memory} Dynamically allocated memory is obtained using the standard malloc() routines. @@ -81,8 +81,8 @@ termination of the program will be reported as Orphaned memory. \subsubsection*{Pooled and Non-pooled Memory} -\index{Memory!Pooled and Non-pooled } -\index{Pooled and Non-pooled Memory } +\index{Memory!Pooled and Non-pooled} +\index{Pooled and Non-pooled Memory} \addcontentsline{toc}{subsubsection}{Pooled and Non-pooled Memory} In order to facility the handling of arbitrary length filenames and to Index: mediaformat.tex =================================================================== RCS file: /cvsroot/bacula/docs/developers/mediaformat.tex,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- mediaformat.tex 13 May 2005 17:22:42 -0000 1.1.1.1 +++ mediaformat.tex 28 Oct 2005 09:54:21 -0000 1.2 @@ -3,12 +3,12 @@ \section*{Storage Media Output Format} \label{_ChapterStart9} -\index{Format!Storage Media Output } -\index{Storage Media Output Format } +\index{Format!Storage Media Output} +\index{Storage Media Output Format} \addcontentsline{toc}{section}{Storage Media Output Format} \subsection*{General} -\index{General } +\index{General} \addcontentsline{toc}{subsection}{General} This document describes the media format written by the Storage daemon. The @@ -22,13 +22,13 @@ Bacula}. \subsection*{Definitions} -\index{Definitions } +\index{Definitions} \addcontentsline{toc}{subsection}{Definitions} \begin{description} \item [Block] - \index{Block } + \index{Block} A block represents the primitive unit of information that the Storage daemon reads and writes to a physical device. Normally, for a tape device, it will be the same as a tape block. The Storage daemon always reads and writes @@ -49,14 +49,14 @@ block, less data is written to the Volume for each job. \item [Record] - \index{Record } + \index{Record} A record consists of a Record Header, which is managed by the Storage daemon and Record Data, which is the data received from the Client. A record is the primitive unit of information sent to and from the Storage daemon by the Client (File daemon) programs. The details are described below. \item [JobId] - \index{JobId } + \index{JobId} A number assigned by the Director daemon for a particular job. This number will be unique for that particular Director (Catalog). The daemons use this number to keep track of individual jobs. Within the Storage daemon, the JobId @@ -64,19 +64,19 @@ simultaneously. \item [Session] - \index{Session } + \index{Session} A Session is a concept used in the Storage daemon corresponds one to one to a Job with the exception that each session is uniquely identified within the Storage daemon by a unique SessionId/SessionTime pair (see below). \item [VolSessionId] - \index{VolSessionId } + \index{VolSessionId} A unique number assigned by the Storage daemon to a particular session (Job) it is having with a File daemon. This number by itself is not unique to the given Volume, but with the VolSessionTime, it is unique. \item [VolSessionTime] - \index{VolSessionTime } + \index{VolSessionTime} A unique number assigned by the Storage daemon to a particular Storage daemon execution. It is actually the Unix time\_t value of when the Storage daemon began execution cast to a 32 bit unsigned integer. The combination of the @@ -84,7 +84,7 @@ guaranteed to be unique for each Job (or session). \item [FileIndex] - \index{FileIndex } + \index{FileIndex} A sequential number beginning at one assigned by the File daemon to the files within a job that are sent to the Storage daemon for backup. The Storage daemon ensures that this number is greater than zero and sequential. Note, @@ -94,7 +94,7 @@ for a single file written to a Volume. \item [Stream] - \index{Stream } + \index{Stream} While writing the information for any particular file to the Volume, there can be any number of distinct pieces of information about that file, e.g. the attributes, the file data, ... The Stream indicates what piece of data it @@ -106,7 +106,7 @@ or in multiple records. \item [Block Header] - \index{Block Header } + \index{Block Header} A block header consists of a block identification (``BB02''), a block length in bytes (typically 64,512) a checksum, and sequential block number. Each block starts with a Block Header and is followed by Records. Current block @@ -114,7 +114,7 @@ written to that block. \item [Record Header] - \index{Record Header } + \index{Record Header} A record header contains the Volume Session Id, the Volume Session Time, the FileIndex, the Stream, and the size of the data record which follows. The Record Header is always immediately followed by a Data Record if the size @@ -125,21 +125,21 @@ have those fields for convenience. \item [Data Record] - \index{Data Record } + \index{Data Record} A data record consists of a binary stream of bytes and is always preceded by a Record Header. The details of the meaning of the binary stream of bytes are unknown to the Storage daemon, but the Client programs (File daemon) defines and thus knows the details of each record type. \item [Volume Label] - \index{Volume Label } + \index{Volume Label} A label placed by the Storage daemon at the beginning of each storage volume. It contains general information about the volume. It is written in Record format. The Storage daemon manages Volume Labels, and if the client wants, he may also read them. \item [Begin Session Label] - \index{Begin Session Label } + \index{Begin Session Label} The Begin Session Label is a special record placed by the Storage daemon on the storage medium as the first record of an append session job with a File daemon. This record is useful for finding the beginning of a particular @@ -149,7 +149,7 @@ that it contains additional information pertaining to the Session. \item [End Session Label] - \index{End Session Label } + \index{End Session Label} The End Session Label is a special record placed by the Storage daemon on the storage medium as the last record of an append session job with a File daemon. The End Session Record is distinguished by a FileIndex with a value @@ -162,8 +162,8 @@ \end{description} \subsection*{Storage Daemon File Output Format} -\index{Format!Storage Daemon File Output } -\index{Storage Daemon File Output Format } +\index{Format!Storage Daemon File Output} +\index{Storage Daemon File Output Format} \addcontentsline{toc}{subsection}{Storage Daemon File Output Format} The file storage and tape storage formats are identical except that tape @@ -176,8 +176,8 @@ Sessions written to file are simply appended to the end of the file. \subsection*{Overall Format} -\index{Format!Overall } -\index{Overall Format } +\index{Format!Overall} +\index{Overall Format} \addcontentsline{toc}{subsection}{Overall Format} A Bacula output file consists of Blocks of data. Each block contains a block @@ -209,7 +209,7 @@ ensure that no block is missing or duplicated. \subsection*{Serialization} -\index{Serialization } +\index{Serialization} \addcontentsline{toc}{subsection}{Serialization} All Block Headers, Record Headers, and Label Records are written using @@ -217,8 +217,8 @@ written to the output volume in a machine independent format. \subsection*{Block Header} -\index{Header!Block } -\index{Block Header } +\index{Header!Block} +\index{Block Header} \addcontentsline{toc}{subsection}{Block Header} The format of the Block Header (version 1.27 and later) is: @@ -245,8 +245,8 @@ \subsection*{Record Header} -\index{Header!Record } -\index{Record Header } +\index{Header!Record} +\index{Record Header} \addcontentsline{toc}{subsection}{Record Header} Each binary data record is preceded by a Record Header. The Record Header is @@ -273,20 +273,20 @@ \begin{description} \item [The {\bf VolSessionId} ] - \index{VolSessionId } + \index{VolSessionId} is a unique sequential number that is assigned by the Storage Daemon to a particular Job. This number is sequential since the start of execution of the daemon. \item [The {\bf VolSessionTime} ] - \index{VolSessionTime } + \index{VolSessionTime} is the time/date that the current execution of the Storage Daemon started. It assures that the combination of VolSessionId and VolSessionTime is unique for every jobs written to the tape, even if there was a machine crash between two writes. \item [The {\bf FileIndex} ] - \index{FileIndex } + \index{FileIndex} is a sequential file number within a job. The Storage daemon requires this index to be greater than zero and sequential. Note, however, that the File daemon may send multiple Streams for the same FileIndex. In addition, the @@ -294,7 +294,7 @@ End Session Label, and the End of Volume Label. \item [The {\bf Stream} ] - \index{Stream } + \index{Stream} is defined by the File daemon and is used to identify separate parts of the data saved for each file (Unix attributes, Win32 attributes, file data, compressed file data, sparse file data, ...). The Storage Daemon has no idea @@ -309,24 +309,28 @@ \footnotesize \begin{verbatim} -STREAM_UNIX_ATTRIBUTES 1 /* Generic Unix attributes */ -STREAM_FILE_DATA 2 /* Standard uncompressed data */ -STREAM_MD5_SIGNATURE 3 /* MD5 signature for the file */ -STREAM_GZIP_DATA 4 /* GZip compressed file data */ -STREAM_WIN32_ATTRIBUTES 5 /* Windows attributes (superset of Unix) */ -STREAM_SPARSE_DATA 6 /* Sparse data stream */ -STREAM_SPARSE_GZIP_DATA 7 /* Sparse data stream compressed by GZIP */ -STREAM_PROGRAM_NAMES 8 /* program names for program data */ -STREAM_PROGRAM_DATA 9 /* Data needing program */ -STREAM_SHA1_SIGNATURE 10 /* SHA1 signature for the file */ -STREAM_WIN32_DATA 11 /* Win32 BackupRead data */ -STREAM_WIN32_GZIP_DATA 12 /* Gzipped Win32 BackupRead data */ - +#define STREAM_UNIX_ATTRIBUTES 1 /* Generic Unix attributes */ +#define STREAM_FILE_DATA 2 /* Standard uncompressed data */ +#define STREAM_MD5_SIGNATURE 3 /* MD5 signature for the file */ +#define STREAM_GZIP_DATA 4 /* GZip compressed file data */ +/* Extended Unix attributes with Win32 Extended data. Deprecated. */ +#define STREAM_UNIX_ATTRIBUTES_EX 5 /* Extended Unix attr for Win32 EX */ +#define STREAM_SPARSE_DATA 6 /* Sparse data stream */ +#define STREAM_SPARSE_GZIP_DATA 7 +#define STREAM_PROGRAM_NAMES 8 /* program names for program data */ +#define STREAM_PROGRAM_DATA 9 /* Data needing program */ +#define STREAM_SHA1_SIGNATURE 10 /* SHA1 signature for the file */ +#define STREAM_WIN32_DATA 11 /* Win32 BackupRead data */ +#define STREAM_WIN32_GZIP_DATA 12 /* Gzipped Win32 BackupRead data */ +#define STREAM_MACOS_FORK_DATA 13 /* Mac resource fork */ +#define STREAM_HFSPLUS_ATTRIBUTES 14 /* Mac OS extra attributes */ +#define STREAM_UNIX_ATTRIBUTES_ACCESS_ACL 15 /* Standard ACL attributes on UNIX */ +#define STREAM_UNIX_ATTRIBUTES_DEFAULT_ACL 16 /* Default ACL attributes on UNIX */ \end{verbatim} \normalsize \item [The {\bf DataSize} ] - \index{DataSize } + \index{DataSize} is the size in bytes of the binary data record that follows the Session Record header. The Storage Daemon has no idea of the actual contents of the binary data record. For standard Unix files, the data record typically @@ -346,8 +350,8 @@ record. \subsection*{Version BB02 Block Header} -\index{Version BB02 Block Header } -\index{Header!Version BB02 Block } +\index{Version BB02 Block Header} +\index{Header!Version BB02 Block} \addcontentsline{toc}{subsection}{Version BB02 Block Header} Each session or Job has its own private block. As a consequence, the SessionId @@ -375,8 +379,8 @@ routines and thus is guaranteed to be in machine independent format. \subsection*{Version 2 Record Header} -\index{Version 2 Record Header } -\index{Header!Version 2 Record } +\index{Version 2 Record Header} +\index{Header!Version 2 Record} \addcontentsline{toc}{subsection}{Version 2 Record Header} Version 2 Record Header is written to the medium when using Version BB02 Block @@ -390,8 +394,8 @@ Header. \subsection*{Volume Label Format} -\index{Volume Label Format } -\index{Format!Volume Label } +\index{Volume Label Format} +\index{Format!Volume Label} \addcontentsline{toc}{subsection}{Volume Label Format} Tape volume labels are created by the Storage daemon in response to a {\bf @@ -429,8 +433,8 @@ appear in the data part of the record. \subsection*{Session Label} -\index{Label!Session } -\index{Session Label } +\index{Label!Session} +\index{Session Label} \addcontentsline{toc}{subsection}{Session Label} The Session Label is written at the beginning and end of each session as well @@ -492,8 +496,8 @@ data in many cases. \subsection*{Overall Storage Format} -\index{Format!Overall Storage } -\index{Overall Storage Format } +\index{Format!Overall Storage} +\index{Overall Storage Format} \addcontentsline{toc}{subsection}{Overall Storage Format} \footnotesize @@ -726,8 +730,8 @@ \normalsize \subsection*{Unix File Attributes} -\index{Unix File Attributes } -\index{Attributes!Unix File } +\index{Unix File Attributes} +\index{Attributes!Unix File} \addcontentsline{toc}{subsection}{Unix File Attributes} The Unix File Attributes packet consists of the following: @@ -742,11 +746,11 @@ represents a byte containing a binary zero. \item [FileIndex] - \index{FileIndex } + \index{FileIndex} is the sequential file index starting from one assigned by the File daemon. \item [Type] - \index{Type } + \index{Type} is one of the following: \footnotesize @@ -772,24 +776,24 @@ \normalsize \item [Filename] - \index{Filename } + \index{Filename} is the fully qualified filename. \item [File-Attributes] - \index{File-Attributes } + \index{File-Attributes} consists of the 13 fields of the stat() buffer in ASCII base64 format separated by spaces. These fields and their meanings are shown below. This stat() packet is in Unix format, and MUST be provided (constructed) for ALL systems. \item [Link] - \index{Link } + \index{Link} when the FT code is FT\_LNK or FT\_LNKSAVED, the item in question is a Unix link, and this field contains the fully qualified link name. When the FT code is not FT\_LNK or FT\_LNKSAVED, this field is null. \item [Extended-Attributes] - \index{Extended-Attributes } + \index{Extended-Attributes} The exact format of this field is operating system dependent. It contains additional or extended attributes of a system dependent nature. Currently, this field is used only on WIN32 systems where it contains a ASCII base64 @@ -803,55 +807,55 @@ \addcontentsline{lot}{table}{File Attributes} \begin{longtable}{|p{0.6in}|p{0.7in}|p{1in}|p{1in}|p{1.4in}|} \hline -\multicolumn{1}{|c| }{\bf Field No. } & \multicolumn{1}{c| }{\bf Stat Name } -& \multicolumn{1}{c| }{\bf Unix } & \multicolumn{1}{c| }{\bf Win98/NT } & -\multicolumn{1}{c| }{\bf MacOS } \\ +\multicolumn{1}{|c|}{\bf Field No. } & \multicolumn{1}{c|}{\bf Stat Name } +& \multicolumn{1}{c|}{\bf Unix } & \multicolumn{1}{c|}{\bf Win98/NT } & +\multicolumn{1}{c|}{\bf MacOS } \\ \hline -\multicolumn{1}{|c| }{1 } & {st\_dev } & {Device number of filesystem } & -{Drive number } & {vRefNum } \\ +\multicolumn{1}{|c|}{1 } & {st\_dev } & {Device number of filesystem } & +{Drive number } & {vRefNum } \\ \hline -\multicolumn{1}{|c| }{2 } & {st\_ino } & {Inode number } & {Always 0 } & -{fileID/dirID } \\ +\multicolumn{1}{|c|}{2 } & {st\_ino } & {Inode number } & {Always 0 } & +{fileID/dirID } \\ \hline -\multicolumn{1}{|c| }{3 } & {st\_mode } & {File mode } & {File mode } & -{777 dirs/apps; 666 docs; 444 locked docs } \\ +\multicolumn{1}{|c|}{3 } & {st\_mode } & {File mode } & {File mode } & +{777 dirs/apps; 666 docs; 444 locked docs } \\ \hline -\multicolumn{1}{|c| }{4 } & {st\_nlink } & {Number of links to the file } & -{Number of link (only on NTFS) } & {Always 1 } \\ +\multicolumn{1}{|c|}{4 } & {st\_nlink } & {Number of links to the file } & +{Number of link (only on NTFS) } & {Always 1 } \\ \hline -\multicolumn{1}{|c| }{5 } & {st\_uid } & {Owner ID } & {Always 0 } & -{Always 0 } \\ +\multicolumn{1}{|c|}{5 } & {st\_uid } & {Owner ID } & {Always 0 } & +{Always 0 } \\ \hline -\multicolumn{1}{|c| }{6 } & {st\_gid } & {Group ID } & {Always 0 } & -{Always 0 } \\ +\multicolumn{1}{|c|}{6 } & {st\_gid } & {Group ID } & {Always 0 } & +{Always 0 } \\ \hline -\multicolumn{1}{|c| }{7 } & {st\_rdev } & {Device ID for special files } & -{Drive No. } & {Always 0 } \\ +\multicolumn{1}{|c|}{7 } & {st\_rdev } & {Device ID for special files } & +{Drive No. } & {Always 0 } \\ \hline -\multicolumn{1}{|c| }{8 } & {st\_size } & {File size in bytes } & {File -size in bytes } & {Data fork file size in bytes } \\ +\multicolumn{1}{|c|}{8 } & {st\_size } & {File size in bytes } & {File +size in bytes } & {Data fork file size in bytes } \\ \hline -\multicolumn{1}{|c| }{9 } & {st\_blksize } & {Preferred block size } & -{Always 0 } & {Preferred block size } \\ +\multicolumn{1}{|c|}{9 } & {st\_blksize } & {Preferred block size } & +{Always 0 } & {Preferred block size } \\ \hline -\multicolumn{1}{|c| }{10 } & {st\_blocks } & {Number of blocks allocated } -& {Always 0 } & {Number of blocks allocated } \\ +\multicolumn{1}{|c|}{10 } & {st\_blocks } & {Number of blocks allocated } +& {Always 0 } & {Number of blocks allocated } \\ \hline -\multicolumn{1}{|c| }{11 } & {st\_atime } & {Last access time since epoch } -& {Last access time since epoch } & {Last access time -66 years } \\ +\multicolumn{1}{|c|}{11 } & {st\_atime } & {Last access time since epoch } +& {Last access time since epoch } & {Last access time -66 years } \\ \hline -\multicolumn{1}{|c| }{12 } & {st\_mtime } & {Last modify time since epoch } -& {Last modify time since epoch } & {Last access time -66 years } \\ +\multicolumn{1}{|c|}{12 } & {st\_mtime } & {Last modify time since epoch } +& {Last modify time since epoch } & {Last access time -66 years } \\ \hline -\multicolumn{1}{|c| }{13 } & {st\_ctime } & {Inode change time since epoch -} & {File create time since epoch } & {File create time -66 years } +\multicolumn{1}{|c|}{13 } & {st\_ctime } & {Inode change time since epoch +} & {File create time since epoch } & {File create time -66 years} \\ \hline \end{longtable} \subsection*{Old Depreciated Tape Format} -\index{Old Depreciated Tape Format } -\index{Format!Old Depreciated Tape } +\index{Old Depreciated Tape Format} +\index{Format!Old Depreciated Tape} \addcontentsline{toc}{subsection}{Old Depreciated Tape Format} The format of the Block Header (version 1.26 and earlier) is: |