mirror of
https://github.com/borgbase/vorta
synced 2025-01-03 13:45:49 +00:00
Replace --prefix
with -a
for borg v1.2.2 also.
* src/vorta/borg/prune.py (BorgPruneJob.prepare)
This commit is contained in:
parent
0188b753b4
commit
14d587876e
1 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
from vorta.store.models import RepoModel
|
from vorta.store.models import RepoModel
|
||||||
from vorta.utils import format_archive_name
|
from vorta.utils import borg_compat, format_archive_name
|
||||||
from .borg_job import BorgJob
|
from .borg_job import BorgJob
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,7 +46,11 @@ def prepare(cls, profile):
|
||||||
|
|
||||||
if profile.prune_prefix:
|
if profile.prune_prefix:
|
||||||
formatted_prune_prefix = format_archive_name(profile, profile.prune_prefix)
|
formatted_prune_prefix = format_archive_name(profile, profile.prune_prefix)
|
||||||
pruning_opts += ['--prefix', formatted_prune_prefix]
|
|
||||||
|
if borg_compat.check('V122'):
|
||||||
|
pruning_opts += ['-a', formatted_prune_prefix + '*'] # sh: pattern
|
||||||
|
else:
|
||||||
|
pruning_opts += ['--prefix', formatted_prune_prefix]
|
||||||
|
|
||||||
if profile.prune_keep_within:
|
if profile.prune_keep_within:
|
||||||
pruning_opts += ['--keep-within', profile.prune_keep_within]
|
pruning_opts += ['--keep-within', profile.prune_keep_within]
|
||||||
|
|
Loading…
Reference in a new issue