Hi folks,
I just recent came across restic. Beforehand I backed up my data using a self written bash script and rsync with hardlinks to make something like a snapshot-based backup with retention.
Now I wanted to go more professional and set up a restic repository on the NAS (via NFS) and managed to backup using resticprofile withe tags etc. I even managed to read in the old backups by doing mount binds and specifying the original date.
However, when I wanted to copy the repository to another server via sftp, I ran into corruption errors. After reading a bit I reckoned that using NFS and the local backend for restic is not a good idea. So I switched to SFTP, but now other troubles come up (cf. below). I have done the following so far:
Updated ssh on the NAS (QNAP TS-421) via Entware to some 7.x version.
Replaced the network cables between the router and the NAS, switched the network ports (the NAS has two, I use one in single mode).
Tried numerous variations of mac and cipher options for ssh.
Tried numerous ServerAliveX options for ssh.
Watched the debug3 output of sshd on the server (nothing related to the error below).
Set sftp.connections to 2
Set up a local repository on the main server and copied from the NAS thereto - same problem.
The error I am getting is random, but when copying the whole repository, it will occur at some point. It can occur after copying 20 packs, but sometimes after more than 200 packs.
This is the output I am getting:
restic -r restic/ copy --from-repo sftp:nas:/share/MD0_DATA/restic --password-file /etc/resticprofile/password --from-password-file /etc/resticprofile/password -o sftp.connections=2
repository e7ad2153 opened (version 2, compression level auto)
repository 477927a2 opened (version 2, compression level auto)
[0:03] 100.00% 25 / 25 index files loaded
[0:00] 100.00% 1 / 1 index files loaded
snapshot ff638e9b of [/] at 2025-09-20 01:35:29.475577241 +0200 CEST by root@vdr
copy started, this may take a whileâŚ
subprocess ssh: Corrupted MAC on input.subprocess
ssh: ssh_dispatch_run_fatal: Connection to 192.168.178.52 port 2222: message authentication code incorrect
Load(<data/f347aa8ad6>, 17411070, 0) returned error, retrying after 900.395869ms: connection lost
Load(<data/e3f4f619c9>, 18163988, 0) failed: ssh command exited: exit status 255
[10:13] 22.02% 321 / 1458 packs copied
could not load snapshots: context canceled
Remove(<lock/988e3ebbbb>) failed: ssh command exited: exit status 255
error while unlocking: ssh command exited: exit status 255Fatal: StreamPack: ReadFull(<data/e3f4f619c9>): circuit breaker open for file <data/e3f4f619c9>
Any more ideas what I could test?