diff --git a/backupbot.py b/backupbot.py index 78c0778..369138f 100755 --- a/backupbot.py +++ b/backupbot.py @@ -129,6 +129,10 @@ def restore(snapshot, target, noninteractive, volumes, container, no_commands): print("The following volume paths will be restored:") for p in backup_paths: print(f'\t{p}') + if not no_commands: + print("The following commands will be executed:") + for container, cmd in list(pre_commands.items()) + list(post_commands.items()): + print(f"\t{container.labels['com.docker.swarm.service.name']}:\t{cmd}") print(f"This snapshot is {delta} old") print( f"THIS COMMAND WILL IRREVERSIBLY OVERWRITES FILES AT {target}")