mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-11 09:59:19 -04:00
transfer: check if correct upgrader class is used for v1 repos
This commit is contained in:
parent
bca36db0a1
commit
f647fa9f08
1 changed files with 4 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ from ._common import with_repository, with_other_repository
|
|||
from ..archive import Archive
|
||||
from ..constants import * # NOQA
|
||||
from ..crypto.key import uses_same_id_hash, uses_same_chunker_secret
|
||||
from ..helpers import EXIT_SUCCESS, EXIT_ERROR
|
||||
from ..helpers import EXIT_SUCCESS, EXIT_ERROR, Error
|
||||
from ..helpers import location_validator, Location
|
||||
from ..helpers import format_file_size
|
||||
from ..manifest import Manifest
|
||||
|
|
@ -47,6 +47,9 @@ class TransferMixIn:
|
|||
self.print_error(f"No such upgrader: {args.upgrader}")
|
||||
return EXIT_ERROR
|
||||
|
||||
if UpgraderCls is not upgrade_mod.UpgraderFrom12To20 and other_manifest.repository.version == 1:
|
||||
raise Error("To transfer from a borg 1.x repo, you need to use: --upgrader=From12To20")
|
||||
|
||||
upgrader = UpgraderCls(cache=cache)
|
||||
|
||||
for name in archive_names:
|
||||
|
|
|
|||
Loading…
Reference in a new issue