From 48e5c0984e8b735c841bcc3b0973d055948e9974 Mon Sep 17 00:00:00 2001 From: Dominik Schulz Date: Sun, 27 Jul 2025 17:14:06 +0200 Subject: [PATCH 1/2] Mark HTTP Error 507 as permanent This change classifies HTTP error 507 (Insufficient Storage) as a permanent error that should not be retried. I keep running into this once in a while and there is literally no point in retrying when the server is full. Fixes #5429 Signed-off-by: Dominik Schulz --- internal/backend/rest/rest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/backend/rest/rest.go b/internal/backend/rest/rest.go index 8df91beb3..5776f284f 100644 --- a/internal/backend/rest/rest.go +++ b/internal/backend/rest/rest.go @@ -182,7 +182,7 @@ func (b *Backend) IsPermanentError(err error) bool { var rerr *restError if errors.As(err, &rerr) { - if rerr.StatusCode == http.StatusRequestedRangeNotSatisfiable || rerr.StatusCode == http.StatusUnauthorized || rerr.StatusCode == http.StatusForbidden { + if rerr.StatusCode == http.StatusRequestedRangeNotSatisfiable || rerr.StatusCode == http.StatusUnauthorized || rerr.StatusCode == http.StatusForbidden || rerr.StatusCode == http.StatusInsufficientStorage { return true } } From 5c17c277f399d0087193cc6a40c1e09acaafb882 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 5 Sep 2025 19:07:09 +0200 Subject: [PATCH 2/2] add changelog --- changelog/unreleased/issue-5429 | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 changelog/unreleased/issue-5429 diff --git a/changelog/unreleased/issue-5429 b/changelog/unreleased/issue-5429 new file mode 100644 index 000000000..e8e7ca513 --- /dev/null +++ b/changelog/unreleased/issue-5429 @@ -0,0 +1,8 @@ +Bugfix: do not retry if rest-server runs out of space + +Rest-server return error `507 Insufficient Storage` if no more storage +capacity is available at the server. Restic now no longer retries uploads +in this case. + +https://github.com/restic/restic/issues/5429 +https://github.com/restic/restic/pull/5452