backup: return exit code 3 if not all targets are available (#5347)

to make the exit code behaviour consistent with files inaccessible during the backup phase, making this change to exit with code 3 if not all target files/folders are accessible for backup

---------

Co-authored-by: Michael Eischer <michael.eischer@fau.de>
This commit is contained in:
Srigovind Nayak
2025-10-05 19:08:52 +05:30
committed by GitHub
parent 22f254c9ca
commit 481fcb9ca7
4 changed files with 41 additions and 11 deletions

View File

@@ -0,0 +1,11 @@
Bugfix: Exit with code 3 when some `backup` source files do not exist
Restic used to exit with code 0 even when some backup sources did not exist. Restic
would exit with code 3 only when child directories or files did not exist. This
could cause confusion and unexpected behavior in scripts that relied on the exit
code to determine if the backup was successful.
Restic now exits with code 3 when some backup sources do not exist.
https://github.com/restic/restic/issues/4467
https://github.com/restic/restic/pull/5347