Skip to content

borg check crashing #3225

@ThomasWaldmann

Description

@ThomasWaldmann

From the mailing list:

On 26.10.2017 16:01, Dirk Deimeke wrote:

I already did a "borg check --repair" which led to the following exception:

$ borg check --repair /srv/borg/tigacorrupt
'check --repair' is an experimental feature that might result in data loss.
Type 'YES' if you understand this and want to continue: YES
Adding commit tag to segment 879209
Local Exception.
Traceback (most recent call last):
  File "/usr/lib64/python3.4/site-packages/borg/archiver.py", line 2168,
in main
    exit_code = archiver.run(args)
  File "/usr/lib64/python3.4/site-packages/borg/archiver.py", line 2104,
in run
    return set_ec(func(args))
  File "/usr/lib64/python3.4/site-packages/borg/archiver.py", line 107,
in wrapper
    return method(self, args, repository=repository, **kwargs)
  File "/usr/lib64/python3.4/site-packages/borg/archiver.py", line 185,
in do_check
    if not repository.check(repair=args.repair, save_space=args.save_space):
  File "/usr/lib64/python3.4/site-packages/borg/repository.py", line
476, in check
    self.io.write_commit()
  File "/usr/lib64/python3.4/site-packages/borg/repository.py", line
820, in write_commit
    fd = self.get_write_fd(no_new=True)
  File "/usr/lib64/python3.4/site-packages/borg/repository.py", line
680, in get_write_fd
    self._write_fd = open(self.segment_filename(self.segment), 'xb')
FileNotFoundError: [Errno 2] No such file or directory:
'/srv/borg/tigacorrupt/data/87/879210'

Platform: Linux len.myown-it.com 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri
Oct 20 20:32:50 UTC 2017 x86_64 x86_64
Linux: CentOS Linux 7.4.1708 Core
Borg: 1.0.11  Python: CPython 3.4.5
PID: 5622  CWD: /srv/borg
sys.argv: ['/bin/borg', 'check', '--repair', '/srv/borg/tigacorrupt']
SSH_ORIGINAL_COMMAND: None

Most important is the line "FileNotFoundError: [Errno 2] No such file or
directory: '/srv/borg/tigacorrupt/data/87/879210'"

As Marian told me by mail, I created the directory
/srv/borg/tigacorrupt/data/87 and the next repair attempt ran through:

borg check --repair /srv/borg/tigacorrupt
'check --repair' is an experimental feature that might result in data loss.
Type 'YES' if you understand this and want to continue: YES
Adding commit tag to segment 879209
Repository manifest not found!
219852 orphaned objects found!
Archive consistency check complete, problems found.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions