I was working on the backup script and I noticed a weird error when running forget
and check
: exit status 1
and nothing more.
I was a bit confused but then I found this issue on GitHub that led me to the fix:
Hey @nickelswitte, try running autorestic exec -av – check and see if you have a stale lock file. That’s what was causing this for me.
Launched the suggested command and:
Executing: /home/alcaprar/bin/restic check
using temporary cache in /tmp/restic-check-cache-970527468
create exclusive lock for repository
unable to create lock in backend: repository is already locked by PID 156302 on raspberrypi by alcaprar (UID 1000, GID 1000)
lock was created at 2024-07-07 22:43:43 (358h12m46.931751205s ago)
storage ID 844df999
the `unlock` command can be used to remove stale locks
exit status 1
Error: 1 errors were found
Then simply autorestic unlock
and fixed..