Hi,
I have a notoriously unreliable internet connection. At a frequency of about once a week, I experience long running restic connections being randomly interrupted.
Now, I run restic daily to do backups to a remote server. My backup script runs the following restic commands in this order:
- restic backup
- restic --keep-last X […] forget
- restic prune
- restic check
- restic check --read-data-subset 10%
Now, as mentioned my connection is unrealiable and thus, each of these operations may be arbitrarily interrupted.
Does restic handle this gracefully?
I would assume it does.
What prompted me to post here, is that sometimes when this happens, I get messages like these in the logs:
Example 1:
rclone: packet_write_wait: Connection to x.x.x.x port 23: Broken pipe
Load(<data/XXXXXXXX>, 0, 0) returned error, retrying after 487.924606ms: Copy: unexpected EOF
Load(<data/XXXXXXXX>, 0, 0) returned error, retrying after 675.519179ms: Copy: unexpected EOF
error for tree XXXXXXXX:
Load(<data/XXXXXXXX>, 0, 0) returned error, retrying after 521.049113ms: Copy: unexpected EOF
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
Load(<data/XXXXXXXX>, 0, 0) returned error, retrying after 412.388072ms: Copy: unexpected EOF
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
Load(<data/XXXXXXXX>, 0, 0) returned error, retrying after 749.266558ms: Copy: unexpected EOF
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error for tree XXXXXXXX:
ReadFull(<data/XXXXXXXX>): rclone stdio connection already closed
error while unlocking: rclone stdio connection already closedFatal: repository contains errors
rclone: packet_write_wait: Connection to x.x.x.x port 23: Broken pipe
Load(<data/XXXXXXXX6e>, XXXXXXXX, 0) returned error, retrying after 706.258216ms: ReadFull: read |0: file already closed
Load(<data/XXXXXXXXaf>, XXXXXXXX, 0) returned error, retrying after 711.953067ms: ReadFull: read |0: file already closed
Load(<data/XXXXXXXXbb>, XXXXXXXX, 0) returned error, retrying after 402.503648ms: ReadFull: read |0: file already closed
Load(<data/XXXXXXXX55>, XXXXXXXX, 0) returned error, retrying after 679.61763ms: ReadFull: read |0: file already closed
Save(<lock/XXXXXXXX0f>) returned error, retrying after 450.589951ms: Post "http://localhost/locks/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX": read |0: file already closed
Load(<data/XXXXXXXX29>, XXXXXXXX, 0) returned error, retrying after 472.250231ms: ReadFull: read |0: file already closed
pack XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX failed to download: StreamPack: rclone stdio connection already closed
pack XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX failed to download: StreamPack: rclone stdio connection already closed
pack XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX failed to download: StreamPack: rclone stdio connection already closed
[...]
pack XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX failed to download: StreamPack: rclone stdio connection already closed
pack XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX failed to download: StreamPack: rclone stdio connection already closed
pack XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX failed to download: StreamPack: rclone stdio connection already closed
pack XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX failed to download: StreamPack: rclone stdio connection already closed
pack XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX failed to download: StreamPack: rclone stdio connection already closed
error while unlocking: rclone stdio connection already closedFatal: repository contains errors
I am specifically concerned by the message “repository contains errors”.
I am not sure if this means that it actually does contain errors. Or if this message is also produced when a check fails due to the connection being interrupted?
I would like to just do a full check of all the data. However, this is not practically possible on this connection as the repository is many TB in size, and with this connection it is not possible to run a full check without some random fallout of the connection happening during the check…
So my questions boil down to:
1: Does this message really mean the repository positively contains errors - or may this message be produced just on these types of interruptions due to network issues?
2: Do you have any advice on how to handle such situations with unreliable connectivity? For example, would it be a good approach to do a full check with --read-data from another location with better connectivity? (That IS possible for me, however, that would expose the repository key to another location, and thus not something I would like to do on a regular basis if not necessary)