diff --git a/backupbot.py b/backupbot.py index 88c1557..5244dfb 100755 --- a/backupbot.py +++ b/backupbot.py @@ -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)