restic: Getting error on save lock
Output of restic version
restic 0.9.5 compiled with go1.12.4 on darwin/amd64
How did you run restic exactly?
$ restic -v -r backup-repository check
using temporary cache in /var/folders/lr/5vbfxcnd0vd3nm4djf1py7ycg0qddv/T/restic-check-cache-172008049
enter password for repository:
repository 8205b840 opened successfully, password is correct
created new cache in /var/folders/lr/5vbfxcnd0vd3nm4djf1py7ycg0qddv/T/restic-check-cache-172008049
create exclusive lock for repository
Save(<lock/9f4aaf42a5>) returned error, retrying after 552.330144ms: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
Save(<lock/9f4aaf42a5>) returned error, retrying after 1.080381816s: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
Save(<lock/9f4aaf42a5>) returned error, retrying after 1.31013006s: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
Save(<lock/9f4aaf42a5>) returned error, retrying after 1.582392691s: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
Save(<lock/9f4aaf42a5>) returned error, retrying after 2.340488664s: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
Save(<lock/9f4aaf42a5>) returned error, retrying after 4.506218855s: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
Save(<lock/9f4aaf42a5>) returned error, retrying after 3.221479586s: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
Save(<lock/9f4aaf42a5>) returned error, retrying after 5.608623477s: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
Save(<lock/9f4aaf42a5>) returned error, retrying after 7.649837917s: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
Save(<lock/9f4aaf42a5>) returned error, retrying after 15.394871241s: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
Fatal: unable to create lock in backend: Sync: sync backup-repository/locks/9f4aaf42a530a5130b4cb4e201146bf436a32c4dc239e3477146a2b844e3eb81: operation not supported
check command with --no-lock option
restic --no-lock -v -r backup-repository check
using temporary cache in /var/folders/lr/5vbfxcnd0vd3nm4djf1py7ycg0qddv/T/restic-check-cache-832642100
enter password for repository:
repository 8205b840 opened successfully, password is correct
created new cache in /var/folders/lr/5vbfxcnd0vd3nm4djf1py7ycg0qddv/T/restic-check-cache-832642100
load indexes
check all packs
check snapshots, trees and blobs
no errors were found
What backend/server/service did you use to store the repository?
Expected behavior
restic should successfully set lock on repository for backup.
Actual behavior
restic fails to set lock on repository for each command. I tried successfully to run check command with --no-lock option (see logs above).
Steps to reproduce the behavior
Do you have any idea what may have caused this?
No
Do you have an idea how to solve the issue?
No
Did restic help you or made you happy in any way?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 23 (11 by maintainers)
Commits related to this issue
- ignore not supported error on sync() when using local backend closes #2395 — committed to htrendev/restic by htrendev 5 years ago
- ignore not supported error on sync() when using local backend closes #2395 — committed to htrendev/restic by htrendev 5 years ago
- ignore not supported error on sync() when using local backend closes #2395 — committed to htrendev/restic by htrendev 5 years ago
- local backend: ignore not supported error on sync() closes #2395 — committed to htrendev/restic by htrendev 5 years ago
- local backend: ignore not supported error on sync() Closes #2395 — committed to htrendev/restic by htrendev 5 years ago
- local backend: ignore not supported error on sync() Closes #2395 — committed to mfrischknecht/restic by htrendev 5 years ago
Every operation which results in Sync() getting called will trigger this error. This involves creating new repos, creating a lock file in the repo, and so on.
I did some more testing and it seem to be related to a change introduced by go1.12 (which is the version used to compile the 0.9.5 binaries). I confirmed this by compiling the latest restic master with go1.11 and creating a repo over SMB, which worked fine for me. The same restic version compiled with go1.12+ produces the sync errors.
The relevant section from the go1.12 release notes:
I ran into the exact same issue while setting up a backup with restic on my Macbook (latest Mojave and restic version), so I played along a bit with this behaviour.
My NAS is running latest free napp-it version using SMB3. With a Windows 10 Machine and the same restic version I had no issues. This behaviour only occurs while using restic 0.9.5 on macOS access an SMB3 share:
So it seems, that the current restic version indeed have trouble accessing SMB3 shares on macOS Mojave above a specific SMB3 version.
I hope that helps a bit.