JobDefs resource

A JobDefs resource holds defaults for Job resources: a Job with JobDefs = name takes every directive it does not set itself from it. It accepts the same directives as a Job; none is required in a JobDefs.

Examples

Defaults shared by the backup jobs

JobDefs {
  Name = DefaultJob
  Type = Backup
  Level = Incremental
  FileSet = LinuxAll
  Schedule = WeeklyCycle
  Storage = File
  Messages = Standard
  Pool = Incremental
  Priority = 10
  Write Bootstrap = "/var/lib/bareos/%c.bsr"
  Full Backup Pool = Full
  Differential Backup Pool = Differential
  Incremental Backup Pool = Incremental
}

Directives

DirectiveTypeDefaultSummary
NamenameName of the job.
DescriptionstringFree text describing the job.
TypeenumWhat the job does: Backup, Restore, Verify, Admin (runs only its scripts), Migrate, Copy, Consolidate (Always Incremental), or Archive.
ProtocolenumNativeBackup protocol: Native for the Bareos File Daemon; NDMP_BAREOS or NDMP_NATIVE for NAS filers (data stored by Bareos or by an NDMP tape server).
Backup FormatstringNativeFormat of NDMP backups (for example dump or tar, depending on the filer); Native for normal jobs.
LevelenumDefault level of the job: for backups Full, Incremental, Differential or VirtualFull; for verify jobs InitCatalog, Catalog, VolumeToCatalog, DiskToCatalog or Data.
MessagesresourceMessages resource that decides where the job’s messages go (job log in the catalog, mail, log file).
Storageresource listStorage the job writes to (or reads from).
PoolresourcePool the job writes to.
Full Backup PoolresourcePool used when the job runs at level Full, so Fulls can have their own retention.
Virtual Full Backup PoolresourcePool a VirtualFull is written to.
Incremental Backup PoolresourcePool used for Incremental runs.
Differential Backup PoolresourcePool used for Differential runs.
Next PoolresourcePool that Copy, Migrate and VirtualFull jobs write to.
ClientresourceClient (File Daemon) the job backs up or, for restores, restores to by default.
File SetresourceFileSet that says what is backed up.
ScheduleresourceSchedule that starts the job automatically.
Job To VerifyresourceFor verify jobs: the backup job whose last run is verified (levels Catalog, VolumeToCatalog, Data).
CatalogresourceCatalog for this job, overriding that of the client.
Job DefsresourceJobDefs resource whose directives this job inherits.
Runstring listStarts another job (or a copy of this one with other settings) when this job is started, in run command syntax, for example a second backup to another storage.
WherepathFor restore jobs: directory prefix the files are restored under. / restores to the original place.
Regex WherestringFor restore jobs: rewrites the paths of restored files with sed-like expressions (!from!to!), instead of a plain prefix.
Strip PrefixstringFor restore jobs: removes this prefix from the paths before restoring.
Add PrefixstringFor restore jobs: adds this prefix to the paths (like Where).
Add SuffixstringFor restore jobs: adds this suffix to the restored file names, for example to keep existing files.
BootstrappathBootstrap file a restore job reads to find the data on the volumes.
Write Bootstrappath or |commandFile (or, starting with |, a command) the job writes its bootstrap to after a backup: which volumes and blocks hold this job.
Write Verify ListpathdeprecatedDeprecated: file the verify job writes its list of files to.
ReplaceenumAlwaysFor restore jobs: what happens to files that exist already: always (overwrite), ifnewer (only if the backup is newer), ifolder (only if it is older) or never.
Maximum BandwidthspeedLimits the bandwidth of this job.
Max Run Sched TimetimeCancels the job if it has not finished this long after its scheduled time (waiting counts).
Max Run TimetimeCancels the job if it runs longer than this from its actual start.
Full Max RuntimetimeMax Run Time for Full runs only.
Incremental Max RuntimetimeMax Run Time for Incremental runs only.
Differential Max RuntimetimeMax Run Time for Differential runs only.
Max Wait TimetimeCancels the job if it waits longer than this for a resource (a volume, a device, a concurrency slot) after it started.
Max Start DelaytimeCancels the job if it cannot start within this time after its scheduled time, so a nightly job that missed its window does not run in the day.
Max Full IntervaltimeUpgrades an Incremental or Differential to Full when the last successful Full is older than this.
Max Virtual Full IntervaltimeUpgrades a run to VirtualFull when the last VirtualFull (or Full) is older than this.
Max Diff IntervaltimeUpgrades an Incremental to Differential when the last Differential is older than this.
Prefix Linksyes|nonoFor restores with Where: also prefix the targets of absolute symbolic links, so they point into the restore directory.
Prune Jobsyes|nonoPrune the job records of this job’s client after the job, as if the retention had been applied by prune jobs.
Prune Filesyes|nonoPrune the file records of this job’s client after the job.
Prune Volumesyes|nonoPrune the volumes of the pool after the job.
Purge Migration Jobyes|nonoAfter a successful migration, purge the migrated (source) job from the catalog.
Enabledyes|noyesA disabled job is not started by its schedule; it can still be run by hand. enable job and disable job change it at run time.
Spool Attributesyes|nonoSpool the file attributes on the Storage Daemon and insert them into the catalog at the end of the job, instead of while writing.
Spool Datayes|nonoSpool the data to disk on the Storage Daemon first and write it to the volume in big chunks.
Spool SizesizeUpper limit of the spool file of this job.
Rerun Failed Levelsyes|nonoIf the last Full (or Differential) failed, run the next job at that level again instead of the scheduled lower level.
Prefer Mounted Volumesyes|noyesPrefer a drive that has a usable volume mounted.
Run Before JobcommandCommand the Director runs before the job; a failing command cancels the job.
Run After JobcommandCommand the Director runs after a successful job (RunScript, RunsWhen = After, RunsOnFailure = no).
Run After Failed JobcommandCommand the Director runs after a failed job.
Client Run Before JobcommandCommand the File Daemon runs on the client before the backup, for example a database dump.
Client Run After JobcommandCommand the File Daemon runs on the client after the job.
Maximum Concurrent Jobspositive integer1How many runs of this job may run at the same time; usually 1, so a slow run is not overtaken by the next one.
Reschedule On Erroryes|nonoStart the job again when it failed, after Reschedule Interval, at most Reschedule Times times.
Reschedule Intervaltime1800 (30 minutes)Wait between a failed run and its retry.
Reschedule Timespositive integer5How many times a failed job is retried; 0 means without limit.
Prioritypositive integer10Priority of the job: smaller numbers first.
Allow Mixed Priorityyes|nonoAllow this job to run together with jobs of other priorities, as long as they allow it as well.
Selection PatternstringFor Copy and Migrate jobs: the pattern or SQL query used by Selection Type (a job or client name pattern, or a query returning job IDs).
Run ScriptblockBlock that runs a command or console command before or after the job, on the Director or the client, with control over failure handling.
Selection TypeenumFor Copy and Migrate jobs: how the source jobs are chosen: SmallestVolume, OldestVolume, Client, Volume, Job, SQLQuery, PoolOccupancy, PoolTime, PoolUncopiedJobs.
Accurateyes|nonoAccurate mode: the File Daemon receives the file list of the previous backups and also records deleted and renamed files, so a restore gives exactly the state of the backup.
Allow Duplicate Jobsyes|noyesAllow a second run of the same job while one is queued or running.
Allow Higher Duplicatesyes|noyesdeprecatedDeprecated: allow duplicates of a higher level.
Cancel Lower Level Duplicatesyes|nonoWith Allow Duplicate Jobs = no: cancel the duplicate of the lower level (an Incremental gives way to a Full).
Cancel Queued Duplicatesyes|nonoWith Allow Duplicate Jobs = no: cancel a duplicate that is still waiting in the queue.
Cancel Running Duplicatesyes|nonoWith Allow Duplicate Jobs = no: cancel the duplicate that is already running in favour of the new one.
Save File Historyyes|noyesFor NDMP: store the file history sent by the filer, so single files can be restored.
File History Sizesize10000000For NDMP: size of the file history buffer.
FD Plugin Optionsstring listOptions passed to the File Daemon plugins of this job.
SD Plugin Optionsstring listOptions passed to the Storage Daemon plugins of this job.
Dir Plugin Optionsstring listOptions passed to the Director plugins of this job.
Max Concurrent Copiespositive integer100For Copy jobs: how many copy jobs are started at once from one selection.
Always Incrementalyes|nonoAlways Incremental scheme: only Incrementals are taken, and a Consolidate job merges the old ones into a VirtualFull.
Always Incremental Job Retentiontime0Incrementals younger than this are not consolidated.
Always Incremental Keep Numberpositive integer0How many Incrementals are always kept unconsolidated, even when they are older than the retention.
Always Incremental Max Full AgetimeWhen the Full of an Always Incremental chain is older than this, the Consolidate job includes it, so the Full does not grow old.
Max Full Consolidationspositive integer0How many Fulls a Consolidate job may consolidate in one run (because of Always Incremental Max Full Age); 0 means no limit.
Run On Incoming Connect Intervaltime0For clients that connect to the Director (Connection From Client To Director): start this job when the client connects and the last run is older than this interval. 0 switches it off.

