"Failed to send packet" error during restore

While restoring a section of a large repository, the restore proceeds normally for a while, then starts throwing thousands of these errors:

Load(<data/XXXXXXXXXX>, 4567345, 0) returned error, retrying after 1.0000000000s: failed to send packet: write |1: file already closed

Any idea what could be causing this?

This sounds like the remote system closed the TCP channel before restic could finish sending the request for the file, or the network connection was otherwise interrupted.

What storage backend are you using?

We’re restoring to a new FreeNAS server.

Our repository is currently located on our offsite backup machine. It’s a low performance Ubuntu box with a RAID array.

We’re using a spare high-performance server on-site to execute the restore. It connects to the offsite server via sftp, and restores to our new FreeNAS server via a local samba mount.

I’m new to FreeNAS, so there is a chance there is a configuration issue.

Here’s what the command we are running looks like.

./restic -r sftp:backup@192.168.X.XXX:/mnt/relica_destination/ backups/default restore latest --target /mnt/FreeNAS --no-lock --verbose --verbose --verbose --include "/mnt/raid/CHARTS/"

It’s worth noting that these errors only happen on larger restores that take overnight to finish. Maybe there is some nightly maintenance happening on the FreeNAS box that is interrupting things…

That’s entirely possible, or some overnight network maintenance. Seeing these errors doesn’t necessarily mean that restic can’t continue, it’s just letting you know that it’s having trouble fetching files. It will retry each download for up to some amount of time before giving up.