forked from TrueCloudLab/restic
doc/backup: link to exit code for scripting section
This commit is contained in:
parent
a8efaee03c
commit
ff9ef08f65
2 changed files with 6 additions and 3 deletions
|
@ -778,11 +778,12 @@ environment variables and configuration files; see their respective manuals.
|
||||||
Exit status codes
|
Exit status codes
|
||||||
*****************
|
*****************
|
||||||
|
|
||||||
Restic returns one of the following exit status codes after the backup command is run:
|
Restic returns an exit status code after the backup command is run:
|
||||||
|
|
||||||
* 0 when the backup was successful (snapshot with all source files created)
|
* 0 when the backup was successful (snapshot with all source files created)
|
||||||
* 1 when there was a fatal error (no snapshot created)
|
* 1 when there was a fatal error (no snapshot created)
|
||||||
* 3 when some source files could not be read (incomplete snapshot with remaining files created)
|
* 3 when some source files could not be read (incomplete snapshot with remaining files created)
|
||||||
|
* further exit codes are documented in :ref:`exit-codes`.
|
||||||
|
|
||||||
Fatal errors occur for example when restic is unable to write to the backup destination, when
|
Fatal errors occur for example when restic is unable to write to the backup destination, when
|
||||||
there are network connectivity issues preventing successful communication, or when an invalid
|
there are network connectivity issues preventing successful communication, or when an invalid
|
||||||
|
@ -795,5 +796,5 @@ file read errors that occurred while running the backup. If there are errors of
|
||||||
restic will still try to complete the backup run with all the other files, and create a
|
restic will still try to complete the backup run with all the other files, and create a
|
||||||
snapshot that then contains all but the unreadable files.
|
snapshot that then contains all but the unreadable files.
|
||||||
|
|
||||||
One can use these exit status codes in scripts and other automation tools, to make them aware of
|
For use of these exit status codes in scripts and other automation tools, see :ref:`exit-codes`.
|
||||||
the outcome of the backup run. To manually inspect the exit code in e.g. Linux, run ``echo $?``.
|
To manually inspect the exit code in e.g. Linux, run ``echo $?``.
|
||||||
|
|
|
@ -39,6 +39,8 @@ Note that restic will also return exit code ``1`` if a different error is encoun
|
||||||
If there are no errors, restic will return a zero exit code and print the repository
|
If there are no errors, restic will return a zero exit code and print the repository
|
||||||
metadata.
|
metadata.
|
||||||
|
|
||||||
|
.. _exit-codes:
|
||||||
|
|
||||||
Exit codes
|
Exit codes
|
||||||
**********
|
**********
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue