[Borgbackup] Read-only filesystems

Brad Wilson brad at undercovergarys.com
Fri Apr 12 10:15:27 EDT 2019


Is there any way to borg mount a repository that is inside another mounted borg repository?

Making backups of backups seems like a valid usage for borg, especially when bundling the backups of multiple borg users, and where some are encrypted and others are not. The current behavior seemingly prevents borg mount from working on recursive repos.

If it's impossible to mount and browse nested borg backups, what's the preferred way of handling them?

Here's the error:

borg mount /root/mounty/backup01-2019-04-05T18\:36\:14.362268/srv/storage/backups/nfs01/ /root/mountymounty/
Failed to create/acquire the lock /root/mounty/backup01-2019-04-05T18:36:14.362268/srv/storage/backups/nfs01/lock.exclusive ([Errno 30]
Read-only file system: '/root/mounty/backup01-2019-04-05T18:36:14.362268/srv/storage/backups/nfs01/lock.exclusive').
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 4455, in main
    exit_code = archiver.run(args)
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 4387, in run
    return set_ec(func(args))
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 1355, in do_mount
    return self._do_mount(args)
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 139, in wrapper
    with repository:
  File "/usr/lib/python3/dist-packages/borg/repository.py", line 189, in __enter__
    self.open(self.path, bool(self.exclusive), lock_wait=self.lock_wait, lock=self.do_lock)
  File "/usr/lib/python3/dist-packages/borg/repository.py", line 392, in open
    self.lock = Lock(os.path.join(path, 'lock'), exclusive, timeout=lock_wait, kill_stale_locks=hostname_is_unique()).acquire()
  File "/usr/lib/python3/dist-packages/borg/locking.py", line 353, in acquire
    with self._lock:
  File "/usr/lib/python3/dist-packages/borg/locking.py", line 114, in __enter__
    return self.acquire()
  File "/usr/lib/python3/dist-packages/borg/locking.py", line 138, in acquire
    raise LockFailed(self.path, str(err)) from None
borg.locking.LockFailed: Failed to create/acquire the lock
/root/mounty/backup01-2019-04-05T18:36:14.362268/srv/storage/backups/nfs01/lock.exclusive ([Errno 30] Read-only file system:
'/root/mounty/backup01-2019-04-05T18:36:14.362268/srv/storage/backups/nfs01/lock.exclusive').

Platform: Linux backup01 4.19.0-2-amd64 #1 SMP Debian 4.19.16-1 (2019-01-17) x86_64
Linux: debian buster/sid
Borg: 1.1.9  Python: CPython 3.7.2+
PID: 15280  CWD: /root/mounty/backup01-2019-04-05T18:36:14.362268                                                                        
sys.argv: ['/usr/bin/borg', 'mount', '/root/mounty/backup01-2019-04-05T18:36:14.362268/srv/storage/backups/nfs01/',
'/root/mountymounty/']
SSH_ORIGINAL_COMMAND: None


More information about the Borgbackup mailing list