Name

Key: name · Type: name

Name of the job. It appears in job lists, logs and the catalog; renaming it starts a new history, so the next Incremental becomes a Full.

JobDefs {
  Name = "backup-web"
}

In the console:

configure add jobdefs name=DefaultJob type=Backup messages=Standard pool=Incremental

Description

Key: description · Type: string

Free text describing the job.

JobDefs {
  Name = DefaultJob
  Description = "Nightly backup of the web server"
}

In the console:

configure update jobdefs=DefaultJob description="Nightly backup of the web server"

Type

Key: type · Type: enum · Values: Backup, Restore, Verify, Admin, Archive, Migrate, Copy, Consolidate

What the job does: Backup, Restore, Verify, Admin (runs only its scripts), Migrate, Copy, Consolidate (Always Incremental), or Archive. Required, directly or through JobDefs.

JobDefs {
  Name = DefaultJob
  Type = Backup
}

In the console:

configure update jobdefs=DefaultJob type=Backup

Protocol

Key: protocol · Type: enum · Default: Native · Values: Native, NDMP_BAREOS, NDMP_NATIVE

Backup protocol: Native for the Bareos File Daemon; NDMP_BAREOS or NDMP_NATIVE for NAS filers (data stored by Bareos or by an NDMP tape server).

JobDefs {
  Name = DefaultJob
  Protocol = Native
}

