I am writing a simple orchestrator for my backups, in Python, so that this is portable between OSes (specifically Windows 11 and Linux). It works great except that sometimes I get notified about failed backups.
My targets (different depending on the backup profile) are local file systems, REST servers, and S3.
The failures are transient - if a backup fails on a target, it recovers on the next backup cycle. Nevertheless, I would like to know why it failed. The causes can be multiple and at different layers: the network is down, a disk is full, a repo is corrupted, a specific restic error, …
The only information I found is about exit codes ( Scripting — restic 0.18.0 documentation ) so my question is whether I can find more details, somewhere?
In order to fix the question, let’s take:
- network failure
- can restic tell “the REST server did not respond”, or “cannot connect at all”
- or should I expect this at the network connection level (network connections exceptions)?
- disk full:
- can restic tell me that it could not write a backup because there was no space left?
- because otherwise i have no way to tell this without monitoring the target (which i may not be able to do)