Stavo sistemando lo scritp di backup e ho notato uno strano errore nei comandi di forget e check di autorestic: exit status 1 e niente di più.

Poi ho trovato questo issue su GitHub che mi ha portato verso la soluzione:

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.

Appena lanciato il comando ho ricevuto:

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

Dopodichè ho lanciato autorestic unlock e ha risolto tutto.