In the console:

configure update jobdefs=DefaultJob protocol=Native

Backup Format

Key: backupformat · Type: string · Default: Native

Format of NDMP backups (for example dump or tar, depending on the filer); Native for normal jobs.

JobDefs {
  Name = DefaultJob
  Backup Format = Native
}

In the console:

configure update jobdefs=DefaultJob backupformat=Native

Level

Key: level · Type: enum · Values: Full, Incremental, Differential, VirtualFull, Base, Since, InitCatalog, Catalog, VolumeToCatalog, DiskToCatalog, Data

Default level of the job: for backups Full, Incremental, Differential or VirtualFull; for verify jobs InitCatalog, Catalog, VolumeToCatalog, DiskToCatalog or Data. A Run line of the Schedule or run level= overrides it. An Incremental or Differential without a Full before it is upgraded to Full.

JobDefs {
  Name = DefaultJob
  Level = Incremental
}

In the console:

configure update jobdefs=DefaultJob level=Incremental

Messages

Key: messages · Type: resource

Messages resource that decides where the job’s messages go (job log in the catalog, mail, log file). Required.

JobDefs {
  Name = DefaultJob
  Messages = "Standard"
}

In the console:

configure update jobdefs=DefaultJob messages=Standard

Storage

Key: storage · Type: resource list

Storage the job writes to (or reads from). Several may be listed; the first available one is used. A Storage in the Pool takes precedence over the job’s.

JobDefs {
  Name = DefaultJob
  Storage = "File"
}

In the console:

configure update jobdefs=DefaultJob storage=File

Pool

Key: pool · Type: resource

Pool the job writes to. Required for backups; Full Backup Pool and the other level pools and Run line overrides can choose another one per level.

JobDefs {
  Name = DefaultJob
  Pool = "Incremental"
}

In the console:

configure update jobdefs=DefaultJob pool=Incremental

Full Backup Pool

Key: fullbackuppool · Type: resource

Pool used when the job runs at level Full, so Fulls can have their own retention.

JobDefs {
  Name = DefaultJob
  Full Backup Pool = "Full"
}

In the console:

configure update jobdefs=DefaultJob fullbackuppool=Full

Virtual Full Backup Pool

Key: virtualfullbackuppool · Type: resource

Pool a VirtualFull is written to. It must differ from the pools it reads from unless the storage has more than one device.

JobDefs {
  Name = DefaultJob
  Virtual Full Backup Pool = "VirtualFull"
}

In the console:

configure update jobdefs=DefaultJob virtualfullbackuppool=VirtualFull

Incremental Backup Pool

Key: incrementalbackuppool · Type: resource

Pool used for Incremental runs.

JobDefs {
  Name = DefaultJob
  Incremental Backup Pool = "Incremental"
}

In the console:

configure update jobdefs=DefaultJob incrementalbackuppool=Incremental

Differential Backup Pool

Key: differentialbackuppool · Type: resource

Pool used for Differential runs.

JobDefs {
  Name = DefaultJob
  Differential Backup Pool = "Differential"
}

In the console:

configure update jobdefs=DefaultJob differentialbackuppool=Differential

Next Pool

Key: nextpool · Type: resource

Pool that Copy, Migrate and VirtualFull jobs write to. Overrides Next Pool of the source pool.

JobDefs {
  Name = DefaultJob
  Next Pool = "Offsite"
}

In the console:

configure update jobdefs=DefaultJob nextpool=Offsite

Client

Key: client · Type: resource

Client (File Daemon) the job backs up or, for restores, restores to by default. Required for backups.

JobDefs {
  Name = DefaultJob
  Client = "web-fd"
}

In the console:

configure update jobdefs=DefaultJob client=web-fd

File Set

Key: fileset · Type: resource

FileSet that says what is backed up. Changing the FileSet makes the next Incremental or Differential a Full unless Ignore FileSet Changes is set.

JobDefs {
  Name = DefaultJob
  File Set = "LinuxAll"
}

In the console:

configure update jobdefs=DefaultJob fileset=LinuxAll

Schedule

Key: schedule · Type: resource

Schedule that starts the job automatically. Without it, the job only runs when it is started by hand or by another job.

JobDefs {
  Name = DefaultJob
  Schedule = "WeeklyCycle"
}

In the console:

configure update jobdefs=DefaultJob schedule=WeeklyCycle

Job To Verify

Key: jobtoverify · Type: resource · Aliases: Verify Job

For verify jobs: the backup job whose last run is verified (levels Catalog, VolumeToCatalog, Data).

