Removing stale locks

I don’t backup simultaneously to the same repository. Can I prevent the creation of the lock file?

The SFTP backend somehow doesn’t allow deletion of lock file and Restic stalls with error that lock file doesn’t exist. I checked on the backend server, the user actually has rw access to the lock. Unfortunately Ctrl+D doesn’t kill the restic process either (which attempts accessing the lock for several minutes), so I have to close the terminal manually.

I don’t know why I am getting this error. It used to work til now. The behavior suddenly changed.

Any idea?

What version are you running? Might have something to do with this bug?

Might try the latest beta from restic beta releases (latest)

I run 13.1. I can’t find an older Restic binary to test, and have to compile an older restic repositories (which might need older versions of Go).

Might be a restic bug. Because Restic unlock fails too, but SFTP user can remove the lock files (sftp into the remote and rm locks works).

I disabled Recycle Bin on the NAS and that solved the problem. For some reason, with recycle bin enabled, remote won’t allow deletions the way that Restic wants (it allows deletions via rm, not by Restic).

1 Like