-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: SFTP connection to Synology NAS broke in restic releases past restic_0.12.0 #4165
Comments
The issue looks a lot like a bug in the sftp implementation on the NAS (which hasn't received any updates for 4 years by now). With a more recent Synology NAS, restic 0.14.0 works for me. |
I just created an rclone config for the SSH backend to see if rclone might be able to access the repository.
The ssh demon on the NAS is indeed quite old:
I will update the workaround section of the ticket accordingly. However something must have changed between restic versions 0.12.0 and 0.12.1 |
Judging from other SFTP issues with Synology NAS, there's also a custom (?) sftp-server implementation in use. For openssh that seems to be located at The only sftp related changes in restic between 0.12.0 and 0.12.1 are that we've updated pkg/sftp from 1.12 to 1.13.2 (up to 1.13.5 by now) and added a call to explicitly set the file permissions of uploaded files. Without being able to reproduce, it's hard to tell what of that is the cause. To get a better idea where to look, you'd have to use |
fyi no issues with DS213
|
Hi @MichaelEischer , |
I've tried an old centos docker-image without issues 😞
|
could this maybe related to ##4209? |
Hello @AlBundy33 , However, I'm not shure how to do that and whether I'd be able to provide reproducible evidence for the developers. Thanks for your support @MichaelEischer , @AlBundy33 |
Output of
restic version
Current restic version I detected the problem with:
restic 0.15.0 compiled with go1.19.5 on linux/amd64
Last working version:
restic 0.12.0 compiled with go1.15.8 on linux/amd64
First version I could track down to contain the error:
restic 0.12.1 compiled with go1.16.6 on linux/amd64
How did you run restic exactly?
Environment is clean from RESTIC vars except for $RESTIC_PASSWORD_FILE
What backend/server/service did you use to store the repository?
SFTP
Expected behavior
I have an elderly NAS with a huge harddisk that contains a lot of backups from the past. The NAS is a Synology DS110j.
The repository on the NAS was created with version 'restic_0.10.0_linux_amd64'
When calling
restic snapshot
I expect restic to show the snapshots of the repository on the Synology NAS.This is the case e.g. with version restic_0.12.0. Versions past 0.12.0 are broken.
Actual behavior
The snapshot command (and any other command) fails with the following error message:
Since version restic_0.15 the error message is a bit different, but the result is the same:
Restic leaves a stale lock on the repository when exiting.
The Repository itself is in sane state, I can run
restic_0.15.0_linux_arm check
directly on the device w/o errors.Steps to reproduce the behavior
Behaviour is reproducible everytime with restic versions > 0.12.0, with any command.
When creating a new repository with
restic_0.12.0_linux_amd64 -r sftp:hwesseli@homestation:/backups/restic/test_0.12.0 init
the result in the filesystem of the NAS looks different to (broken) version restic_0.12.1_linux_amd64
Do you have any idea what may have caused this?
No
Do you have an idea how to solve the issue?
One workaround is to create a rclone SFTP configuration and use the rclone backend with restic.
Did restic help you today? Did it make you happy in any way?
This is the greatest backup tool I ever used. Since I trust in restic I dared to scan all my paper documents and shred them.
Thank you for this, it exactly matches my needs and way of working.
The text was updated successfully, but these errors were encountered: