Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
developer guide: fixes table
Browse files Browse the repository at this point in the history
so they are displayed properly in Github and the Pandoc generated HTML.
  • Loading branch information
joergsteffens committed May 21, 2015
1 parent c5e74fe commit e682de8
Showing 1 changed file with 159 additions and 143 deletions.
302 changes: 159 additions & 143 deletions manuals/en/developers/catalog.md
Expand Up @@ -142,19 +142,20 @@ new one be created, otherwise the existing RecordId should be used.
Database Tables
---------------


--------|------------
integer | Primary Key
Blob | Filename
Data Type | Remark
----------|------------
integer | Primary Key
Blob | Filename

The <span>**Filename**</span> table shown above contains the name of
each file backed up with the path removed. If different directories or
machines contain the same filename, only one copy will be saved in this
table.

--------|------------
integer | Primary Key
Blob | Full Path
Data Type | Remark
----------|------------
integer | Primary Key
Blob | Full Path

The <span>**Path**</span> table contains shown above the path or
directory names of all directories on the system or systems. The
Expand Down Expand Up @@ -193,15 +194,16 @@ Finally, saving only the full path name rather than splitting the path
and the file, and indexing it on the first 50 characters takes 6 mins 43
seconds and creates a 7.35 MB database.

---------|---------------------------------------------
integer | Primary Key
integer | The sequential file number in the Job
integer | Link to Job Record
integer | Link to Path Record
integer | Link to Filename Record
integer | Used to mark files during Verify Jobs
tinyblob | File attributes in base64 encoding
tinyblob | MD5/SHA1 signature in base64 encoding
Data Type | Remark
----------|---------------------------------------------
integer | Primary Key
integer | The sequential file number in the Job
integer | Link to Job Record
integer | Link to Path Record
integer | Link to Filename Record
integer | Used to mark files during Verify Jobs
tinyblob | File attributes in base64 encoding
tinyblob | MD5/SHA1 signature in base64 encoding

The <span>**File**</span> table shown above contains one entry for each
file backed up by Bareos. Thus a file that is backed up multiple times
Expand All @@ -219,6 +221,7 @@ the stand point of total database size. As a consequence, the user must
take care to periodically reduce the number of File records using the
<span>**retention**</span> command in the Console program.

Data Type | Remark
------------------|------------------------------------------------------------------
integer | Primary Key
tinyblob | Unique Job Name
Expand Down Expand Up @@ -299,11 +302,12 @@ the following:
* Doing data despooling
* Committing data (last despool)

---------|------------------------------
integer | Primary Key
tinyblob | FileSet name
tinyblob | MD5 checksum of FileSet
datetime | Time and date Fileset created
Data Type | Remark
----------|------------------------------
integer | Primary Key
tinyblob | FileSet name
tinyblob | MD5 checksum of FileSet
datetime | Time and date Fileset created

The <span>**FileSet**</span> table contains one entry for each FileSet
that is used. The MD5 signature is kept to ensure that if the user
Expand All @@ -312,17 +316,18 @@ FileSet will be used. This is particularly important when doing an
incremental update. If the user deletes a file or adds a file, we need
to ensure that a Full backup is done prior to the next incremental.

--------|---------------------------------------------------------------------------------
integer | Primary Key
integer | Link to Job Record
integer | Link to Media Record
integer | The index (sequence number) of the first file written for this Job to the Media
integer | The index of the last file written for this Job to the Media
integer | The physical media (tape) file number of the first block written for this Job
integer | The physical media (tape) file number of the last block written for this Job
integer | The number of the first block written for this Job
integer | The number of the last block written for this Job
integer | The Volume use sequence number within the Job
Data Type | Remark
----------|---------------------------------------------------------------------------------
integer | Primary Key
integer | Link to Job Record
integer | Link to Media Record
integer | The index (sequence number) of the first file written for this Job to the Media
integer | The index of the last file written for this Job to the Media
integer | The physical media (tape) file number of the first block written for this Job
integer | The physical media (tape) file number of the last block written for this Job
integer | The number of the first block written for this Job
integer | The number of the last block written for this Job
integer | The Volume use sequence number within the Job

The <span>**JobMedia**</span> table contains one entry at the following:
start of the job, start of each new tape file, start of each new tape,
Expand All @@ -337,82 +342,84 @@ JobMedia records can speed it up by orders of magnitude by permitting
forward spacing files and blocks rather than reading the whole 100GB
backup.

---------|----------------------------------------
integer | Primary Key
tinyblob | Volume name
integer | Autochanger Slot number or zero
integer | Link to Pool Record
tinyblob | The MediaType supplied by the user
integer | The MediaTypeId
tinyint | The type of label on the Volume
datetime | Time/date when first written
datetime | Time/date when last written
datetime | Time/date when tape labeled
integer | Number of jobs written to this media
integer | Number of files written to this media
integer | Number of blocks written to this media
integer | Number of time media mounted
bigint | Number of bytes saved in Job
integer | The number of parts for a Volume (DVD)
integer | Number of errors during Job
integer | Number of writes to media
bigint | Maximum bytes to put on this media
bigint | Capacity estimate for this volume
enum | Status of media: Full, Archive, Append, Recycle, Read-Only, Disabled, Error, Busy
tinyint | Whether or not Volume can be written
tinyint | Whether or not Bareos can recycle the Volumes: Yes, No
tinyint | What happens to a Volume after purging
bigint | 64 bit seconds until expiration
bigint | 64 bit seconds volume can be used
integer | maximum jobs to put on Volume
integer | maximume EOF marks to put on Volume
tinyint | Whether or not Volume in autochanger
integer | Storage record ID
integer | Device record ID
integer | Method of addressing media
bigint | Time Reading Volume
bigint | Time Writing Volume
integer | End File number of Volume
integer | End block number of Volume
integer | Location record ID
integer | Number of times recycled
datetime | When Volume first written
integer | Id of Scratch Pool
integer | Pool ID where to recycle Volume
blob | User text field
Data Type | Remark
----------|----------------------------------------
integer | Primary Key
tinyblob | Volume name
integer | Autochanger Slot number or zero
integer | Link to Pool Record
tinyblob | The MediaType supplied by the user
integer | The MediaTypeId
tinyint | The type of label on the Volume
datetime | Time/date when first written
datetime | Time/date when last written
datetime | Time/date when tape labeled
integer | Number of jobs written to this media
integer | Number of files written to this media
integer | Number of blocks written to this media
integer | Number of time media mounted
bigint | Number of bytes saved in Job
integer | The number of parts for a Volume (DVD)
integer | Number of errors during Job
integer | Number of writes to media
bigint | Maximum bytes to put on this media
bigint | Capacity estimate for this volume
enum | Status of media: Full, Archive, Append, Recycle, Read-Only, Disabled, Error, Busy
tinyint | Whether or not Volume can be written
tinyint | Whether or not Bareos can recycle the Volumes: Yes, No
tinyint | What happens to a Volume after purging
bigint | 64 bit seconds until expiration
bigint | 64 bit seconds volume can be used
integer | maximum jobs to put on Volume
integer | maximume EOF marks to put on Volume
tinyint | Whether or not Volume in autochanger
integer | Storage record ID
integer | Device record ID
integer | Method of addressing media
bigint | Time Reading Volume
bigint | Time Writing Volume
integer | End File number of Volume
integer | End block number of Volume
integer | Location record ID
integer | Number of times recycled
datetime | When Volume first written
integer | Id of Scratch Pool
integer | Pool ID where to recycle Volume
blob | User text field

The <span>**Volume**</span> table (internally referred to as the Media
table) contains one entry for each volume, that is each tape, cassette
(8mm, DLT, DAT, ...), or file on which information is or was backed up.
There is one Volume record created for each of the NumVols specified in
the Pool resource record.

---------|----------------------------------------------
integer | Primary Key
Tinyblob | Pool Name
Integer | Number of Volumes in the Pool
Integer | Maximum Volumes in the Pool
tinyint | Use volume once
tinyint | Set to use catalog
tinyint | Accept any volume from Pool
bigint | 64 bit seconds to retain volume
bigint | 64 bit seconds volume can be used
integer | max jobs on volume
integer | max EOF marks to put on Volume
bigint | max bytes to write on Volume
tinyint | yes|no for autopruning
tinyint | yes|no for allowing auto recycling of Volume
tinyint | Default Volume ActionOnPurge
enum | Backup, Copy, Cloned, Archive, Migration
tinyint | Type of label ANSI/Bareos
Tinyblob | Label format
tinyint | Whether or not Volume can be written
integer | Id of Scratch Pool
integer | Pool ID where to recycle Volume
integer | Pool ID of next Pool
bigint | High water mark for migration
bigint | Low water mark for migration
bigint | Time before migration
Data Type | Remark
----------|----------------------------------------------
integer | Primary Key
Tinyblob | Pool Name
Integer | Number of Volumes in the Pool
Integer | Maximum Volumes in the Pool
tinyint | Use volume once
tinyint | Set to use catalog
tinyint | Accept any volume from Pool
bigint | 64 bit seconds to retain volume
bigint | 64 bit seconds volume can be used
integer | max jobs on volume
integer | max EOF marks to put on Volume
bigint | max bytes to write on Volume
tinyint | yes|no for autopruning
tinyint | yes|no for allowing auto recycling of Volume
tinyint | Default Volume ActionOnPurge
enum | Backup, Copy, Cloned, Archive, Migration
tinyint | Type of label ANSI/Bareos
Tinyblob | Label format
tinyint | Whether or not Volume can be written
integer | Id of Scratch Pool
integer | Pool ID where to recycle Volume
integer | Pool ID of next Pool
bigint | High water mark for migration
bigint | Low water mark for migration
bigint | Time before migration