JobDefs {
  Name = DefaultJob
  Job To Verify = "backup-web"
}

In the console:

configure update jobdefs=DefaultJob jobtoverify=backup-web

Catalog

Key: catalog · Type: resource

Catalog for this job, overriding that of the client.

JobDefs {
  Name = DefaultJob
  Catalog = "MyCatalog"
}

In the console:

configure update jobdefs=DefaultJob catalog=MyCatalog

Job Defs

Key: jobdefs · Type: resource

JobDefs resource whose directives this job inherits. Directives written in the job itself win. The Onesimus GUI shows which values come from the JobDefs.

JobDefs {
  Name = DefaultJob
  Job Defs = "DefaultJob"
}

In the console:

configure update jobdefs=DefaultJob jobdefs=DefaultJob

Run

Key: run · Type: string list

Starts another job (or a copy of this one with other settings) when this job is started, in run command syntax, for example a second backup to another storage. It is rarely needed; Copy jobs are the usual way to a second copy.

JobDefs {
  Name = DefaultJob
  Run = "backup-web-copy level=%l since=\"%s\""
}

In the console:

configure update jobdefs=DefaultJob run="backup-web-copy level=%l since=\"%s\""

Where

Key: where · Type: path

For restore jobs: directory prefix the files are restored under. / restores to the original place. The restore command and the GUI can change it per restore, within the console’s Where ACL.

JobDefs {
  Name = DefaultJob
  Where = "/tmp/bareos-restores"
}

In the console:

configure update jobdefs=DefaultJob where=/tmp/bareos-restores

Regex Where

Key: regexwhere · Type: string

For restore jobs: rewrites the paths of restored files with sed-like expressions (!from!to!), instead of a plain prefix.

JobDefs {
  Name = DefaultJob
  Regex Where = "!/home!/srv/restored-home!"
}

In the console:

configure update jobdefs=DefaultJob regexwhere=!/home!/srv/restored-home!

Strip Prefix

Key: stripprefix · Type: string

For restore jobs: removes this prefix from the paths before restoring.

JobDefs {
  Name = DefaultJob
  Strip Prefix = "/var/www"
}

In the console:

configure update jobdefs=DefaultJob stripprefix=/var/www

Add Prefix

Key: addprefix · Type: string

For restore jobs: adds this prefix to the paths (like Where).

JobDefs {
  Name = DefaultJob
  Add Prefix = "/restore"
}

In the console:

configure update jobdefs=DefaultJob addprefix=/restore

Add Suffix

Key: addsuffix · Type: string

For restore jobs: adds this suffix to the restored file names, for example to keep existing files.

JobDefs {
  Name = DefaultJob
  Add Suffix = ".restored"
}

In the console:

configure update jobdefs=DefaultJob addsuffix=.restored

Bootstrap

Key: bootstrap · Type: path

Bootstrap file a restore job reads to find the data on the volumes. Usually written by the restore command itself.

JobDefs {
  Name = DefaultJob
  Bootstrap = "/var/lib/bareos/restore.bsr"
}

In the console:

configure update jobdefs=DefaultJob bootstrap=/var/lib/bareos/restore.bsr

Write Bootstrap

Key: writebootstrap · Type: path or |command

File (or, starting with |, a command) the job writes its bootstrap to after a backup: which volumes and blocks hold this job. With it a restore is possible even without the catalog, so keep it off the backup server. %c, %n and other job variables are replaced.

JobDefs {
  Name = DefaultJob
  Write Bootstrap = "/var/lib/bareos/%c.bsr"
}

In the console:

configure update jobdefs=DefaultJob writebootstrap=/var/lib/bareos/%c.bsr

Write Verify List

Key: writeverifylist · Type: path · Deprecated

Deprecated: file the verify job writes its list of files to.

JobDefs {
  Name = DefaultJob
  Write Verify List = "/var/lib/bareos/verify.lst"
}

Replace

Key: replace · Type: enum · Default: Always · Values: always, ifnewer, ifolder, never

For restore jobs: what happens to files that exist already: always (overwrite), ifnewer (only if the backup is newer), ifolder (only if it is older) or never.

JobDefs {
  Name = DefaultJob
  Replace = IfNewer
}

In the console:

configure update jobdefs=DefaultJob replace=IfNewer

Maximum Bandwidth

Key: maximumbandwidth · Type: speed

Limits the bandwidth of this job. Speeds take the suffixes k/s, m/s (powers of 1024) or kb/s, mb/s (powers of 1000); a plain number means bytes per second.

JobDefs {
  Name = DefaultJob
  Maximum Bandwidth = 10 m/s
}

In the console:

configure update jobdefs=DefaultJob maximumbandwidth="10 m/s"

Max Run Sched Time

Key: maxrunschedtime · Type: time

Cancels the job if it has not finished this long after its scheduled time (waiting counts). Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Max Run Sched Time = 10 hours
}

In the console:

configure update jobdefs=DefaultJob maxrunschedtime="10 hours"

Max Run Time

Key: maxruntime · Type: time

