mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-09 00:32:37 -04:00
only accept old repos for --other-repo (e.g. rcreate/transfer)
we do not want to run the new borg code against old repos. if you want to e.g. check an old repo, use an old borg version.
This commit is contained in:
parent
b0b5a2fd27
commit
a7870ab5bd
1 changed files with 5 additions and 0 deletions
|
|
@ -191,6 +191,9 @@ def with_repository(fake=False, invert_fake=False, create=False, lock=True,
|
|||
args=args)
|
||||
|
||||
with repository:
|
||||
if repository.version not in (2, ):
|
||||
raise Error("This borg version only accepts version 2 repos for -r/--repo. "
|
||||
"You can use 'borg transfer' to copy archives from old to new repos.")
|
||||
if manifest or cache:
|
||||
kwargs['manifest'], kwargs['key'] = Manifest.load(repository, compatibility)
|
||||
if 'compression' in args:
|
||||
|
|
@ -233,6 +236,8 @@ def with_other_repository(manifest=False, key=False, cache=False, compatibility=
|
|||
args=args)
|
||||
|
||||
with repository:
|
||||
if repository.version not in (1, 2, ):
|
||||
raise Error("This borg version only accepts version 1 or 2 repos for --other-repo.")
|
||||
kwargs['other_repository'] = repository
|
||||
if manifest or key or cache:
|
||||
manifest_, key_ = Manifest.load(repository, compatibility)
|
||||
|
|
|
|||
Loading…
Reference in a new issue