Job resource

A Job resource describes one unit of work: what to back up (FileSet) from where (Client), to where (Pool, Storage) and when (Schedule), or a restore, verify, copy, migrate, consolidate or admin job.

Examples

A nightly backup job

Job {
  Name = backup-web
  Type = Backup
  Level = Incremental
  Client = web-fd
  FileSet = LinuxAll
  Schedule = WeeklyCycle
  Storage = File
  Messages = Standard
  Pool = Incremental
  Full Backup Pool = Full
  Differential Backup Pool = Differential
  Write Bootstrap = "/var/lib/bareos/%c.bsr"
}

A job with a database dump before the backup

Job {
  Name = backup-db
  JobDefs = DefaultJob
  Client = db-fd
  RunScript {
    RunsWhen = Before
    RunsOnClient = yes
    FailJobOnError = yes
    Command = "/usr/local/bin/dump-database"
  }
}

A restore job

Job {
  Name = RestoreFiles
  Type = Restore
  Client = web-fd
  FileSet = LinuxAll
  Storage = File
  Pool = Incremental
  Messages = Standard
  Where = /tmp/bareos-restores
}

Directives

DirectiveTypeDefaultSummary
NamenamerequiredName of the job.
DescriptionstringFree text describing the job.
TypeenumrequiredWhat 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.
MessagesresourcerequiredMessages 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).
PoolresourcerequiredPool 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 · Required

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.

Job {
  Name = "backup-web"
}

In the console:

configure add job name=backup-web type=Backup messages=Standard pool=Incremental

Description

Key: description · Type: string

Free text describing the job.

Job {
  Name = backup-web
  Description = "Nightly backup of the web server"
}

In the console:

configure update job=backup-web description="Nightly backup of the web server"

Type

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

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

Job {
  Name = backup-web
  Type = Backup
}

In the console:

configure update job=backup-web 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).

Job {
  Name = backup-web
  Protocol = Native
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Backup Format = Native
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Level = Incremental
}

In the console:

configure update job=backup-web level=Incremental

Messages

Key: messages · Type: resource · Required

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

Job {
  Name = backup-web
  Messages = "Standard"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Storage = "File"
}

In the console:

configure update job=backup-web storage=File

Pool

Key: pool · Type: resource · Required

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.

Job {
  Name = backup-web
  Pool = "Incremental"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Full Backup Pool = "Full"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Virtual Full Backup Pool = "VirtualFull"
}

In the console:

configure update job=backup-web virtualfullbackuppool=VirtualFull

Incremental Backup Pool

Key: incrementalbackuppool · Type: resource

Pool used for Incremental runs.

Job {
  Name = backup-web
  Incremental Backup Pool = "Incremental"
}

In the console:

configure update job=backup-web incrementalbackuppool=Incremental

Differential Backup Pool

Key: differentialbackuppool · Type: resource

Pool used for Differential runs.

Job {
  Name = backup-web
  Differential Backup Pool = "Differential"
}

In the console:

configure update job=backup-web differentialbackuppool=Differential

Next Pool

Key: nextpool · Type: resource

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

Job {
  Name = backup-web
  Next Pool = "Offsite"
}

In the console:

configure update job=backup-web nextpool=Offsite

Client

Key: client · Type: resource

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

Job {
  Name = backup-web
  Client = "web-fd"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  File Set = "LinuxAll"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Schedule = "WeeklyCycle"
}

In the console:

configure update job=backup-web 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).

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

In the console:

configure update job=backup-web jobtoverify=backup-web

Catalog

Key: catalog · Type: resource

Catalog for this job, overriding that of the client.

Job {
  Name = backup-web
  Catalog = "MyCatalog"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Job Defs = "DefaultJob"
}

In the console:

configure update job=backup-web 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.

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

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Where = "/tmp/bareos-restores"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Regex Where = "!/home!/srv/restored-home!"
}

In the console:

configure update job=backup-web regexwhere=!/home!/srv/restored-home!

Strip Prefix

Key: stripprefix · Type: string

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

