mirror of
https://github.com/restic/restic.git
synced 2024-12-22 15:57:07 +00:00
doc: document exit codes
This commit is contained in:
parent
94fdca08c4
commit
294c8524ed
1 changed files with 27 additions and 0 deletions
|
@ -38,6 +38,33 @@ to ``cat config``) and it may print a different error message. If there
|
|||
are no errors, restic will return a zero exit code and print the repository
|
||||
metadata.
|
||||
|
||||
Exit codes
|
||||
**********
|
||||
|
||||
Restic commands return an exit code that signals whether the command was successful.
|
||||
The following table provides a general description, see the help of each command for
|
||||
a more specific description.
|
||||
|
||||
.. warning::
|
||||
New exit codes will be added over time. If an unknown exit code is returned, then it
|
||||
MUST be treated as a command failure.
|
||||
|
||||
+-----+----------------------------------------------------+
|
||||
| 0 | Command was successful |
|
||||
+-----+----------------------------------------------------+
|
||||
| 1 | Command failed, see command help for more details |
|
||||
+-----+----------------------------------------------------+
|
||||
| 2 | Go runtime error |
|
||||
+-----+----------------------------------------------------+
|
||||
| 3 | ``backup`` command could not read some source data |
|
||||
+-----+----------------------------------------------------+
|
||||
| 10 | Repository does not exist (since restic 0.17.0) |
|
||||
+-----+----------------------------------------------------+
|
||||
| 11 | Failed to lock repository (since restic 0.17.0) |
|
||||
+-----+----------------------------------------------------+
|
||||
| 130 | Restic was interrupted using SIGINT or SIGSTOP |
|
||||
+-----+----------------------------------------------------+
|
||||
|
||||
JSON output
|
||||
***********
|
||||
|
||||
|
|
Loading…
Reference in a new issue