make --noninteractive a flag
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
15275b2571
commit
64328c79b1
|
@ -194,7 +194,7 @@ def backup_volumes(backup_paths, apps, dry_run=False):
|
||||||
@cli.command()
|
@cli.command()
|
||||||
@click.option('snapshot', '--snapshot', '-s', envvar='SNAPSHOT', default='latest')
|
@click.option('snapshot', '--snapshot', '-s', envvar='SNAPSHOT', default='latest')
|
||||||
@click.option('target', '--target', '-t', envvar='TARGET', default='/')
|
@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):
|
def restore(snapshot, target, noninteractive):
|
||||||
# Todo: recommend to shutdown the container
|
# Todo: recommend to shutdown the container
|
||||||
service_paths = VOLUME_PATH
|
service_paths = VOLUME_PATH
|
||||||
|
@ -217,6 +217,7 @@ def restore(snapshot, target, noninteractive):
|
||||||
logger.error("Restore aborted")
|
logger.error("Restore aborted")
|
||||||
exit(1)
|
exit(1)
|
||||||
print(f"Restoring Snapshot {snapshot} of {service_paths} at {target}")
|
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,
|
result = restic.restore(snapshot_id=snapshot,
|
||||||
include=service_paths, target_dir=target)
|
include=service_paths, target_dir=target)
|
||||||
logger.debug(result)
|
logger.debug(result)
|
||||||
|
|
Loading…
Reference in New Issue