fix(restore): don't restore everything if no backup_path is given.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f1661c04e7
commit
3eea69ddee
@ -155,11 +155,14 @@ def restore(snapshot_id, target, noninteractive, volumes, container, no_commands
|
|||||||
if not no_commands and pre_commands:
|
if not no_commands and pre_commands:
|
||||||
print(f"Run pre commands.")
|
print(f"Run pre commands.")
|
||||||
run_commands(pre_commands)
|
run_commands(pre_commands)
|
||||||
|
if backup_paths:
|
||||||
result = restic_restore(snapshot_id=snapshot_id, include=backup_paths, target_dir=target)
|
result = restic_restore(snapshot_id=snapshot_id, include=backup_paths, target_dir=target)
|
||||||
|
logger.debug(result)
|
||||||
|
else:
|
||||||
|
print('No paths to restore.')
|
||||||
if not no_commands and post_commands:
|
if not no_commands and post_commands:
|
||||||
print(f"Run post commands.")
|
print(f"Run post commands.")
|
||||||
run_commands(post_commands)
|
run_commands(post_commands)
|
||||||
logger.debug(result)
|
|
||||||
|
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user