12.1 Automation rules
Under Administration → Automation (admin role only) you define policies that apply to all matching backup jobs and repositories: regular restore tests, maintenance and check of the repositories, 3-2-1 copies, and default values for new backup jobs. Instead of creating the same jobs by hand for every machine and repository, one rule is enough; the server creates the required jobs itself.
Basic principle
Every policy produces managed jobs. These are ordinary jobs that the scheduler, the runner (one open run per job, catch-up after downtime, backup windows) and the protection status treat like any other. They differ in four ways:
In Jobs they carry the badge "automation". They cannot be edited, duplicated, disabled or deleted there; Automation policy… in the context menu leads back to this page. The Filter by origin selector in the job list and the Jobs button on the Automation page show managed jobs only.
Their runs have the trigger "automation"; changes to them appear in the job change history as "automation".
The server reconciles the managed jobs with the stored policies when policies are saved, after job changes, and once a minute. Reconciling creates, adjusts or removes jobs. A job with an open run is removed only after the run has ended.
The names are fixed: "Restore test: <job>", "Maintenance: <repository>", "Check: <repository>" and "Copy: <job> to <target>". If a name is already taken, the server appends " (2)", " (3)" and so on.
Your own jobs take precedence. If a backup job already has its own restore test job or its own copy job, or a repository has its own maintenance or check job, the policy skips it. You can also exclude individual jobs and repositories from a policy with Opt out.
Page layout and workflow
The page has two halves. On the left, the policies appear as cards (restore tests; maintenance and check together under Every repository; 3-2-1 copies; defaults for new backup jobs). On the right, the preview shows which backup jobs or repositories a policy covers and which it skips.
Turn a policy on with the checkbox in the card header and set its options.
On the right, pick the matching tab (Restore tests, Maintenance, Check, Copies) and check what is covered. The preview updates about 0.4 seconds after every unsaved change; nothing is saved by that.
If needed, take individual jobs or repositories out of the policy with Opt out (Include undoes it).
Click Save and apply. The server saves the policies and creates, changes or removes the managed jobs. The message gives the numbers ("Saved: 4 job(s) created, 0 changed, 0 removed."). Revert reloads the saved state.
The header of every card shows how many jobs or repositories are covered and skipped ("3 covered · 1 skipped"). A counter such as +2 ~1 −0 stands for jobs that would be created, changed and removed on save. If a policy is off, the preview still shows what it would cover.
Controls of the preview
Option | Effect | Default |
|---|---|---|
Tabs Restore tests, Maintenance, Check, Copies, Apply defaults | Selects the policy whose preview the list shows. The Apply defaults tab belongs to the defaults for new jobs (see below). | Restore tests |
Show: All, Covered, Skipped | Filters the list. | All |
Status column | covered, skipped or opted out; the Detail column gives the reason or the planned action. These texts come from the server and are in English, for example "10 random file(s) on its agent", "retention and prune" or "opted out". | – |
Opt out / Include | Adds the job (tabs Restore tests and Copies) or the repository (tabs Maintenance and Check) to the policy's exclusion list or removes it again. Takes effect only after Save and apply. | – |
Open job, Open managed job, Open repository | Jump to the source job, the generated job or the repository (also via right-click on the row). | – |
Jobs button | Opens the job list filtered to managed jobs. | – |
The shared schedule row
Restore tests, maintenance, check and scheduled copies use the same compact schedule row.
Option | Effect | Default |
|---|---|---|
Repeat: Daily, Weekly, Monthly | Type of schedule. Switching keeps the time and catch up. | per policy (see below) |
Weekdays (Mo to Su) | Weekly only: at least one day must stay active. | Sunday when switching to Weekly |
day | Monthly only: day of the month, 1 to 31. | 1 |
at | Time of day (24-hour). | per policy |
catch up | If the server was down at the due time, the run is made up once. | on |
Only time-based schedules are accepted. A manual schedule or "after another job" is rejected. Through the REST API you can also set cron expressions and rules (rules only with the normal "incremental" type); the interface then shows them as "Custom schedule (…)".
Restore tests for all backup jobs
For every backup job a verify job is created. On each run the server picks the job's latest snapshot and a random sample of its files together with their expected content from the repository index. The job's agent (or the server) restores the sample into a sandbox and checks the content. The result feeds the protection status: a restore point then counts as "verified". If the backup job is disabled, so is its test job. If a backup job has its own restore test (see chapter 06 Jobs), that one takes precedence.
Option | Effect | Default |
|---|---|---|
Checkbox in the card header | Turns the policy on. When off, no test jobs are created and existing managed test jobs are removed on save. | off |
When | Schedule of the tests (see above). | Weekly, Sunday, 04:00, catch up on |
Test: Files | Sample with a fixed number of random files. Field random files: 1 to 1000. | selected, 10 files |
Test: Percent | Sample as a share of the files. Field % of the files: above 0 up to 100 (the interface allows 0.1 and up, in steps of 0.1). | 10% |
Test: Full | Every file (up to 100,000) within the size limit. The test then runs with 100%. | – |
up to … MB | Larger files are not tested. Allowed: 1 to 1,048,576. | 256 |
Runs on: Job's agent | The backup job's agent restores into a sandbox. Database jobs also get a database test. | selected |
Runs on: Server | The server restores only the file sample; no database test. | – |
Workloads | Only backup jobs of these kinds are tested: Files, Disk image, SQL Server, PostgreSQL, MariaDB / MySQL, Docker, Hyper-V, Proxmox VE. With nothing selected ("none selected: all") all kinds are covered. | none (all) |
Jobs are skipped if they are opted out, have their own restore test, or their workload is not selected. Below the list, a summary shows the schedule and reminds you that the results feed the protection status ("verified").
Maintenance and check for every repository
Both policies share one card (Every repository) and create one maintenance job and one check job per repository. Maintenance applies the retention of the backup jobs (forget) and, if wanted, removes data that is no longer needed (prune). Check verifies the repository structure and optionally a share of the data (background in chapter 08 Repositories and Storage). Both jobs run on the server, not on an agent.
All initialized repositories are covered. Skipped are opted-out repositories, repositories that are not initialized, and those that already have their own maintenance or check job.
Option | Effect | Default |
|---|---|---|
Checkbox Maintenance | Turns the maintenance policy on. | off |
Maintenance schedule (row after Maintenance) | When maintenance runs (see The shared schedule row). | Weekly, Saturday, 05:00, catch up on |
prune | Removes data that is no longer needed after applying the retention. Unchecked, only the retention is applied ("retention only") and no storage is freed. | on |
Checkbox Check | Turns the check policy on. | off |
Check schedule (row after Check) | When the check runs. | Monthly, day 1, 06:00, catch up on |
read … % data | Share of the data files that are read and verified. 0 checks the structure only; allowed are 0 to 100 (step 0.1 in the interface). The higher the value, the longer the check takes and the more data is read, which on cloud or remote storage means more data transferred. | 0 |
3-2-1 copies for all backup jobs
For every covered backup job, a copy job is created that copies its snapshots into a second repository. This produces the second copy of the 3-2-1 rule automatically (three copies, two media, one offsite; copy jobs in detail in chapter 06 Jobs). The copy job runs in the backup job's source repository and has the target repository as its target.
Option | Effect | Default |
|---|---|---|
Checkbox 3-2-1 copies for all backup jobs | Turns the policy on. Once on, a target repository is mandatory; otherwise the server rejects the save ("copies: choose a target repository"). | off |
Copy to | The target repository (Secondary repository). Initialized repositories are offered, except those that receive server configuration backups. | Choose a repository… (none) |
When: After each backup | The copy starts after every successful run of the backup job. | selected |
When: On schedule | The copy runs on the schedule row (time-based only). | – |
Keep: same as the job | The copies take over the backup job's retention. | on |
Keep: fields Last, Daily, Weekly, Monthly, Yearly | Separate retention of the copies (visible only when same as the job is unchecked). An empty number or 0 omits the rule. | prefilled on unchecking: daily 7, weekly 4, monthly 12 |
Backup jobs are skipped when
they are opted out,
no target is chosen, the target does not exist, is not initialized or receives server configuration backups,
the backup job already backs up into the target repository,
an own copy job in the same source repository already covers the job (without restriction to agents or tags),
the retention of the copies conflicts with the target's Object Lock (see chapter 08 Repositories and Storage).
Defaults for new backup jobs
This card defines the preset values with which the job editor and the Back up a machine wizard start. It creates no jobs. Empty values set nothing. The link in the card header says how many existing jobs do not have these values yet ("3 existing jobs without them").
Option | Effect | Default |
|---|---|---|
Keep: Last, Daily, Weekly, Monthly, Yearly | Retention of new backup jobs. An empty number or 0 omits the rule; the readable summary appears beside it. | empty (no default) |
Types: Normal backup type | Type of regular runs: Incremental, Differential or Full. | Incremental |
Types: Periodic full | No periodic full, Active full on or Synthetic full on. For the last two, a weekday selector appears (at least one day). Applies to files, image and Hyper-V (note "files, image, Hyper-V" beside the selector). | No periodic full; day when switching on: Sunday |
Exclude | Default exclude patterns for files jobs, one per line (examples in the field: | empty |
Template buttons below Exclude | Exclude templates that apply in addition: windows-profiles-no-caches, linux-home-no-caches and no-vm-disks-and-isos (the tooltips show the description). | none |
Applying the defaults to existing jobs
New jobs receive the defaults automatically. For existing backup jobs without a protection plan (see chapter 07 Schedules and Plans) there is the Apply defaults tab. Managed jobs and jobs that belong to a plan are not touched.
Save the policies first with Save and apply. While there are unsaved changes, Preview and the apply button are locked (hint "Save the policies first").
On the Apply defaults tab, choose what to transfer: retention, backup types, excludes (all three preselected).
Click Preview (dry run). The table lists workload, changes and notes per job; "Every backup job without a plan already has these settings." appears when there is nothing to do.
Click Apply to N jobs and confirm the prompt.
The defaults never overwrite values a job already has:
Part | Set when |
|---|---|
retention | the job currently keeps everything (no retention set). If the default retention conflicts with the repository's Object Lock, the job stays unchanged and the note gives the reason. |
backup types | the job is a files, image or Hyper-V job and still uses the default types. |
excludes | the job is a files job and has neither exclude patterns nor exclude templates. If the specification would be invalid afterwards, the job stays unchanged and the note gives the error. |
Examples
Weekly test of all files jobs. Turn restore tests on, keep Weekly, Sunday, 04:00, set Test to Files with 25 random files, limit Workloads to Files, then Save and apply. One test job is created per files backup job; image and database jobs are left out.
Nightly copy to a NAS. Turn 3-2-1 copies on, choose the NAS repository under Copy to, select On schedule and Daily at 07:00. Uncheck same as the job and set the retention to daily 14, monthly 6 if the copies should be kept for a shorter time. One copy per backup job; the job that backs up to the NAS itself is skipped.
Monthly deep check. Turn the check on, Monthly, day 1, 06:00, and set read to 5% of the data. Each month one twentieth of every repository's data files is read; a repository that has its own check job is left out.
One job without a test. On the Restore tests tab, click Opt out for the job and save: the managed test job disappears (after a running run has ended), and the job appears in the list as "opted out".
REST API and permissions
All settings on this page are available to the admin role only. The defaults for new jobs are readable by everyone (the job editor needs them). All paths in the table are under /api/v1, so GET /automation calls /api/v1/automation.
Call | Role | Effect |
|---|---|---|
GET /automation | admin | Policies and preview |
POST /automation/preview | admin | Preview of a draft of the policies, without saving |
PUT /automation | admin | Saves and reconciles; the answer contains the policies, the preview and the numbers of created, changed and removed jobs |
GET /automation/defaults | readonly | Defaults for new jobs |
POST /automation/defaults/apply | admin | Dry run or apply; body: dry_run, retention, backup_types, excludes, job_ids |
Unknown fields are rejected; missing fields get the default values given above. The server records every change as "automation.updated" in the audit log. A complete body for PUT /automation:
{
"restore_tests": {
"enabled": true,
"schedule": { "type": "weekly", "time": "04:00", "days": ["sun"], "catch_up": true },
"mode": "sample",
"sample_files": 10,
"max_file_mb": 256,
"on_server": false,
"workloads": []
},
"maintenance": {
"enabled": true,
"schedule": { "type": "weekly", "time": "05:00", "days": ["sat"], "catch_up": true },
"prune": true
},
"check": {
"enabled": true,
"schedule": { "type": "monthly", "time": "06:00", "day": 1, "catch_up": true },
"read_data_percent": 5
},
"copies": {
"enabled": true,
"target_repository_id": "<repository ID>",
"after_backup": true
},
"defaults": {
"retention": { "keep_daily": 7, "keep_weekly": 4, "keep_monthly": 12 },
"backup": { "mode": "incremental" },
"exclude": ["**/node_modules", "*.tmp"],
"exclude_templates": ["windows-profiles-no-caches"]
}
}
The lists exclude_job_ids and exclude_repository_ids of the individual policies contain the jobs and repositories excluded with Opt out. In the defaults the API additionally accepts keep_within_days in the retention; the interface has no field for it.