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

inaccessible hard links are stored #2092

Closed
ThomasWaldmann opened this issue Jan 21, 2017 · 5 comments
Closed

inaccessible hard links are stored #2092

ThomasWaldmann opened this issue Jan 21, 2017 · 5 comments

Comments

@ThomasWaldmann
Copy link
Member

similar to: jborg/attic#393

$ touch hl1
$ chmod 000 hl1
$ ln hl1 hl2
$ borg create repo::hl-check .
hl1: [Errno 13] Permission denied: 'hl1'
$ mkdir extract
$ cd extract
$ borg extract ../repo::hl-check
hl2: [Errno 2] No such file or directory: '/home/tw/w/borg/extract/hl1' -> '/home/tw/w/borg/extract/hl2'
$ ls -l hl*
ls: cannot access 'hl*': No such file or directory
$ borg list ../repo::hl-check | grep hl
h--------- tw     tw            0 Sat, 2017-01-21 20:08:04 hl2 link to hl1
@enkore enkore added this to the 1.0.10rc1 milestone Jan 21, 2017
@ThomasWaldmann
Copy link
Member Author

Also:

(borg-env)tw@tux:~/w/borg/extract$ borg mount ../repo::hl-check mnt
Enter passphrase for key /home/tw/w/borg/repo: 
Local Exception.
Traceback (most recent call last):
  File "/home/tw/w/borg/borg/archiver.py", line 2076, in main
    exit_code = archiver.run(args)
  File "/home/tw/w/borg/borg/archiver.py", line 2012, in run
    return func(args)
  File "/home/tw/w/borg/borg/archiver.py", line 91, in wrapper
    return method(self, args, repository=repository, **kwargs)
  File "/home/tw/w/borg/borg/archiver.py", line 560, in do_mount
    operations = FuseOperations(key, repository, manifest, archive, cached_repo)
  File "/home/tw/w/borg/borg/fuse.py", line 71, in __init__
    self.process_archive(archive)
  File "/home/tw/w/borg/borg/fuse.py", line 139, in process_archive
    inode = self._find_inode(item[b'source'], prefix)
  File "/home/tw/w/borg/borg/fuse.py", line 182, in _find_inode
    inode = self.contents[inode][segment]
KeyError: b'hl1'

Platform: Linux tux 4.9.4-tw2 #1 SMP Wed Jan 18 07:03:50 CET 2017 x86_64 x86_64
Linux: Ubuntu 16.04 xenial
Borg: 1.0.10.dev80+ngca0c1da  Python: CPython 3.5.2
PID: 22263  CWD: /home/tw/w/borg/extract
sys.argv: ['/home/tw/w/borg-env/bin/borg', 'mount', '../repo::hl-check', 'mnt']
SSH_ORIGINAL_COMMAND: None

@enkore enkore changed the title unaccessible hard links malfunction inaccessible hard links are stored Jan 21, 2017
@enkore
Copy link
Contributor

enkore commented Jan 21, 2017

  • Correct create code
  • Add proper error handling to mount
  • extract fails on the item and so does approximately the right thing by extension.

@ThomasWaldmann
Copy link
Member Author

If we skip hl1, we should also skip hl2. Hardlinks are symmetric. No problem with extract and mount then.

@enkore
Copy link
Contributor

enkore commented Jan 21, 2017

Since there is still #1297 it has to be handled in mount. This is also just a variation on #1297, just that the master backup does not fail due to a lost race, but due to lack of permissions.

@ThomasWaldmann
Copy link
Member Author

Fixed by #2094.

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

No branches or pull requests

2 participants