[pmg-devel] [PATCH pmg-api 2/2] api: pbs: remove state after backup

Stoiko Ivanov s.ivanov at proxmox.com
Wed Nov 18 18:59:35 CET 2020


else left-over files will continue to be included (e.g. statistics database)

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 src/PMG/API2/PBS/Job.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PMG/API2/PBS/Job.pm b/src/PMG/API2/PBS/Job.pm
index a0d942a..a885edd 100644
--- a/src/PMG/API2/PBS/Job.pm
+++ b/src/PMG/API2/PBS/Job.pm
@@ -305,6 +305,8 @@ __PACKAGE__->register_method ({
 
 	    $pbs->backup_fs_tree($backup_dir, $node, 'pmgbackup');
 
+	    rmtree $backup_dir;
+
 	    print "backup finished\n";
 
 	    my $group = "host/$node";
-- 
2.20.1





More information about the pmg-devel mailing list