restic: Unable to remove lock from repo on Synology NAS

What's the version of restic you used? 

restic 0.9.6 compiled with go1.12.12 on linux/amd64

What commands did you execute to get to where the bug occurred?

RESTIC_PASSWORD=my-password restic -r sftp://t440_backup@nas.lan/t440_backup/restic snapshots

What did you expect?

A correct return to shell prompt after snapshots listed.

What happened instead?

After snapshots listed the error is reported infinitelly (until I break it with Ctrl-C - a lot of Ctrl-C was needed):

------------------------------------------------------------
17 snapshots
Remove(<lock/f845632e7c>) returned error, retrying after 615.202403ms: file does not exist
Remove(<lock/f845632e7c>) returned error, retrying after 931.520507ms: file does not exist
...last line repeating...
Are you aware of a way to reproduce the bug?

Yes, it occurs every time I access repo on Synology. Until the repo was on Debian Linux I have never met this error. I tried to save log (export DEBUG_LOG=...) but no logfile was created.

State of lock file on NAS looks good: file exists, permissions are ok.

bash-4.4# pwd
/volume1/t440_backup/restic

bash-4.4# ls -l
total 4
-rw------- 1 t440_backup users  155 Nov 28  2021 config
drwx------ 1 t440_backup users 1024 Nov 28  2021 data
drwx------ 1 t440_backup users  640 Aug 24 04:35 index
drwx------ 1 t440_backup users  128 Nov 28  2021 keys
drwx------ 1 t440_backup users  128 Aug 25 10:18 locks
drwx------ 1 t440_backup users 2176 Jul 24 17:33 snapshots

bash-4.4# ls -l locks
total 4
-rw------- 1 t440_backup users 166 Aug 25 10:18 f845632e7c51a874d1cfbe419b3016c062920089370890fb98b9ec2cf578d1af

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Could you try whether a repository path that starts with a leading slash works? e.g. sftp://t440_backup@nas.lan/t440_backup/restic snapshots would become sftp://t440_backup@nas.lan//t440_backup/restic snapshots.

I’m suggesting this because the sftp output said Removing /t440_backup/restic/locks/b411cffdab7a5486131cdbf1decb926ad3536b08604f8162b3beb654d53b6384 instead of Removing t440_backup/restic/locks/b411cffdab7a5486131cdbf1decb926ad3536b08604f8162b3beb654d53b6384

I had the same issue with Synology NAS and was reading quite a few github threads but this added slash finally fixed the issue.

Perfect! Adding extra slash helped!

Could you try whether a repository path that starts with a leading slash works? e.g. sftp://t440_backup@nas.lan/t440_backup/restic snapshots would become sftp://t440_backup@nas.lan//t440_backup/restic snapshots.

I’m suggesting this because the sftp output said Removing /t440_backup/restic/locks/b411cffdab7a5486131cdbf1decb926ad3536b08604f8162b3beb654d53b6384 instead of Removing t440_backup/restic/locks/b411cffdab7a5486131cdbf1decb926ad3536b08604f8162b3beb654d53b6384