Skip to content

Commit efe19c5

Browse files
committed
Copy doesn't lose track of the successful copies
1 parent 3d84c3c commit efe19c5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

supervisor/backups/manager.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -406,17 +406,17 @@ def copy_to_additional_locations() -> dict[str | None, Path]:
406406
except BackupDataDiskBadMessageError:
407407
self.sys_resolution.unhealthy = UnhealthyReason.OSERROR_BAD_MESSAGE
408408
raise
409-
410-
backup.all_locations.update(
411-
{
412-
loc: {
413-
ATTR_PATH: path,
414-
ATTR_PROTECTED: backup.protected,
415-
ATTR_SIZE_BYTES: backup.size_bytes,
409+
finally:
410+
backup.all_locations.update(
411+
{
412+
loc: {
413+
ATTR_PATH: path,
414+
ATTR_PROTECTED: backup.protected,
415+
ATTR_SIZE_BYTES: backup.size_bytes,
416+
}
417+
for loc, path in all_new_locations.items()
416418
}
417-
for loc, path in all_new_locations.items()
418-
}
419-
)
419+
)
420420

421421
@Job(name="backup_manager_import_backup")
422422
async def import_backup(

0 commit comments

Comments
 (0)