The <span>**Pool**</span> table contains one entry for each media pool
controlled by Bareos in this database. One media record exists for each
Expand All @@ -422,36 +429,40 @@ to the MediaType specified in the Director’s Storage definition record.
The CurrentVol is the sequence number of the Media record for the
current volume.

---------|---------------------------------------
integer | Primary Key
TinyBlob | File Services Name
TinyBlob | uname -a from Client (not yet used)
tinyint | yes|no for autopruning
bigint | 64 bit seconds to retain Files
bigint | 64 bit seconds to retain Job
Data Type | Remark
----------|---------------------------------------
integer | Primary Key
TinyBlob | File Services Name
TinyBlob | uname -a from Client (not yet used)
tinyint | yes|no for autopruning
bigint | 64 bit seconds to retain Files
bigint | 64 bit seconds to retain Job

The <span>**Client**</span> table contains one entry for each machine
backed up by Bareos in this database. Normally the Name is a fully
qualified domain name.

---------|----------------------------------
integer | Unique Id
tinyblob | Resource name of Storage device
tinyint | Set if it is an autochanger
Data Type | Remark
----------|----------------------------------
integer | Unique Id
tinyblob | Resource name of Storage device
tinyint | Set if it is an autochanger

The <span>**Storage**</span> table contains one entry for each Storage
used.

---------|-----------------------------
tinyblob | Counter name
integer | Start/Min value for counter
integer | Max value for counter
integer | Current counter value
tinyblob | Name of another counter
Data Type | Remark
----------|-----------------------------
tinyblob | Counter name
integer | Start/Min value for counter
integer | Max value for counter
integer | Current counter value
tinyblob | Name of another counter

The <span>**Counter**</span> table contains one entry for each permanent
counter defined by the user.

Data Type | Remark
-------------|---------------------------------------------------
integer | Primary Key
tinyblob | Unique Job Name
Expand Down Expand Up @@ -480,46 +491,51 @@ tiny integer | Set when Base Job run
The <span>bf JobHisto</span> table is the same as the Job table, but it
keeps long term statistics (i.e. it is not pruned with the Job).

---------|---------------------------------------
integer | Primary Key
integer | Points to Job record
datetime | Time/date log record created
blob | Log text
Data Type | Remark
----------|---------------------------------------
integer | Primary Key
integer | Points to Job record
datetime | Time/date log record created
blob | Log text

The <span>**Log**</span> table contains a log of all Job output.

---------|-----------------------------------------
integer | Primary Key
tinyblob | Text defining location
integer | Relative cost of obtaining Volume
tinyint | Whether or not Volume is enabled
Data Type | Remark
----------|-----------------------------------------
integer | Primary Key
tinyblob | Text defining location
integer | Relative cost of obtaining Volume
tinyint | Whether or not Volume is enabled

The <span>**Location**</span> table defines where a Volume is
physically.

---------|-----------------------------------------------
integer | Primary Key
datetime | Time/date log record created
integer |Points to Media record
integer | Points to Location record
integer | enum: Full, Archive, Append, Recycle, Purged Read-only, Disabled, Error, Busy, Used, Cleaning
tinyint | Whether or not Volume is enabled
Data Type | Remark
----------|-----------------------------------------------
integer | Primary Key
datetime | Time/date log record created
integer |Points to Media record
integer | Points to Location record
integer | enum: Full, Archive, Append, Recycle, Purged Read-only, Disabled, Error, Busy, Used, Cleaning
tinyint | Whether or not Volume is enabled

The <span>**Log**</span> table contains a log of all Job output.

--------|-------------
integer | Primary Key
Data Type | Remark
----------|-------------
integer | Primary Key

The <span>**Version**</span> table defines the Bareos database version
number. Bareos checks this number before reading the database to ensure
that it is compatible with the Bareos binary file.

--------|-----------------------
integer | Primary Key
integer | JobId of Base Job
integer | Reference to Job
integer | Reference to File
integer | File Index number
Data Type | Remark
----------|-----------------------
integer | Primary Key
integer | JobId of Base Job
integer | Reference to Job
integer | Reference to File
integer | File Index number

The <span>**BaseFiles**</span> table contains all the File references
for a particular JobId that point to a Base file – i.e. they were
Expand Down

0 comments on commit e682de8

Please sign in to comment.