mirror of
https://github.com/netinvent/npbackup.git
synced 2025-11-08 13:11:50 +08:00
CLI: Dedup repos already in groups
This commit is contained in:
parent
53591eff8e
commit
e1a9dcf3d9
1 changed files with 10 additions and 7 deletions
|
|
@ -428,6 +428,8 @@ This is free software, and you are welcome to redistribute it under certain cond
|
|||
level="error",
|
||||
)
|
||||
sys.exit(74)
|
||||
# Cheap duplicate filter
|
||||
repos_and_group_repos = list(set(repos_and_group_repos))
|
||||
|
||||
# Single repo usage
|
||||
if len(repos_and_group_repos) == 1:
|
||||
|
|
@ -683,15 +685,15 @@ This is free software, and you are welcome to redistribute it under certain cond
|
|||
"policy",
|
||||
"housekeeping",
|
||||
"check",
|
||||
"quick_check", # TODO: deprecated
|
||||
"full_check", # TODO: deprecated
|
||||
"quick_check", # TODO: deprecated
|
||||
"full_check", # TODO: deprecated
|
||||
"prune",
|
||||
"prune_max",
|
||||
"unlock",
|
||||
"repair",
|
||||
"repair_index", # TODO: deprecated
|
||||
"repair_packs", # TODO: deprecated
|
||||
"repair_snapshots", # TODO: deprecated
|
||||
"repair_index", # TODO: deprecated
|
||||
"repair_packs", # TODO: deprecated
|
||||
"repair_snapshots", # TODO: deprecated
|
||||
"recover",
|
||||
"dump",
|
||||
"stats",
|
||||
|
|
@ -700,9 +702,10 @@ This is free software, and you are welcome to redistribute it under certain cond
|
|||
)
|
||||
if len(repos_and_group_repos) > 1:
|
||||
if cli_args["operation"] not in possible_group_ops:
|
||||
json_error_logging(False,
|
||||
json_error_logging(
|
||||
False,
|
||||
f"Invalid group operation {cli_args['operation']}. Valid operations are {','.join(possible_group_ops)}",
|
||||
"critical"
|
||||
"critical",
|
||||
)
|
||||
sys.exit(74)
|
||||
repo_config_list = []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue