mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-23 14:41:43 +00:00
os.link signature is the same as shutil.copy, use it directly
This commit is contained in:
parent
aaf72e3861
commit
4be9c29d0d
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ def upgrade(self, dryrun=True, inplace=False):
|
|||
backup = '{}.upgrade-{:%Y-%m-%d-%H:%M:%S}'.format(self.path, datetime.datetime.now())
|
||||
logger.info('making a hardlink copy in %s', backup)
|
||||
if not dryrun:
|
||||
shutil.copytree(self.path, backup, copy_function=lambda src, dst: os.link(src, dst))
|
||||
shutil.copytree(self.path, backup, copy_function=os.link)
|
||||
logger.info("opening attic repository with borg and converting")
|
||||
# we need to open the repo to load configuration, keyfiles and segments
|
||||
self.open(self.path, exclusive=False)
|
||||
|
|
Loading…
Reference in a new issue