\hline
{LStat } & {tinyblob } & {File attributes in base64 encoding } \\
\hline
-{MD5 } & {tinyblob } & {MD5 signature in base64 encoding }
+{MD5 } & {tinyblob } & {MD5/SHA1 signature in base64 encoding }
\\ \hline
\end{longtable}
\hline
{EndTime } & {datetime } & {Time/date when Job ended } \\
\hline
+{RealEndTime } & {datetime } & {Time/date when original Job ended } \\
+ \hline
{JobTDate } & {bigint } & {Start day in Unix format but 64 bits; used for
Retention period. } \\
\hline
\hline
{FileSetId } & {integer } & {Link to FileSet Record } \\
\hline
+{PrioJobId } & {integer } & {Link to prior Job Record when migrated } \\
+ \hline
{PurgedFiles } & {tiny integer } & {Set when all File records purged } \\
\hline
{HasBase } & {tiny integer } & {Set when Base Job run }
\hline
{B } & {Backup Job } \\
\hline
+{M } & {Migrated Job } \\
+ \hline
{V } & {Verify Job } \\
\hline
{R } & {Restore Job } \\
\hline
{C } & {Console program (not in database) } \\
\hline
+{I } & {Internal or system Job } \\
+ \hline
{D } & {Admin Job } \\
\hline
{A } & {Archive Job (not implemented) }
\\ \hline
+{C } & {Copy Job } \\
+ \hline
+{M } & {Migration Job } \\
+ \hline
\end{longtable}
+Note, the Job Type values noted above are not kept in an SQL table.
+
The JobStatus field specifies how the job terminated, and can be one of the
following:
\hline
{T } & {Terminated normally } \\
\hline
+{W } & {Terminated normally with warnings }
+\\ \hline
{E } & {Terminated in Error } \\
\hline
{e } & {Non-fatal error } \\
\hline
{A } & {Canceled by the user } \\
\hline
+{I } & {Incomplete Job }
+\\ \hline
{F } & {Waiting on the File daemon } \\
\hline
{S } & {Waiting on the Storage daemon } \\
\hline
{p } & {Waiting for higher priority job to finish }
\\ \hline
+{i } & {Doing batch insert file records }
+\\ \hline
+{a } & {SD despooling attributes }
+\\ \hline
+{l } & {Doing data despooling }
+\\ \hline
+{L } & {Committing data (last despool) }
+\\ \hline
-\end{longtable}
-\
+
+\end{longtable}
\addcontentsline{lot}{table}{File Sets Table Layout}
\begin{longtable}{|l|l|l|}
file or adds a file, we need to ensure that a Full backup is done prior to the
next incremental.
-\
\addcontentsline{lot}{table}{JobMedia Table Layout}
\begin{longtable}{|l|l|p{2.5in}|}
-\
\addcontentsline{lot}{table}{Media Table Layout}
\begin{longtable}{|l|l|p{2.4in}|}
\hline
{MediaType } & {tinyblob } & {The MediaType supplied by the user } \\
\hline
+{MediaTypeId } & {integer } & {The MediaTypeId } \\
+ \hline
+{LabelType } & {tinyint } & {The type of label on the Volume } \\
+ \hline
{FirstWritten } & {datetime } & {Time/date when first written } \\
\hline
{LastWritten } & {datetime } & {Time/date when last written } \\
\hline
{VolBytes } & {bigint } & {Number of bytes saved in Job } \\
\hline
+{VolParts } & {integer } & {The number of parts for a Volume (DVD) } \\
+ \hline
{VolErrors } & {integer } & {Number of errors during Job } \\
\hline
{VolWrites } & {integer } & {Number of writes to media } \\
{VolStatus } & {enum } & {Status of media: Full, Archive, Append, Recycle,
Read-Only, Disabled, Error, Busy } \\
\hline
+{Enabled } {tinyint } & {Whether or not Volume can be written } \\
+ \hline
{Recycle } & {tinyint } & {Whether or not Bacula can recycle the Volumes:
Yes, No } \\
\hline
+{ActionOnPurge } & {tinyint } & {What happens to a Volume after purging } \\
+ \hline
{VolRetention } & {bigint } & {64 bit seconds until expiration } \\
\hline
{VolUseDuration } & {bigint } & {64 bit seconds volume can be used } \\
\hline
{MaxVolFiles } & {integer } & {maximume EOF marks to put on Volume }
\\ \hline
+{InChanger } & {tinyint } & {Whether or not Volume in autochanger } \\
+ \hline
+{StorageId } & {integer } & {Storage record ID } \\
+ \hline
+{DeviceId } & {integer } & {Device record ID } \\
+ \hline
+{MediaAddressing } & {integer } & {Method of addressing media } \\
+ \hline
+{VolReadTime } & {bigint } & {Time Reading Volume } \\
+ \hline
+{VolWriteTime } & {bigint } & {Time Writing Volume } \\
+ \hline
+{EndFile } & {integer } & {End File number of Volume } \\
+ \hline
+{EndBlock } & {integer } & {End block number of Volume } \\
+ \hline
+{LocationId } & {integer } & {Location record ID } \\
+ \hline
+{RecycleCount } & {integer } & {Number of times recycled } \\
+ \hline
+{InitialWrite } & {datetime } & {When Volume first written } \\
+ \hline
+{ScratchPoolId } & {integer } & {Id of Scratch Pool } \\
+ \hline
+{RecyclePoolId } & {integer } & {Pool ID where to recycle Volume } \\
+ \hline
+{Comment } & {blob } & {User text field } \\
+ \hline
+
\end{longtable}
\hline
{AutoPrune } & {tinyint } & {yes|no for autopruning } \\
\hline
-{Recycle } & {tinyint } & {yes|no for allowing auto recycling of Volume }
-\\
+{Recycle } & {tinyint } & {yes|no for allowing auto recycling of Volume } \\
+ \hline
+{ActionOnPurge } & {tinyint } & {Default Volume ActionOnPurge } \\
\hline
{PoolType } & {enum } & {Backup, Copy, Cloned, Archive, Migration } \\
\hline
+{LabelType } & {tinyint } & {Type of label ANSI/Bacula } \\
+ \hline
{LabelFormat } & {Tinyblob } & {Label format }
\\ \hline
+{Enabled } {tinyint } & {Whether or not Volume can be written } \\
+ \hline
+{ScratchPoolId } & {integer } & {Id of Scratch Pool } \\
+ \hline
+{RecyclePoolId } & {integer } & {Pool ID where to recycle Volume } \\
+ \hline
+{NextPoolId } & {integer } & {Pool ID of next Pool } \\
+ \hline
+{MigrationHighBytes } & {bigint } & {High water mark for migration } \\
+ \hline
+{MigrationLowBytes } & {bigint } & {Low water mark for migration } \\
+ \hline
+{MigrationTime } & {bigint } & {Time before migration } \\
+ \hline
+
+
\end{longtable}
The {\bf Client} table contains one entry for each machine backed up by Bacula
in this database. Normally the Name is a fully qualified domain name.
-\
-\addcontentsline{lot}{table}{Unsaved Files Table Layout}
+\addcontentsline{lot}{table}{Storage Table Layout}
\begin{longtable}{|l|l|l|}
\hline
-\multicolumn{3}{|l| }{\bf UnsavedFiles } \\
+\multicolumn{3}{|l| }{\bf Storage } \\
\hline
\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type
} & \multicolumn{1}{c| }{\bf Remark } \\
\hline
-{UnsavedId } & {integer } & {Primary Key } \\
+{StorageId } & {integer } & {Unique Id } \\
\hline
-{JobId } & {integer } & {JobId corresponding to this record } \\
+{Name } & {tinyblob } & {Resource name of Storage device } \\
\hline
-{PathId } & {integer } & {Id of path } \\
+{AutoChanger } & {tinyint } & {Set if it is an autochanger } \\
\hline
-{FilenameId } & {integer } & {Id of filename }
-\\ \hline
\end{longtable}
-The {\bf UnsavedFiles} table contains one entry for each file that was not
-saved. Note! This record is not yet implemented.
+The {\bf Storage} table contains one entry for each Storage used.
-\
\addcontentsline{lot}{table}{Counter Table Layout}
\begin{longtable}{|l|l|l|}
The {\bf Counter} table contains one entry for each permanent counter defined
by the user.
-\
+\addcontentsline{lot}{table}{Job History Table Layout}
+\begin{longtable}{|l|l|p{2.5in}|}
+ \hline
+\multicolumn{3}{|l| }{\bf JobHisto } \\
+ \hline
+\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type
+} & \multicolumn{1}{c| }{\bf Remark } \\
+ \hline
+{JobId } & {integer } & {Primary Key } \\
+ \hline
+{Job } & {tinyblob } & {Unique Job Name } \\
+ \hline
+{Name } & {tinyblob } & {Job Name } \\
+ \hline
+{Type } & {binary(1) } & {Job Type: Backup, Copy, Clone, Archive, Migration
+} \\
+ \hline
+{Level } & {binary(1) } & {Job Level } \\
+ \hline
+{ClientId } & {integer } & {Client index } \\
+ \hline
+{JobStatus } & {binary(1) } & {Job Termination Status } \\
+ \hline
+{SchedTime } & {datetime } & {Time/date when Job scheduled } \\
+ \hline
+{StartTime } & {datetime } & {Time/date when Job started } \\
+ \hline
+{EndTime } & {datetime } & {Time/date when Job ended } \\
+ \hline
+{RealEndTime } & {datetime } & {Time/date when original Job ended } \\
+ \hline
+{JobTDate } & {bigint } & {Start day in Unix format but 64 bits; used for
+Retention period. } \\
+ \hline
+{VolSessionId } & {integer } & {Unique Volume Session ID } \\
+ \hline
+{VolSessionTime } & {integer } & {Unique Volume Session Time } \\
+ \hline
+{JobFiles } & {integer } & {Number of files saved in Job } \\
+ \hline
+{JobBytes } & {bigint } & {Number of bytes saved in Job } \\
+ \hline
+{JobErrors } & {integer } & {Number of errors during Job } \\
+ \hline
+{JobMissingFiles } & {integer } & {Number of files not saved (not yet used) }
+\\
+ \hline
+{PoolId } & {integer } & {Link to Pool Record } \\
+ \hline
+{FileSetId } & {integer } & {Link to FileSet Record } \\
+ \hline
+{PrioJobId } & {integer } & {Link to prior Job Record when migrated } \\
+ \hline
+{PurgedFiles } & {tiny integer } & {Set when all File records purged } \\
+ \hline
+{HasBase } & {tiny integer } & {Set when Base Job run }
+\\ \hline
+
+\end{longtable}
+
+The {bf JobHisto} table is the same as the Job table, but it keeps
+long term statistics (i.e. it is not pruned with the Job).
+
+
+\addcontentsline{lot}{table}{Log Table Layout}
+\begin{longtable}{|l|l|l|}
+ \hline
+\multicolumn{3}{|l| }{\bf Version } \\
+ \hline
+\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type
+} & \multicolumn{1}{c| }{\bf Remark } \\
+ \hline
+{LogIdId } & {integer } & {Primary Key }
+\\ \hline
+{JobId } & {integer } & {Points to Job record }
+\\ \hline
+{Time } & {datetime } & {Time/date log record created }
+\\ \hline
+{LogText } & {blob } & {Log text }
+\\ \hline
+
+\end{longtable}
+
+The {\bf Log} table contains a log of all Job output.
+
+\addcontentsline{lot}{table}{Location Table Layout}
+\begin{longtable}{|l|l|l|}
+ \hline
+\multicolumn{3}{|l| }{\bf Location } \\
+ \hline
+\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type
+} & \multicolumn{1}{c| }{\bf Remark } \\
+ \hline
+{LocationId } & {integer } & {Primary Key }
+\\ \hline
+{Location } & {tinyblob } & {Text defining location }
+\\ \hline
+{Cost } & {integer } & {Relative cost of obtaining Volume }
+\\ \hline
+{Enabled } & {tinyint } & {Whether or not Volume is enabled }
+\\ \hline
+
+\end{longtable}
+
+The {\bf Location} table defines where a Volume is physically.
+
+
+\addcontentsline{lot}{table}{Location Log Table Layout}
+\begin{longtable}{|l|l|l|}
+ \hline
+\multicolumn{3}{|l| }{\bf LocationLog } \\
+ \hline
+\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type
+} & \multicolumn{1}{c| }{\bf Remark } \\
+ \hline
+{locLogIdId } & {integer } & {Primary Key }
+\\ \hline
+{Date } & {datetime } & {Time/date log record created }
+\\ \hline
+{MediaId } & {integer } & {Points to Media record }
+\\ \hline
+{LocationId } & {integer } & {Points to Location record }
+\\ \hline
+{NewVolStatus } & {integer } & {enum: Full, Archive, Append, Recycle, Purged
+ Read-only, Disabled, Error, Busy, Used, Cleaning }
+\\ \hline
+{Enabled } & {tinyint } & {Whether or not Volume is enabled }
+\\ \hline
+
+
+\end{longtable}
+
+The {\bf Log} table contains a log of all Job output.
+
\addcontentsline{lot}{table}{Version Table Layout}
\begin{longtable}{|l|l|l|}
checks this number before reading the database to ensure that it is compatible
with the Bacula binary file.
-\
\addcontentsline{lot}{table}{Base Files Table Layout}
\begin{longtable}{|l|l|l|}