|
@@ 105-116 (lines=12) @@
|
| 102 |
|
Removes backups that are still marked "in progress" (and hence cloned partially). |
| 103 |
|
""" |
| 104 |
|
backups = DataLayer.instance.backup_partially_cloned() |
| 105 |
|
if backups: |
| 106 |
|
self._io.title('Removing Partially Cloned Host Backups') |
| 107 |
|
|
| 108 |
|
for backup in backups: |
| 109 |
|
self._io.section('Removing backup {}/{}'.format(backup['hst_name'], backup['bck_number'])) |
| 110 |
|
|
| 111 |
|
helper = BackupDelete(self._io) |
| 112 |
|
helper.delete_backup(backup['hst_name'], backup['bck_number']) |
| 113 |
|
|
| 114 |
|
DataLayer.instance.commit() |
| 115 |
|
|
| 116 |
|
self._io.writeln('') |
| 117 |
|
|
| 118 |
|
# ------------------------------------------------------------------------------------------------------------------ |
| 119 |
|
def __get_next_clone_target(self): |
|
@@ 86-97 (lines=12) @@
|
| 83 |
|
Removes obsolete host backups. |
| 84 |
|
""" |
| 85 |
|
backups = DataLayer.instance.backup_get_obsolete() |
| 86 |
|
if backups: |
| 87 |
|
self._io.title('Removing Obsolete Host Backups') |
| 88 |
|
|
| 89 |
|
for backup in backups: |
| 90 |
|
self._io.section('Removing backup {}/{}'.format(backup['hst_name'], backup['bck_number'])) |
| 91 |
|
|
| 92 |
|
helper = BackupDelete(self._io) |
| 93 |
|
helper.delete_backup(backup['hst_name'], backup['bck_number']) |
| 94 |
|
|
| 95 |
|
DataLayer.instance.commit() |
| 96 |
|
|
| 97 |
|
self._io.writeln('') |
| 98 |
|
|
| 99 |
|
# ------------------------------------------------------------------------------------------------------------------ |
| 100 |
|
def __remove_partially_cloned_backups(self): |