]> git.proxmox.com Git - pve-storage.git/commit - PVE/Storage.pm
fix #3972: Remove the .notes file when a backup is deleted
authorDaniel Tschlatscher <d.tschlatscher@proxmox.com>
Tue, 14 Jun 2022 09:00:10 +0000 (11:00 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 15 Jun 2022 08:49:22 +0000 (10:49 +0200)
commitc3e2ff806f1f558996e7654e502ea332227c13b0
treecea9b38fe1d74b9953313b1159b0e3402a0d5bc4
parent76c98d2353305060dc53b62f8b5e4c40746b46cb
fix #3972: Remove the .notes file when a backup is deleted

When a VM or Container backup was deleted, the .notes file was not
removed, therefore, over time the dump folder would get polluted with
notes for backups that no longer existed. As backup names contain a
timestamp and as the notes cannot be reused because of this, I think
it is safe to just delete them just like we do with the .log file.

Furthermore, I sourced the deletion of the log and notes file into a
new function called "archive_auxiliaries_remove". Additionally, the
archive_info object now returns one more field containing the name of
the notes file. The test cases have to be adapted to expect this new
value as the package will not compile otherwise.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
PVE/API2/Storage/Content.pm
PVE/Storage.pm
test/archive_info_test.pm