Restic: Restic check: no space left on device

Created on 24 Oct 2019  路  2Comments  路  Source: restic/restic

I noticed today that check did not finish.
The backup runs every day via cron so I only saw this by accident.

Log

Load(<index/7e8936465a>, 0, 0) returned error, retrying after 552.330144ms: Copy: write /tmp/restic-check-cache-311239722/30afc1b0f86ae2859baa4dbc3aaaa661198
d492901999ec22bb1784be441da90/index/7e/7e8936465ae6ad8b7ac488324f88688ff504d0d9d7448d40aba3f6f932345759: no space left on device
Load(<index/7e8936465a>, 0, 0) returned error, retrying after 1.080381816s: Copy: write /tmp/restic-check-cache-311239722/30afc1b0f86ae2859baa4dbc3aaaa661198
d492901999ec22bb1784be441da90/index/7e/7e8936465ae6ad8b7ac488324f88688ff504d0d9d7448d40aba3f6f932345759: no space left on device
Load(<index/7e8936465a>, 0, 0) returned error, retrying after 1.31013006s: Copy: write /tmp/restic-check-cache-311239722/30afc1b0f86ae2859baa4dbc3aaaa661198d
492901999ec22bb1784be441da90/index/7e/7e8936465ae6ad8b7ac488324f88688ff504d0d9d7448d40aba3f6f932345759: no space left on device
Load(<index/7e8936465a>, 0, 0) returned error, retrying after 1.582392691s: Copy: write /tmp/restic-check-cache-311239722/30afc1b0f86ae2859baa4dbc3aaaa661198
d492901999ec22bb1784be441da90/index/7e/7e8936465ae6ad8b7ac488324f88688ff504d0d9d7448d40aba3f6f932345759: no space left on device

Describe what you'd like restic to do differently.
I understand how check works and that it needs tmp space to do that. I also know that it can be fixed with chaning tmp dir.
But it would be great - if possible - restic checks first if there is enough space to do that or exits with error. Or that it stops during check with an error if no space is left instead of retrying (forever?)

Version
restic 0.9.5 compiled with go1.12.4 on linux/386

Did restic help you or made you happy in any way?
Yes, this is a great piece of software with friendly developers and helpful community.
Please continue being awesome!

minor complexity wanted

Most helpful comment

It would be great if someone could look into the possibility of making restic not retry these local operations when it's due to out of space.

All 2 comments

But it would be great - if possible - restic checks first if there is enough space to do that or exits with error.

I'm not sure restic knows how much space it needs in advance. Even still, very few Linux tools check to see how much disk space is available when performing operations that use disk space. It's easier to just _try_ and if you run out of disk space, abort.

Or that it stops during check with an error if no space is left instead of retrying (forever?)

It appears that restic views this as though the remote couldn't serve the index file, rather than a local error saving it to the disk. Therefore it retries thinking that the remote is experiencing a transient error; it would be appropriate to abort in this case, so I do think this is a bug of incorrectly classifying the error.

It would be great if someone could look into the possibility of making restic not retry these local operations when it's due to out of space.

Was this page helpful?
0 / 5 - 0 ratings