Cancels the job if it runs longer than this from its actual start. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Max Run Time = 8 hours
}

In the console:

configure update jobdefs=DefaultJob maxruntime="8 hours"

Full Max Runtime

Key: fullmaxruntime · Type: time

Max Run Time for Full runs only. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Full Max Runtime = 12 hours
}

In the console:

configure update jobdefs=DefaultJob fullmaxruntime="12 hours"

Incremental Max Runtime

Key: incrementalmaxruntime · Type: time

Max Run Time for Incremental runs only. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Incremental Max Runtime = 2 hours
}

In the console:

configure update jobdefs=DefaultJob incrementalmaxruntime="2 hours"

Differential Max Runtime

Key: differentialmaxruntime · Type: time

Max Run Time for Differential runs only. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Differential Max Runtime = 4 hours
}

In the console:

configure update jobdefs=DefaultJob differentialmaxruntime="4 hours"

Max Wait Time

Key: maxwaittime · Type: time

Cancels the job if it waits longer than this for a resource (a volume, a device, a concurrency slot) after it started. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Max Wait Time = 1 hour
}

In the console:

configure update jobdefs=DefaultJob maxwaittime="1 hour"

Max Start Delay

Key: maxstartdelay · Type: time

Cancels the job if it cannot start within this time after its scheduled time, so a nightly job that missed its window does not run in the day. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Max Start Delay = 4 hours
}

In the console:

configure update jobdefs=DefaultJob maxstartdelay="4 hours"

Max Full Interval

Key: maxfullinterval · Type: time

Upgrades an Incremental or Differential to Full when the last successful Full is older than this. A simple way to get regular Fulls without a Full Run line. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Max Full Interval = 30 days
}

In the console:

configure update jobdefs=DefaultJob maxfullinterval="30 days"

Max Virtual Full Interval

Key: maxvirtualfullinterval · Type: time

Upgrades a run to VirtualFull when the last VirtualFull (or Full) is older than this. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Max Virtual Full Interval = 7 days
}

In the console:

configure update jobdefs=DefaultJob maxvirtualfullinterval="7 days"

Max Diff Interval

Key: maxdiffinterval · Type: time

Upgrades an Incremental to Differential when the last Differential is older than this. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Max Diff Interval = 7 days
}

In the console:

configure update jobdefs=DefaultJob maxdiffinterval="7 days"

Key: prefixlinks · Type: yes|no · Default: no · Values: yes, no

For restores with Where: also prefix the targets of absolute symbolic links, so they point into the restore directory.

JobDefs {
  Name = DefaultJob
  Prefix Links = yes
}

In the console:

configure update jobdefs=DefaultJob prefixlinks=yes

Prune Jobs

Key: prunejobs · Type: yes|no · Default: no · Values: yes, no

Prune the job records of this job’s client after the job, as if the retention had been applied by prune jobs.

JobDefs {
  Name = DefaultJob
  Prune Jobs = yes
}

In the console:

configure update jobdefs=DefaultJob prunejobs=yes

Prune Files

Key: prunefiles · Type: yes|no · Default: no · Values: yes, no

Prune the file records of this job’s client after the job.

JobDefs {
  Name = DefaultJob
  Prune Files = yes
}

In the console:

configure update jobdefs=DefaultJob prunefiles=yes

Prune Volumes

Key: prunevolumes · Type: yes|no · Default: no · Values: yes, no

Prune the volumes of the pool after the job.

JobDefs {
  Name = DefaultJob
  Prune Volumes = yes
}

In the console:

configure update jobdefs=DefaultJob prunevolumes=yes

Purge Migration Job

Key: purgemigrationjob · Type: yes|no · Default: no · Values: yes, no

After a successful migration, purge the migrated (source) job from the catalog.

JobDefs {
  Name = DefaultJob
  Purge Migration Job = yes
}

In the console:

configure update jobdefs=DefaultJob purgemigrationjob=yes

Enabled

Key: enabled · Type: yes|no · Default: yes · Values: yes, no

A disabled job is not started by its schedule; it can still be run by hand. enable job and disable job change it at run time.

JobDefs {
  Name = DefaultJob
  Enabled = yes
}

In the console:

configure update jobdefs=DefaultJob enabled=yes

Spool Attributes

Key: spoolattributes · Type: yes|no · Default: no · Values: yes, no

Spool the file attributes on the Storage Daemon and insert them into the catalog at the end of the job, instead of while writing. Speeds up jobs with many small files.

JobDefs {
  Name = DefaultJob
  Spool Attributes = yes
}

In the console:

configure update jobdefs=DefaultJob spoolattributes=yes

Spool Data

Key: spooldata · Type: yes|no · Default: no · Values: yes, no

Spool the data to disk on the Storage Daemon first and write it to the volume in big chunks. Meant for tape drives that would otherwise stop and start (shoe-shining). It implies Spool Attributes.

JobDefs {
  Name = DefaultJob
  Spool Data = yes
}

In the console:

configure update jobdefs=DefaultJob spooldata=yes

Spool Size

Key: spoolsize · Type: size

