suivant: Full Syntax
monter: Variable Expansion
précédent: General Functionality
Table des matières
Index
Within Bacula, there are three main classes of variables with some minor
variations within the classes. The classes are:
- Counters
-
Counters are defined by the Counter resources in the Director's conf
file. The counter can either be a temporary counter that lasts for the
duration of Bacula's execution, or it can be a variable that is stored in
the catalog, and thus retains its value from one Bacula execution to another.
Counter variables may be incremented by postfixing a plus sign (+ after
the variable name).
- Internal Variables
-
Internal variables are read-only, and may be related to the current job (i.e.
Job name), or maybe special variables such as the date and time. The
following variables are available:
- Year
- -- the full year
- Month
- -- the current month 1-12
- Day
- -- the day of the month 1-31
- Hour
- -- the hour 0-24
- Minute
- -- the current minute 0-59
- Second
- -- the current second 0-59
- WeekDay
- -- the current day of the week 0-6 with 0 being Sunday
- Job
- -- the job name
- Dir
- -- the Director's name
- Level
- -- the Job Level
- Type
- -- the Job type
- JobId
- -- the JobId
- JobName
- -- the unique job name composed of Job and date
- Storage
- -- the Storage daemon's name
- Client
- -- the Client's name
- NumVols
- -- the current number of Volumes in the Pool
- Pool
- -- the Pool name
- Catalog
- -- the Catalog name
- MediaType
- -- the Media Type
- Environment Variables
-
Environment variables are read-only, and must be defined in the environment
prior to executing Bacula. Environment variables may be either scalar or an
array, where the elements of the array are referenced by subscripting the
variable name (e.g. ${Months[3]}). Environment variable arrays are
defined by separating the elements with a vertical bar (|), thus set Months="Jan|Feb|Mar|Apr|..." defines an environment variable named
Month that will be treated as an array, and the reference ${Months[3]} will yield Mar. The elements of the array can have
differing lengths.
suivant: Full Syntax
monter: Variable Expansion
précédent: General Functionality
Table des matières
Index
Kern Sibbald
2007-11-03