feat: Restore backup CLI

This commit is contained in:
Whispering Wind
2025-02-22 00:24:22 +03:30
committed by GitHub
parent 1cad73e87c
commit 896ba3421f

View File

@ -87,6 +87,16 @@ def backup_hysteria2():
except Exception as e: except Exception as e:
click.echo(f'{e}', err=True) click.echo(f'{e}', err=True)
@cli.command('restore-hysteria2')
@click.argument('backup_file_path', type=click.Path(exists=True, file_okay=True, dir_okay=False, readable=True))
def restore_hysteria2(backup_file_path):
"""Restores Hysteria configuration from a backup ZIP file."""
try:
cli_api.restore_hysteria2(backup_file_path)
click.echo('Hysteria configuration restored successfully.')
except Exception as e:
click.echo(f'{e}', err=True)
# endregion # endregion
# region User # region User