Daily Backup Failed, Failed to create/acquire the lock (after system crash reboot)

Nextcloud version: 25.0.2
Operating system and version: Ubunutu 20.04
PHP version : 8.0.26

The issue you are facing:

Trying to create a backup, I would get a " Failed to create/acquire the lock" and point to a lock.exclusive file in my backup folder. I renamed it for testing and then I get the same failed error and same failed file, but located in my /root/.cache/borg/ folder.

Is this the first time you’ve seen this error? (Y/N): No, I see it every day after it attempts a daily backup.

Steps to replicate it:

  1. Manually start a backup or let a scheduled backup take place

Additional Info:

This started the day after I had a system crash (unrelated to nextcloud). So guessing it had a lock on files when it happened.

I use the master container interface to to a scan of the backups and it completes successfully. But the drop down list of my backups does not show anything to restore. Research online shows the command to break the lock, but not sure how to keep the borg backup container running long enough to get a cli and run the command.

Hi, you would need to run borg break-lock. See https://borgbackup.readthedocs.io/en/stable/usage/lock.html#borg-break-lock

Thank you for your response, can you help tell me how to run it? I mean I was trying to run the borg backup container and then open a cli, but the container stops as soon as I run it.

I did just now think about how when I have it check my backups form the master container then the borg container stays running for a short time, maybe I can access the cli during that time to run the break-lock?

You can install borg on your host system and the use the command on your archive.

Okay, thank you for this option. Before I seen this, I ended up renaming the lock file and folder in my cache like I did in my backup folder and it appears to be performing a backup now after activating it from the master container.

This seems to be a solution then as well :+1:

I seem to be having the same issue.

do you know how I would go about installing borg on Unraid ?

then to confirm to run the command it would be

"borg -v break-lock /mnt/user/Backups/nextcloudaio\ Backup/borg " From the unraid terminal or what ?