Restore the previous backup after backup failure

Fix a typo that prevented the restore of previous
backup following a backup failure.

Test Plan:

1. PASS - Performed  a subcloud backup and created
a big file in central storage to simulate low storage.
Performed another subcloud backup and verified that
when the operation fails due to low disk space, the
previous backup is restored.

2. PASS - Performed a subcloud backup and verified
that temp directory is removed upon successful backup.

Closes-bug: 2028975

Signed-off-by: Gustavo Pereira <gustavo.lyrapereira@windriver.com>
Change-Id: I47ae5899c764916d0daa6169e706aad49168d9cb
This commit is contained in:
Gustavo Pereira
2023-07-28 17:16:11 -03:00
parent 4fbcdc108a
commit f1d5435a86

View File

@@ -64,7 +64,7 @@
- name: Restore previous backup upon failure
command: mv {{ previous_backup_dir }} {{ central_backup_dir }}
connection: local
when: previous_backup is defined
when: previous_backup_dir is defined
- name: Force fail post rescue of transfer task failure
fail: