Skip to content

Borg upgrade fails, if repository folder is mounted on other partition than parent folder #2083

@fabefour

Description

@fabefour

borg upgrade tries to create a temp folder "borg.upgrade-timestamp" outside of the repository folder.
If the repository folder and the parent folder are not on the same partition this fails as the hardlinks cannot be created.

Local Exception.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 2052, in main
    exit_code = archiver.run(args)
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 1997, in run
    return func(args)
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 74, in wrapper
    return method(self, args, repository=None, **kwargs)
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 769, in do_upgrade
    repo.upgrade(args.dry_run, inplace=args.inplace, progress=args.progress)
  File "/usr/lib/python3/dist-packages/borg/upgrader.py", line 38, in upgrade
    shutil.copytree(self.path, backup, copy_function=os.link)
  File "/usr/lib/python3.4/shutil.py", line 342, in copytree
    raise Error(errors)
shutil.Error: [('/mnt/raid/borg/hints.50756', '/mnt/raid/borg.upgrade-2017-01-19-10:01:17/hints.50756', "[Errno 18] Invalid cross-device link: '/mnt/raid/borg/hints.50756' -> '/mnt/raid/borg.upgrade-2017-01-19-10:01:17/hints.50756'"), ('/mnt/raid/borg/README', '/mnt/raid/borg.upgrade-2017-01-19-10:01:17/README', "[Errno 18] Invalid cross-device link: '/mnt/raid/borg/README' -> '/mnt/raid/borg.upgrade-2017-01-19-10:01:17/README'"), ...

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions