1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-5618: Sync with PR3410.

[add] list option but in argument notation "list" for backup, restore, dbrm_restore
[fix] help messages for --config-file
[fix] -p/--path > -bl/--backup-location option for dbrm_backup and dbrm_restore
[fix] -d/--directory > '-l', '--load' option for dbrm_restore
This commit is contained in:
mariadb-AlanMologorsky
2025-03-07 15:56:56 +03:00
committed by Alan Mologorsky
parent 3fd90d3270
commit 271e3d5956
2 changed files with 50 additions and 19 deletions

View File

@ -170,7 +170,10 @@ def restore(
str,
typer.Option(
'-f', '--config-file',
help='Path to backup configuration file to load variables from.',
help=(
'Path to backup configuration file to load variables from - '
'relative or full path accepted.'
),
show_default=False
)
] = '',
@ -242,6 +245,13 @@ def restore(
help='Skips verifying ssl certs, useful for onpremise s3 storage.'
)
] = False,
list: Annotated[
bool,
typer.Option(
'list',
help='List backups.'
)
] = False
):
"""Restore Columnstore (and/or MariaDB) data."""
@ -266,18 +276,18 @@ def restore(
@handle_output
def dbrm_restore(
p: Annotated[
bl: Annotated[
str,
typer.Option(
'-p', '--path',
help='Path of where dbrm backups stored on disk.'
'-bl', '--backup-location',
help='Path of where dbrm backups exist on disk.'
)
] = '/tmp/dbrm_backups',
d: Annotated[
l: Annotated[
str,
typer.Option(
'-d', '--directory',
help='Date or directory chose to restore from.'
'-l', '--load',
help='Name of the directory to restore from -bl'
)
] = '',
ns: Annotated[
@ -305,14 +315,21 @@ def dbrm_restore(
help='Skip backing up storagemanager directory.'
)
] = True,
list: Annotated[
bool,
typer.Option(
'list',
help='List backups.'
)
] = False
):
"""Restore Columnstore DBRM data."""
# Default: ./$0 dbrm_restore --path /tmp/dbrm_backups
# Default: ./$0 dbrm_restore --backup-location /tmp/dbrm_backups
# Examples:
# ./$0 dbrm_restore --path /tmp/dbrm_backups --directory dbrm_backup_20240318_172842
# ./$0 dbrm_restore --path /tmp/dbrm_backups --directory dbrm_backup_20240318_172842 --no-start
# ./$0 dbrm_restore --backup-location /tmp/dbrm_backups --load dbrm_backup_20240318_172842
# ./$0 dbrm_restore --backup-location /tmp/dbrm_backups --load dbrm_backup_20240318_172842 --no-startdbrm_restore --path /tmp/dbrm_backups --directory dbrm_backup_20240318_172842 --no-start
arguments = []
for arg_name, value in locals().items():
sh_arg = cook_sh_arg(arg_name, value)