mirror of
https://github.com/netinvent/npbackup.git
synced 2026-02-06 07:50:07 +08:00
CLI: Add '__all__' argument to --repo-name for group operations
This commit is contained in:
parent
aa5791a692
commit
a2fd45933a
1 changed files with 5 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ This is free software, and you are welcome to redistribute it under certain cond
|
|||
type=str,
|
||||
default=None,
|
||||
required=False,
|
||||
help="Name of the repository to work with. Defaults to 'default'. In group operation mode, this can be a comma separated list of repo names",
|
||||
help="Name of the repository to work with. Defaults to 'default'. In group operation mode, this can be a comma separated list of repo names. Can accept special name '__all__' to work with all repositories.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--repo-group",
|
||||
|
|
@ -577,7 +577,10 @@ This is free software, and you are welcome to redistribute it under certain cond
|
|||
)
|
||||
sys.exit(74)
|
||||
elif args.repo_name:
|
||||
repos = [repo.strip() for repo in args.repo_name.split(",")]
|
||||
if args.repo_name == "__all__":
|
||||
repos = npbackup.configuration.get_repo_list(full_config)
|
||||
else:
|
||||
repos = [repo.strip() for repo in args.repo_name.split(",")]
|
||||
else:
|
||||
json_error_logging(
|
||||
False,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue