Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit with non-zero exit code in case of storage failure #1183

Closed
rdelaage opened this issue Jul 29, 2024 · 1 comment
Closed

Exit with non-zero exit code in case of storage failure #1183

rdelaage opened this issue Jul 29, 2024 · 1 comment
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR

Comments

@rdelaage
Copy link

Hello,

I am using rustic in a backup script. I would like to be able to send notifications by email in case of errors during the process. I realized that in case of storage failure, rustic do not report the error using a non-zero exit code. For example

$ rustic check
[INFO] using config /etc/rustic/rustic.toml
[WARN] operation=stat path=config -> retry after 1.1497064830000001s: error=Unexpected (temporary) at stat, context: { url: http://10.245.25.7/mail.delaage.fr-backups/config, called: http_util::Client::send, service: s3, path: config } => send http request, source: error sending request for url (http://10.245.25.7/mail.delaage.fr-backups/config): error trying to connect: tcp connect error: No route to host (os error 113)
[WARN] operation=stat path=config -> retry after 2.141488671s: error=Unexpected (temporary) at stat, context: { url: http://10.245.25.7/mail.delaage.fr-backups/config, called: http_util::Client::send, service: s3, path: config } => send http request, source: error sending request for url (http://10.245.25.7/mail.delaage.fr-backups/config): error trying to connect: tcp connect error: No route to host (os error 113)
[WARN] operation=stat path=config -> retry after 4.00917232s: error=Unexpected (temporary) at stat, context: { url: http://10.245.25.7/mail.delaage.fr-backups/config, called: http_util::Client::send, service: s3, path: config } => send http request, source: error sending request for url (http://10.245.25.7/mail.delaage.fr-backups/config): error trying to connect: tcp connect error: No route to host (os error 113)
[WARN] operation=stat path=config -> retry after 8.774814248s: error=Unexpected (temporary) at stat, context: { url: http://10.245.25.7/mail.delaage.fr-backups/config, called: http_util::Client::send, service: s3, path: config } => send http request, source: error sending request for url (http://10.245.25.7/mail.delaage.fr-backups/config): error trying to connect: tcp connect error: No route to host (os error 113)
[WARN] operation=stat path=config -> retry after 16.142160177s: error=Unexpected (temporary) at stat, context: { url: http://10.245.25.7/mail.delaage.fr-backups/config, called: http_util::Client::send, service: s3, path: config } => send http request, source: error sending request for url (http://10.245.25.7/mail.delaage.fr-backups/config): error trying to connect: tcp connect error: No route to host (os error 113)
[ERROR] service=s3 operation=stat path=config -> Unexpected (persistent) at stat, context: { url: http://10.245.25.7/mail.delaage.fr-backups/config, called: http_util::Client::send, service: s3, path: config } => send http request, source: error sending request for url (http://10.245.25.7/mail.delaage.fr-backups/config): error trying to connect: tcp connect error: No route to host (os error 113)
error: error listing the repo config file
$ echo $?
0

I am using s3 storage using the OpenDAL backend and rustic version v0.7.0

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Jul 29, 2024
@simonsan
Copy link
Contributor

Closing for being a duplicate of #927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants