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 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 } }