On 4/9/19 9:41 AM, Dominic Jäger wrote: > Vzdump log files were not deleted when a backup was deleted. > Consequently, the folder continuously filled with .log files. > Now they get deleted after the backup is removed. > > Signed-off-by: Dominic Jäger <d.jae...@proxmox.com> > --- > No more error message if .log file was deleted before the backup. > > PVE/API2/Storage/Content.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/PVE/API2/Storage/Content.pm b/PVE/API2/Storage/Content.pm > index e941cb6..4aa9daf 100644 > --- a/PVE/API2/Storage/Content.pm > +++ b/PVE/API2/Storage/Content.pm > @@ -307,6 +307,13 @@ __PACKAGE__->register_method ({ > } > > PVE::Storage::vdisk_free ($cfg, $volid); > + if ($vtype eq 'backup' && $path =~ > + /(.*\/vzdump-\w+-\d+-\d{4}_\d{2}_\d{2}-\d{2}_\d{2}_\d{2})[^\/]+$/) { > + my $logpath = "$1.log"; > + if (-e $logpath) { > + unlink($logpath); > + } > + } > > return undef; > }}); >
applied, with cleanup, thanks! _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel