Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore-backup.sh fails when running borg list #2427

Closed
pq2 opened this issue Jan 17, 2023 · 5 comments · Fixed by #2428
Closed

restore-backup.sh fails when running borg list #2427

pq2 opened this issue Jan 17, 2023 · 5 comments · Fixed by #2428

Comments

@pq2
Copy link
Contributor

pq2 commented Jan 17, 2023

Steps To Reproduce

  1. Run restore-backup.sh
  2. Get to the step where you have to enter the passphrase that was used to encrypt the borg backup
  3. Enter the correct passphrase

Expected Result

The backup is restored

Actual Result

I get the following exception:

Failed to create/acquire the lock /tmp/backupdrive/.snapshots/@20230117_153551/borgbackup/NcVM/lock.exclusive ([Errno 30] Read-only file system: '/tmp/backupdrive/.snapshots/@20230117_153551/borgbackup/NcVM/lock.exclusive.h7_ncijc.tmp').
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 5089, in main
    exit_code = archiver.run(args)
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 5020, in run
    return set_ec(func(args))
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 168, in wrapper
    with repository:
  File "/usr/lib/python3/dist-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/dist-packages/borg/repository.py", line 431, in open
    self.lock = Lock(os.path.join(path, 'lock'), exclusive, timeout=lock_wait).acquire()
  File "/usr/lib/python3/dist-packages/borg/locking.py", line 387, in acquire
    with self._lock:
  File "/usr/lib/python3/dist-packages/borg/locking.py", line 115, in __enter__
    return self.acquire()
  File "/usr/lib/python3/dist-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 /tmp/backupdrive/.snapshots/@20230117_153551/borgbackup/NcVM/lock.exclusive ([Errno 30] Read-only file system: '/tmp/backupdrive/.snapshots/@20230117_153551/borgbackup/NcVM/lock.exclusive.h7_ncijc.tmp').

Seems like write permissions for the drive are missing.

Screenshots, Videos, or Pastebins

No response

Additional Context

No response

Build Version

25.0.2.3

Environment

By using the scripts

Environment Details

  • Ubuntu 22.04
  • Intel Quad Core
  • 8 GB RAM
Platform: Linux nextcloud 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64
Linux: Unknown Linux  
Borg: 1.2.0  Python: CPython 3.10.6 msgpack: 1.0.3 fuse: pyfuse3 3.2.0 [pyfuse3,llfuse]
PID: 4602  CWD: /home/ncadmin
sys.argv: ['/usr/bin/borg', 'list', '/tmp/backupdrive/.snapshots/@20230117_153551/borgbackup/NcVM']
SSH_ORIGINAL_COMMAND: None
@pq2 pq2 added the bug label Jan 17, 2023
@szaimen
Copy link
Collaborator

szaimen commented Jan 17, 2023

Yes, you need to choose a different directory. The snapshots dir is read only. Can you maybe show a acreenshot which directories get shown to you?

@szaimen
Copy link
Collaborator

szaimen commented Jan 17, 2023

fix here: #2428

@pq2
Copy link
Contributor Author

pq2 commented Jan 17, 2023

Ah, thanks. That was my fault. It worked now.

@pq2 pq2 closed this as completed Jan 17, 2023
@szaimen
Copy link
Collaborator

szaimen commented Jan 17, 2023

Ah, thanks. That was my fault. It worked now.

No, actually is this a UX problem. I've provided a fix in #2428

@pq2
Copy link
Contributor Author

pq2 commented Jan 17, 2023

No, actually is this a UX problem. I've provided a fix in #2428

I agree 😃. Thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants