make --noninteractive a flag
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Moritz 2023-12-12 13:39:26 +01:00
parent 15275b2571
commit 64328c79b1
1 changed files with 2 additions and 1 deletions

View File

@ -194,7 +194,7 @@ def backup_volumes(backup_paths, apps, dry_run=False):
@cli.command()
@click.option('snapshot', '--snapshot', '-s', envvar='SNAPSHOT', default='latest')
@click.option('target', '--target', '-t', envvar='TARGET', default='/')
@click.option('noninteractive', '--noninteractive', envvar='NONINTERACTIVE', default=False)
@click.option('noninteractive', '--noninteractive', envvar='NONINTERACTIVE', is_flag=True)
def restore(snapshot, target, noninteractive):
# Todo: recommend to shutdown the container
service_paths = VOLUME_PATH
@ -217,6 +217,7 @@ def restore(snapshot, target, noninteractive):
logger.error("Restore aborted")
exit(1)
print(f"Restoring Snapshot {snapshot} of {service_paths} at {target}")
# TODO: use tags if no snapshot is selected, to use a snapshot including SERVICE
result = restic.restore(snapshot_id=snapshot,
include=service_paths, target_dir=target)
logger.debug(result)