-
Notifications
You must be signed in to change notification settings - Fork 1.7k
bad error handling "Insufficient Storage" #5429
Description
Output of restic version
restic 0.18.0 compiled with go1.24.1 on linux/amd64
What backend/service did you use to store the repository?
rest-server 0.14.0
Problem description / Steps to reproduce
I am using restic with rest-server as storage backend:
USER PID PPID %CPU S VSZ COMMAND restic 129470 1 0.8 S 1234776 /opt/rest-server/rest-server --path /home/restic/data --listen :8000 --log /var/log/rs.log --private-repos --max-size 2684354560 --tls --tls-min-ver 1.3
This is my configuration for testing quotas.
When I try to backup a 4 GB test-file (bigger than the allowed quota), then restic is in an endless loop.
I have to terminate restic with Ctrl-C
If this happens in a cron job, I would not get an error message from the cron daemon, because restic does not terminate.
Expected behavior
restic should terminate with an error exit status after receiving "Insufficient Storage"
Actual behavior
restic runs in endless loop:
`
root@fex:/tmp# ll tmp.dd
-rw-r--r-- root root 4,194,304,000 2025-06-23 10:42:27 tmp.dd
root@fex:/tmp# restic backup -v --compression=off -H fex --tag tmp tmp.dd
open repository
repository c859ba78 opened (version 2, compression level off)
no parent snapshot found, will read all files
load index files
[0:00] 100.00% 5 / 5 index files loaded
start scan on [tmp.dd]
start backup on [tmp.dd]
scan finished in 0.302s: 1 files, 3.906 GiB
Save(<data/d8714697b4>) returned error, retrying after 1.339594961s: unexpected HTTP response (507): 507 Insufficient Storage
Save(<data/791f822bbb>) returned error, retrying after 1.125768187s: unexpected HTTP response (507): 507 Insufficient Storage
(...)
Save(<data/d8714697b4>) returned error, retrying after 39.440260345s: unexpected HTTP response (507): 507 Insufficient Storage
Save(<data/783d72b21b>) returned error, retrying after 31.789497553s: unexpected HTTP response (507): 507 Insufficient Storage
Save(<data/791f822bbb>) returned error, retrying after 1m23.674744106s: unexpected HTTP response (507): 507 Insufficient Storage
Save(<data/aa88ae165a>) returned error, retrying after 1m0.344519406s: unexpected HTTP response (507): 507 Insufficient Storage
Save(<data/3e64ed774c>) returned error, retrying after 1m20.275283207s: unexpected HTTP response (507): 507 Insufficient Storage
(...)
`
I have stopped it with Ctrl-C (after 10 minutes).
Do you have any idea what may have caused this?
restic does not react properly to rest-server error messages