Upper limit of the spool file of this job. Sizes take the suffixes k, m, g, t (powers of 1024) or kb, mb, gb, tb (powers of 1000).

JobDefs {
  Name = DefaultJob
  Spool Size = 50 g
}

In the console:

configure update jobdefs=DefaultJob spoolsize="50 g"

Rerun Failed Levels

Key: rerunfailedlevels · Type: yes|no · Default: no · Values: yes, no

If the last Full (or Differential) failed, run the next job at that level again instead of the scheduled lower level.

JobDefs {
  Name = DefaultJob
  Rerun Failed Levels = yes
}

In the console:

configure update jobdefs=DefaultJob rerunfailedlevels=yes

Prefer Mounted Volumes

Key: prefermountedvolumes · Type: yes|no · Default: yes · Values: yes, no

Prefer a drive that has a usable volume mounted. With no, the Director prefers an idle drive, which spreads jobs over several drives.

JobDefs {
  Name = DefaultJob
  Prefer Mounted Volumes = yes
}

In the console:

configure update jobdefs=DefaultJob prefermountedvolumes=yes

Run Before Job

Key: runbeforejob · Type: command

Command the Director runs before the job; a failing command cancels the job. Short form of a RunScript with RunsWhen = Before on the Director.

JobDefs {
  Name = DefaultJob
  Run Before Job = "/usr/local/bin/prepare-backup %c"
}

In the console:

configure update jobdefs=DefaultJob runbeforejob="/usr/local/bin/prepare-backup %c"

Run After Job

Key: runafterjob · Type: command

Command the Director runs after a successful job (RunScript, RunsWhen = After, RunsOnFailure = no).

JobDefs {
  Name = DefaultJob
  Run After Job = "/usr/local/bin/notify-done %j %e"
}

In the console:

configure update jobdefs=DefaultJob runafterjob="/usr/local/bin/notify-done %j %e"

Run After Failed Job

Key: runafterfailedjob · Type: command

Command the Director runs after a failed job.

JobDefs {
  Name = DefaultJob
  Run After Failed Job = "/usr/local/bin/notify-failed %j"
}

In the console:

configure update jobdefs=DefaultJob runafterfailedjob="/usr/local/bin/notify-failed %j"

Client Run Before Job

Key: clientrunbeforejob · Type: command

Command the File Daemon runs on the client before the backup, for example a database dump. A failing command cancels the job.

JobDefs {
  Name = DefaultJob
  Client Run Before Job = "/usr/local/bin/dump-database"
}

In the console:

configure update jobdefs=DefaultJob clientrunbeforejob=/usr/local/bin/dump-database

Client Run After Job

Key: clientrunafterjob · Type: command

Command the File Daemon runs on the client after the job.

JobDefs {
  Name = DefaultJob
  Client Run After Job = "/usr/local/bin/cleanup-dump"
}

In the console:

configure update jobdefs=DefaultJob clientrunafterjob=/usr/local/bin/cleanup-dump

Maximum Concurrent Jobs

Key: maximumconcurrentjobs · Type: positive integer · Default: 1

How many runs of this job may run at the same time; usually 1, so a slow run is not overtaken by the next one.

JobDefs {
  Name = DefaultJob
  Maximum Concurrent Jobs = 1
}

In the console:

configure update jobdefs=DefaultJob maximumconcurrentjobs=1

Reschedule On Error

Key: rescheduleonerror · Type: yes|no · Default: no · Values: yes, no

Start the job again when it failed, after Reschedule Interval, at most Reschedule Times times.

JobDefs {
  Name = DefaultJob
  Reschedule On Error = yes
}

In the console:

configure update jobdefs=DefaultJob rescheduleonerror=yes

Reschedule Interval

Key: rescheduleinterval · Type: time · Default: 1800 (30 minutes)

Wait between a failed run and its retry. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Reschedule Interval = 30 minutes
}

In the console:

configure update jobdefs=DefaultJob rescheduleinterval="30 minutes"

Reschedule Times

Key: rescheduletimes · Type: positive integer · Default: 5

How many times a failed job is retried; 0 means without limit.

JobDefs {
  Name = DefaultJob
  Reschedule Times = 3
}

In the console:

configure update jobdefs=DefaultJob rescheduletimes=3

Priority

Key: priority · Type: positive integer · Default: 10

Priority of the job: smaller numbers first. Jobs of different priorities do not run at the same time (unless Allow Mixed Priority): a job waits until all jobs of a higher priority are done. Use it for example to run the catalog backup after all others. The schedule view of the Onesimus GUI does not count such waits as avoidable.

JobDefs {
  Name = DefaultJob
  Priority = 10
}

In the console:

configure update jobdefs=DefaultJob priority=10

Allow Mixed Priority

Key: allowmixedpriority · Type: yes|no · Default: no · Values: yes, no

Allow this job to run together with jobs of other priorities, as long as they allow it as well.

JobDefs {
  Name = DefaultJob
  Allow Mixed Priority = yes
}

In the console:

configure update jobdefs=DefaultJob allowmixedpriority=yes

