# Classify restic job failures from the documented exit status

> The restic 0.19.1 scripting guide requires unknown exit codes to be treated as failure; review the job result separately from backup scope and recovery evidence.

- Canonical URL: https://update.dsesecurity.com/updates/classify-restic-job-failures-from-the-documented-exit-status/
- Publisher: Detection Systems & Engineering (DSE Security)
- Author: DSE Security Editorial Team
- Published: 2026-10-28T23:23:25+00:00
- Modified: 2026-10-28T23:23:38+00:00
- Last reviewed by DSE: 2026-10-28
- Resource type: Guide
- DSE priority: Advisory
- Topics: Business Continuity, IT
- Reading time: 3 minutes

## What you need to know

The restic 0.19.1 scripting guide requires unknown exit codes to be treated as failure; review the job result separately from backup scope and recovery evidence.

## Potentially affected

Review scope: restic 0.19.1 automation; confirm the installed client and wrapper before applying the documented code table.

## DSE recommendation

DSE recommends a documented non-success branch, preserved native exit status and attended escalation for unrecognized outcomes.

## Article

Bottom line: DSE recommendation: decide how a scheduled backup job will report an unsuccessful or unrecognized result before using its run history as operational evidence. Keep that decision separate from which files were selected and whether a recovery exercise has passed.

## Source fact: what the authority says

The [restic scripting guide](https://restic.readthedocs.io/en/stable/075_scripting.html) identifies version 0.19.1. Its general table defines zero as success. For backup, code 3 means some source data could not be read; for forget, it means one or more snapshots could not be removed. Unknown exit codes must be treated as failure, with command-specific help providing further detail.

## What the source does not establish

This table is not proof that a particular job protected the intended files, produced an application-consistent recovery point or can restore a service. This article does not certify a wrapper, scheduler or installed client. Treat those as separate review subjects and retain uncertainty when the observed result cannot be explained.

## Applicability questions

- Which client version and exact command will the job execute, and who owns changes to that combination?

- Does the wrapper preserve the process result before running another command, and what will its attended recipient call non-success?

- Where will an unexpected code, interrupted run or missing completion record be investigated?

- Which separate evidence will establish backup scope and recoverability rather than merely process completion?

## DSE recommendation: controlled next steps

The following paragraphs are DSE recommendations, not instructions or guarantees from the source.

Build the classification around the exact operation, not a green status shared by all jobs. In the review sheet, give the backup and forget cases their own names, command identifiers and reviewed source meanings. Keep the recorded exit status next to the operation so the interpretation can be checked.

Ask the reviewer to explain two status-3 records without relying on a generic label. Which one reports unreadable source data, and which one reports unsuccessful snapshot removal? Require that distinction to survive the scheduler, dashboard and notification handoffs. Keep secrets and sensitive file names out of the shared comparison.

Give an unknown result a separate non-success route with a named investigator. Preserve the native status and redacted diagnostics before other wrapper steps. Decide retry or recovery policy separately; neither is established by this general code table. Keep a missing run distinct from a completed run with an unsuccessful result.

## Verification and evidence

Proposed verification, not a performed test: define BACKUP-READ for a genuine backup status 3 and FORGET-REMOVE for a genuine forget status 3. Obtain either result only in a disposable, nonsensitive exercise where the condition can be safely reproduced; otherwise mark it untested. Compare each with its command-specific meaning above, without asserting that a snapshot was created.

Define UNKNOWN-RESULT as a synthetic status absent from the reviewed table, injected at the wrapper boundary. Require its downstream record to remain non-success and identify the injection clearly. Retain the invocation, native or injected value, classification and attended notification. Ask another operator to trace all three records through each handoff; assess backup scope and restoration evidence separately.

## Official references

- [restic 0.19.1 — Scripting](https://restic.readthedocs.io/en/stable/075_scripting.html) — official product documentation; source version and applicability limits are stated above.

Source review completed October 28, 2026. Recheck the official documentation and deployment-specific applicability before a production change.

## Primary reference

- Name: restic 0.19.1 — Scripting
- Authority: restic.readthedocs.io
- URL: https://restic.readthedocs.io/en/stable/075_scripting.html
- Source publication date: Not stated by the source

## Citation and use

Preferred citation: “Classify restic job failures from the documented exit status,” DSE Security, https://update.dsesecurity.com/updates/classify-restic-job-failures-from-the-documented-exit-status/
Publishing principles: https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/
Usage and citation policy: https://update.dsesecurity.com/usage/
Copyright © 2026 Detection Systems & Engineering. All rights reserved.
