diff --git a/backupbot.py b/backupbot.py index 2e4346b..525d4ca 100755 --- a/backupbot.py +++ b/backupbot.py @@ -155,11 +155,14 @@ def restore(snapshot_id, target, noninteractive, volumes, container, no_commands if not no_commands and pre_commands: print(f"Run pre commands.") run_commands(pre_commands) - result = restic_restore(snapshot_id=snapshot_id, include=backup_paths, target_dir=target) + if backup_paths: + 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: print(f"Run post commands.") run_commands(post_commands) - logger.debug(result) @cli.command()