list restore commands before executing it
This commit is contained in:
parent
9dc239b199
commit
f877186a57
@ -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}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user