8.8 Maintenance, checks and restore tests
A repository stays healthy only if it is maintained and checked regularly. Three job types take care of this: Maintenance applies retention and frees storage, Check verifies the structure and optionally the data, and the Restore test proves that files can really be brought back.
You create all three in the job editor (see chapter 06 Jobs), through the More… menu of a repository card (Maintenance…, Check…), or automatically for all repositories and backup jobs through the automation settings (see chapter 12 Automation and Deployment). Schedules are described in chapter 07 Schedules and Plans.
Maintenance job
Maintenance applies the retention of every backup job in the repository, removes stale temporary files and refreshes statistics. Without a maintenance job, the repository page warns that snapshots past their retention are never removed (see section 8.1 Repository overview and details). A weekly run is recommended; Add maintenance job after creating a repository sets it up for Sundays at 04:00.
Option | Effect | Default |
|---|---|---|
Repository | The repository to maintain. | – |
Prune unused data (safe while backups run) | Runs prune after old snapshots are forgotten: packs that no longer hold any data are deleted, partly used ones are repacked. Without the tick, snapshots are forgotten but no storage is freed. | on |
What a maintenance run does
Hardened repository: the helper releases files whose lock has ended and locks again files whose lock request failed (see section 8.5 Hardened repositories).
Retention: the rules are applied again for every backup job of the repository and every copy job that copies here. Snapshots under a hold, Object Lock or immutability stay ("N snapshot(s) forgotten, M kept by holds or object lock", see section 8.4 Retention).
Prune (if selected): removes unused data. With Object Lock, packs younger than the lock plus one day stay; with a per-machine index, pruning is more aggressive (0 % unused tolerated, all packs holding only duplicate blocks are marked or repacked), which costs more I/O. Finally maintenance deletes temporary files older than 24 hours.
Per-machine index: the server then reconciles the assignment of blocks to machines with the repository; the number of shared blocks, the size saved and remaining duplicates are in the log. Duplicate copies that are still marked disappear in a later maintenance after a grace period (23 hours).
Cleanup: stale lock files of agents are removed, machine quotas are recomputed (see section 8.6 Rotated drives and storage quotas) and the statistics are refreshed.
Maintenance and backups do not exclude each other; prune is safe while backups run. Only a limited number of jobs run on one repository at the same time (see chapter 13 Configuration Reference, max_jobs_per_repository).
Check job
The check verifies the structure of the repository and, on request, reads part of the data.
Option | Effect | Default |
|---|---|---|
Repository | The repository to check. | – |
Read and verify data (%) | Share of the pack files that are read and compared with their checksums. 0 checks the structure only, 100 reads all data. Values from 0 to 100. | 0 |
Result: errors make the run fail ("check found N error(s)"), warnings give the status warning, otherwise success. Structure checks are quick; the higher the data share, the longer the run takes and the more is read from the storage (on S3 that is billed as well). A monthly check is recommended, with a small data share if needed.
Restore test
The test checks the latest snapshot of a backup job: a random sample of files is restored into a sandbox folder, every piece is compared with its hash, and the folder is removed afterwards.
Option | Effect | Default |
|---|---|---|
Backup job to test | The backup job whose latest snapshot is tested. Required. | – |
Restore on | The machine that runs the test: an agent (the source machine is marked) or Server (files only). Database and VM tests work only on an agent. | Server (files only) |
Sample files | Number of files (0 to 1000). 0 means no file test, only a database or boot test. | 10 |
Skip files larger than (MB) | Larger files are not sampled. | 256 |
Sandbox folder | Folder on the tester in which a subfolder is created per run and deleted afterwards. | folder in the state directory of the agent or server ( |
Scan the restored files for malware | On an agent only: the tester's antivirus scanner (Defender or ClamAV, plus YARA rules from | off |
If malware is found | fail the test or only warn (the test then counts as passed). | fail the test |
Restore databases into a temporary database and check integrity | Database jobs only. Each database is restored as | on |
Boot test: start the restored VM in an isolated network and wait for it | VM jobs only (Proxmox, Hyper-V). | off |
Boot test options:
Option | Effect | Default |
|---|---|---|
Bridge (Proxmox) | Isolated Linux bridge without uplink; it must exist (for example | empty |
First VM ID (Proxmox) | First ID tried for the temporary VM. | 9900 |
Private switch (Hyper-V) | Private virtual switch; it must exist. | empty |
Target folder (Hyper-V) | Folder for the temporary VM, required for Hyper-V. | empty |
Storage (optional) | Target storage on Proxmox. | the original storages |
Success when | guest agent answers (QEMU guest agent or Hyper-V heartbeat) or VM is running (the VM only has to keep running). | guest agent answers |
Timeout (s) | How long to wait for the guest, 30 to 3600 seconds in the form. | 300 |
Snapshots of other kinds (for example images or applications) are tested as files ("N snapshots are tested as files").
Automatic restore tests
Through the automation settings (Restore tests, see chapter 12 Automation and Deployment) every backup job gets a managed restore test. A job's own restore test takes precedence.
Option | Effect | Default |
|---|---|---|
Enabled | Turns the rule on. | off |
Schedule | Must be time-based. | Sundays 04:00 |
Sample mode | Files (N random files), Percent (share of the files) or Full (every file up to the size limit, at most up to the upper limit of the sample). | Files |
Files per test | 1 to 1000 in mode Files. | 10 |
% of the files | Above 0 up to 100 percent in mode Percent. | 10 |
Size limit in MiB | Larger files are not tested. | 256 |
Server | The server restores the file sample instead of the job's agent (which also runs database tests). | off |
Workloads | Only backup jobs of these kinds; empty: all. | all |
Exclusions | Jobs that are excluded. | none |
Protection status
The results feed each machine's protection status (see chapter 10 Monitoring and Reports):
Color | Meaning |
|---|---|
Green | A restore point exists within the RPO (default 24 hours, or the strictest RPO of the machine's plans, plus one hour of buffer). Restore tests are optional. |
Yellow | A restore test failed, or a job reports warnings. |
Red | No restore point within the RPO. |