Selection Pattern

Key: selectionpattern · Type: string

For Copy and Migrate jobs: the pattern or SQL query used by Selection Type (a job or client name pattern, or a query returning job IDs).

JobDefs {
  Name = DefaultJob
  Selection Pattern = "backup-.*"
}

In the console:

configure update jobdefs=DefaultJob selectionpattern=backup-.*

Run Script

Key: runscript · Type: block

Block that runs a command or console command before or after the job, on the Director or the client, with control over failure handling. See the RunScript block.

JobDefs {
  Name = DefaultJob
  Run Script {
    RunsWhen = Before
    RunsOnClient = yes
    FailJobOnError = yes
    Command = "/usr/local/bin/dump-database"
  }
}

Selection Type

Key: selectiontype · Type: enum · Values: SmallestVolume, OldestVolume, PoolOccupancy, PoolTime, PoolUncopiedJobs, Client, Volume, Job, SQLQuery

For Copy and Migrate jobs: how the source jobs are chosen: SmallestVolume, OldestVolume, Client, Volume, Job, SQLQuery, PoolOccupancy, PoolTime, PoolUncopiedJobs.

JobDefs {
  Name = DefaultJob
  Selection Type = PoolUncopiedJobs
}

In the console:

configure update jobdefs=DefaultJob selectiontype=PoolUncopiedJobs

Accurate

Key: accurate · Type: yes|no · Default: no · Values: yes, no

Accurate mode: the File Daemon receives the file list of the previous backups and also records deleted and renamed files, so a restore gives exactly the state of the backup. Needed for Always Incremental and VirtualFull; costs memory on the client.

JobDefs {
  Name = DefaultJob
  Accurate = yes
}

In the console:

configure update jobdefs=DefaultJob accurate=yes

Allow Duplicate Jobs

Key: allowduplicatejobs · Type: yes|no · Default: yes · Values: yes, no

Allow a second run of the same job while one is queued or running. With no, the Cancel … Duplicates directives decide which one is canceled.

JobDefs {
  Name = DefaultJob
  Allow Duplicate Jobs = no
}

In the console:

configure update jobdefs=DefaultJob allowduplicatejobs=no

Allow Higher Duplicates

Key: allowhigherduplicates · Type: yes|no · Default: yes · Values: yes, no · Deprecated

Deprecated: allow duplicates of a higher level.

JobDefs {
  Name = DefaultJob
  Allow Higher Duplicates = yes
}

Cancel Lower Level Duplicates

Key: cancellowerlevelduplicates · Type: yes|no · Default: no · Values: yes, no

With Allow Duplicate Jobs = no: cancel the duplicate of the lower level (an Incremental gives way to a Full).

JobDefs {
  Name = DefaultJob
  Cancel Lower Level Duplicates = yes
}

In the console:

configure update jobdefs=DefaultJob cancellowerlevelduplicates=yes

Cancel Queued Duplicates

Key: cancelqueuedduplicates · Type: yes|no · Default: no · Values: yes, no

With Allow Duplicate Jobs = no: cancel a duplicate that is still waiting in the queue.

JobDefs {
  Name = DefaultJob
  Cancel Queued Duplicates = yes
}

In the console:

configure update jobdefs=DefaultJob cancelqueuedduplicates=yes

Cancel Running Duplicates

Key: cancelrunningduplicates · Type: yes|no · Default: no · Values: yes, no

With Allow Duplicate Jobs = no: cancel the duplicate that is already running in favour of the new one.

JobDefs {
  Name = DefaultJob
  Cancel Running Duplicates = no
}

In the console:

configure update jobdefs=DefaultJob cancelrunningduplicates=no

Save File History

Key: savefilehistory · Type: yes|no · Default: yes · Values: yes, no

For NDMP: store the file history sent by the filer, so single files can be restored.

JobDefs {
  Name = DefaultJob
  Save File History = yes
}

In the console:

configure update jobdefs=DefaultJob savefilehistory=yes

File History Size

Key: filehistorysize · Type: size · Default: 10000000

For NDMP: size of the file history buffer. Sizes take the suffixes k, m, g, t (powers of 1024) or kb, mb, gb, tb (powers of 1000).

JobDefs {
  Name = DefaultJob
  File History Size = 10000000
}

In the console:

configure update jobdefs=DefaultJob filehistorysize=10000000

FD Plugin Options

Key: fdpluginoptions · Type: string list

Options passed to the File Daemon plugins of this job.

JobDefs {
  Name = DefaultJob
  FD Plugin Options = "python:module_name=bareos-fd-postgresql"
}

In the console:

configure update jobdefs=DefaultJob fdpluginoptions=python:module_name=bareos-fd-postgresql

SD Plugin Options

Key: sdpluginoptions · Type: string list

Options passed to the Storage Daemon plugins of this job.

JobDefs {
  Name = DefaultJob
  SD Plugin Options = "autoxflate:compress=lz4"
}

In the console:

configure update jobdefs=DefaultJob sdpluginoptions=autoxflate:compress=lz4

Dir Plugin Options

