Skip to content

Restic Unlock Error #213

@caioreix

Description

@caioreix

I’d like to point out an issue that took me days to understand and resolve. When using restic with rclone, the _unlock function is called whenever an existing repository is detected. In my case, I configured rclone using environment variables, as I find it quicker and safer to reproduce compared to using an rclone.conf file.

Here’s where the problem arises: if you don’t define an rclone.conf, running any restic command results in the following log message:

rclone: 2025/03/12 19:12:39 NOTICE: Config file "/tmp/.config/rclone/rclone.conf" not found - using defaults
Apparently, this log causes the _unlock function to think there’s still a lock present. As a result, when it tries to perform the unlock, it gets the same log output about the missing config file and assumes it wasn’t able to unlock the repository.

I spent a lot of time figuring out what was going on. The solution I found was to set the RCLONE_LOG_LEVEL=ERROR environment variable. This way, the notice doesn’t get printed, and the lock issue no longer occurs. However, I believe this kind of situation shouldn’t affect the lock validation process in restic.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions