Should I ignore error/warning even return code is 0?

Hi,
I’ve been using restic for almost a year now and I’m really happy with it. I’d like to check something with you. Sometimes when I backup to S3 I will get some errors. Few examples from my latest backup:

rclone: 2020/01/23 00:26:13 ERROR : data/37/......: Post request put error: s3 upload: 400 Bad Request: <?xml version="1.0" encoding="UTF-8"?><Error><Code>RequestTimeout</Code><Message>Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.
rclone: 2020/01/23 00:26:13 ERROR : data/37/......: Post request rcat error: s3 upload: 400 Bad Request: <?xml version="1.0" encoding="UTF-8"?><Error><Code>RequestTimeout</Code><Message>Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.

Each time it happens I check the return code for the restic command. Each time I have a return code set to 0, which is the standard code to tell that all is fine. When I have any error/warning I run a check --read-data to check the repository. No error were found so far.

So, back to my question. In such situation, is it safe to say that a value of 0 for the return code means that the backup completed successfully ? Or should I continue to check the repository when error happens ?

Thanks.

1 Like

Getting this error also from time to time via cron mail when backup up to wasabi via s3 protocol. Since I get this error only from one server out of 10 and I always get nervous when reading something about “IO Error”, I was worried that this server could have harddisk or filesystem problems. But it doesn’t look like that.

So at the moment i guess that these are just temporary connection failures or something like that.

Restic retries multiple times when there is a remote transport error. These requests were likely retried immediately and succeeded.

1 Like

I guess you are correct. As before I ran check --read-data and not error were found.

The thing is can I ‘trust’ the return code ? So far I always got 0 and a check on the repository don’t find anything.

Yeah, since I get a return code 0 and a check returns no error I think it’s “safe” to say that restic simply retried and succeeded. I’m just a little bit nervous when any kind of error/warning is displayed when I run a backup.