Key: dirpluginoptions · Type: string list

Options passed to the Director plugins of this job.

JobDefs {
  Name = DefaultJob
  Dir Plugin Options = "python:module_name=x"
}

In the console:

configure update jobdefs=DefaultJob dirpluginoptions=python:module_name=x

Max Concurrent Copies

Key: maxconcurrentcopies · Type: positive integer · Default: 100

For Copy jobs: how many copy jobs are started at once from one selection.

JobDefs {
  Name = DefaultJob
  Max Concurrent Copies = 10
}

In the console:

configure update jobdefs=DefaultJob maxconcurrentcopies=10

Always Incremental

Key: alwaysincremental · Type: yes|no · Default: no · Values: yes, no

Always Incremental scheme: only Incrementals are taken, and a Consolidate job merges the old ones into a VirtualFull. Needs Accurate and pools for the consolidated data.

JobDefs {
  Name = DefaultJob
  Always Incremental = yes
}

In the console:

configure update jobdefs=DefaultJob alwaysincremental=yes

Always Incremental Job Retention

Key: alwaysincrementaljobretention · Type: time · Default: 0

Incrementals younger than this are not consolidated. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Always Incremental Job Retention = 7 days
}

In the console:

configure update jobdefs=DefaultJob alwaysincrementaljobretention="7 days"

Always Incremental Keep Number

Key: alwaysincrementalkeepnumber · Type: positive integer · Default: 0

How many Incrementals are always kept unconsolidated, even when they are older than the retention.

JobDefs {
  Name = DefaultJob
  Always Incremental Keep Number = 7
}

In the console:

configure update jobdefs=DefaultJob alwaysincrementalkeepnumber=7

Always Incremental Max Full Age

Key: alwaysincrementalmaxfullage · Type: time

When the Full of an Always Incremental chain is older than this, the Consolidate job includes it, so the Full does not grow old. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Always Incremental Max Full Age = 30 days
}

In the console:

configure update jobdefs=DefaultJob alwaysincrementalmaxfullage="30 days"

Max Full Consolidations

Key: maxfullconsolidations · Type: positive integer · Default: 0

How many Fulls a Consolidate job may consolidate in one run (because of Always Incremental Max Full Age); 0 means no limit. Only valid for Consolidate jobs.

JobDefs {
  Name = DefaultJob
  Max Full Consolidations = 1
}

In the console:

configure update jobdefs=DefaultJob maxfullconsolidations=1

Run On Incoming Connect Interval

Key: runonincomingconnectinterval · Type: time · Default: 0

For clients that connect to the Director (Connection From Client To Director): start this job when the client connects and the last run is older than this interval. 0 switches it off. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

JobDefs {
  Name = DefaultJob
  Run On Incoming Connect Interval = 1 day
}

In the console:

configure update jobdefs=DefaultJob runonincomingconnectinterval="1 day"

RunScript block

Runs a command or console command before or after the job, on the Director or the client. Several RunScript blocks may be given.

DirectiveTypeDefaultSummary
CommandstringShell command to run; repeatable.
ConsolestringConsole command the Director runs instead of a shell command, for example to start another job or update a volume.
Runs WhenenumNeverWhen the script runs: Before the job, After it, AfterVSS (Windows, after the snapshot), Always (before and after) or Queued (when the job enters the queue).
Runs On Clientyes|noyesRun the command on the client (by the File Daemon) instead of on the Director.
Runs On Successyes|noyesRun the script after a successful job.
Runs On Failureyes|nonoRun the script after a failed job as well, for example to clean up.
Fail Job On Erroryes|noyesA script that exits with an error fails the job (for Before scripts: the job does not run).

Command

Key: command · Type: string

Shell command to run; repeatable. Job variables are replaced: %c client, %d Director, %e exit status, %i JobId, %j unique job name, %l level, %n job name, %s since time, %t job type, %v volume names.

Command = "/usr/local/bin/dump-database %l"

Console

Key: console · Type: string

Console command the Director runs instead of a shell command, for example to start another job or update a volume.

Console = "update stats days=30"

Runs When

Key: runswhen · Type: enum · Default: Never · Values: Before, After, AfterVSS, Always, Queued

When the script runs: Before the job, After it, AfterVSS (Windows, after the snapshot), Always (before and after) or Queued (when the job enters the queue).

Runs When = Before

Runs On Client

Key: runsonclient · Type: yes|no · Default: yes · Values: yes, no

Run the command on the client (by the File Daemon) instead of on the Director.

Runs On Client = no

Runs On Success

Key: runsonsuccess · Type: yes|no · Default: yes · Values: yes, no

Run the script after a successful job.

Runs On Success = yes

Runs On Failure

Key: runsonfailure · Type: yes|no · Default: no · Values: yes, no

Run the script after a failed job as well, for example to clean up.

Runs On Failure = yes

Fail Job On Error

Key: failjobonerror · Type: yes|no · Default: yes · Values: yes, no

A script that exits with an error fails the job (for Before scripts: the job does not run).

Fail Job On Error = no

See also: configuration reference, configure, show