Job {
  Name = backup-web
  Strip Prefix = "/var/www"
}

In the console:

configure update job=backup-web stripprefix=/var/www

Add Prefix

Key: addprefix · Type: string

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

Job {
  Name = backup-web
  Add Prefix = "/restore"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Add Suffix = ".restored"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Bootstrap = "/var/lib/bareos/restore.bsr"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Write Bootstrap = "/var/lib/bareos/%c.bsr"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  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.

Job {
  Name = backup-web
  Replace = IfNewer
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Maximum Bandwidth = 10 m/s
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Max Run Sched Time = 10 hours
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Max Run Time = 8 hours
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Full Max Runtime = 12 hours
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Incremental Max Runtime = 2 hours
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Differential Max Runtime = 4 hours
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Max Wait Time = 1 hour
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Max Start Delay = 4 hours
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Max Full Interval = 30 days
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Max Virtual Full Interval = 7 days
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Max Diff Interval = 7 days
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Prefix Links = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Prune Jobs = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Prune Files = yes
}

In the console:

configure update job=backup-web prunefiles=yes

Prune Volumes

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

Prune the volumes of the pool after the job.

Job {
  Name = backup-web
  Prune Volumes = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Purge Migration Job = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Enabled = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Spool Attributes = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Spool Data = yes
}

In the console:

configure update job=backup-web 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).

Job {
  Name = backup-web
  Spool Size = 50 g
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Rerun Failed Levels = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Prefer Mounted Volumes = yes
}

In the console:

configure update job=backup-web 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.

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

In the console:

configure update job=backup-web 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).

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

In the console:

configure update job=backup-web runafterjob="/usr/local/bin/notify-done %j %e"

Run After Failed Job

Key: runafterfailedjob · Type: command

Command the Director runs after a failed job.

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

In the console:

configure update job=backup-web 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.

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

In the console:

configure update job=backup-web 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.

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

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Maximum Concurrent Jobs = 1
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Reschedule On Error = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Reschedule Interval = 30 minutes
}

In the console:

configure update job=backup-web rescheduleinterval="30 minutes"

Reschedule Times

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

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

Job {
  Name = backup-web
  Reschedule Times = 3
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Priority = 10
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Allow Mixed Priority = yes
}

In the console:

configure update job=backup-web 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).

Job {
  Name = backup-web
  Selection Pattern = "backup-.*"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  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.

Job {
  Name = backup-web
  Selection Type = PoolUncopiedJobs
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Accurate = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Allow Duplicate Jobs = no
}

In the console:

configure update job=backup-web allowduplicatejobs=no

Allow Higher Duplicates

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

Deprecated: allow duplicates of a higher level.

Job {
  Name = backup-web
  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).

Job {
  Name = backup-web
  Cancel Lower Level Duplicates = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Cancel Queued Duplicates = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Cancel Running Duplicates = no
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Save File History = yes
}

In the console:

configure update job=backup-web 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).

Job {
  Name = backup-web
  File History Size = 10000000
}

In the console:

configure update job=backup-web filehistorysize=10000000

FD Plugin Options

Key: fdpluginoptions · Type: string list

Options passed to the File Daemon plugins of this job.

Job {
  Name = backup-web
  FD Plugin Options = "python:module_name=bareos-fd-postgresql"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  SD Plugin Options = "autoxflate:compress=lz4"
}

In the console:

configure update job=backup-web sdpluginoptions=autoxflate:compress=lz4

Dir Plugin Options

Key: dirpluginoptions · Type: string list

Options passed to the Director plugins of this job.

Job {
  Name = backup-web
  Dir Plugin Options = "python:module_name=x"
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Max Concurrent Copies = 10
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Always Incremental = yes
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Always Incremental Job Retention = 7 days
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Always Incremental Keep Number = 7
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Always Incremental Max Full Age = 30 days
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Max Full Consolidations = 1
}

In the console:

configure update job=backup-web 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.

Job {
  Name = backup-web
  Run On Incoming Connect Interval = 1 day
}

In the console:

configure update job=backup-web 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