diff --git a/src/restic_compose_backup/backup_runner.py b/src/restic_compose_backup/backup_runner.py index a1b37a1..08ad86e 100644 --- a/src/restic_compose_backup/backup_runner.py +++ b/src/restic_compose_backup/backup_runner.py @@ -57,9 +57,9 @@ def run(image: str = None, command: str = None, volumes: dict = None, fd.write('\n') logger.info(line) + container.wait() container.reload() logger.debug("Container ExitCode %s", container.attrs['State']['ExitCode']) - container.stop() container.remove() return container.attrs['State']['ExitCode']