Broken Borg backup on AIO using Docker Desktop for Windows

I was receiving this error tonight:

Cache, or information obtained from the security directory is newer than repository

Logs from integrity repair:

Checking the backup integrity and repairing it...
Failed to create/acquire the lock /mnt/borgbackup/borg/lock.exclusive ([Errno 1] Operation not permitted: '/mnt/borgbackup/borg/lock.exclusive.t98vk8g1.tmp').
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/borg/archiver.py", line 5213, in main
    exit_code = archiver.run(args)
  File "/usr/lib/python3.10/site-packages/borg/archiver.py", line 5144, in run
    return set_ec(func(args))
  File "/usr/lib/python3.10/site-packages/borg/archiver.py", line 168, in wrapper
    with repository:
  File "/usr/lib/python3.10/site-packages/borg/repository.py", line 200, in __enter__
    self.open(self.path, bool(self.exclusive), lock_wait=self.lock_wait, lock=self.do_lock)
  File "/usr/lib/python3.10/site-packages/borg/repository.py", line 432, in open
    self.lock = Lock(os.path.join(path, 'lock'), exclusive, timeout=lock_wait).acquire()
  File "/usr/lib/python3.10/site-packages/borg/locking.py", line 384, in acquire
    self._wait_for_readers_finishing(remove, sleep)
  File "/usr/lib/python3.10/site-packages/borg/locking.py", line 397, in _wait_for_readers_finishing
    self._lock.acquire()
  File "/usr/lib/python3.10/site-packages/borg/locking.py", line 137, in acquire
    raise LockFailed(self.path, str(err)) from None
borg.locking.LockFailed: Failed to create/acquire the lock /mnt/borgbackup/borg/lock.exclusive ([Errno 1] Operation not permitted: '/mnt/borgbackup/borg/lock.exclusive.t98vk8g1.tmp').

Platform: Linux 881e241d5e25 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64
Linux: Unknown Linux  
Borg: 1.2.4  Python: CPython 3.10.11 msgpack: 1.0.4 fuse: llfuse 1.4.1 [pyfuse3,llfuse]
PID: 20  CWD: /
sys.argv: ['/usr/bin/borg', 'check', '-v', '--repair', '/mnt/borgbackup/borg']
SSH_ORIGINAL_COMMAND: None

Some errors were found while checking and repairing the backup integrity!

basically this means borg can’t gain exclusive access to the mentioned file which ensures only one instance of backup is running at same time. Please check borg backup docs/forums how you can verify if another backup process is still running and how to recover from such fault.

Hi @nerlins can you run

docker run --rm --volume <your-chosen-backup-dir>:/data alpine ls -l /data/borg

Of course please adjust <your-chosen-backup-dir> to the one that you’ve chosen in the AIO interface. On windows it is probably something like /run/desktop/mnt/host/c/backup.

I’m not sure how this fixed itself. I had the nextcloud_aio_backupdir/borg volume in a bind using this command:

docker volume create ^
--driver local ^
--name nextcloud_aio_backupdir ^
-o device="/host_mnt/c/users/camserv/documents/nextcloud" ^
-o type="none" ^
-o o="bind"

I can’t remember where I found that command. Borg had worked before. Last night I had this error:

Cache, or information obtained from the security directory is newer than repository

So, I tried a different folder to see if I could start Borg brand new, but didn’t work:

docker volume create ^
--driver local ^
--name nextcloud_aio_backupdir ^
-o device="/host_mnt/c/users/camserv/documents/nextback" ^
-o type="none" ^
-o o="bind"

I then reverted to the original folder but forgot the ‘t’ and had it listed as nexcloud…crap. This caused the integrity check errors. Correcting the spelling problem allowed the integrity check to complete with no issues, and I am currently running a successful backup.

I am still not sure what happened to cause the original permissions error.

1 Like