public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 2/2] api: pbs: remove state after backup
Date: Wed, 18 Nov 2020 18:59:35 +0100	[thread overview]
Message-ID: <20201118175935.11516-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20201118175935.11516-1-s.ivanov@proxmox.com>

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

Signed-off-by: Stoiko Ivanov <s.ivanov@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





  parent reply	other threads:[~2020-11-18 17:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18 17:59 [pmg-devel] [PATCH pmg-api 0/2] PBS integration: include statdb Stoiko Ivanov
2020-11-18 17:59 ` [pmg-devel] [PATCH pmg-api 1/2] pbs: api: add statistic parameter to run_backup Stoiko Ivanov
2020-11-18 18:34   ` Dietmar Maurer
2020-11-19  8:40     ` Stoiko Ivanov
2020-11-19  9:08       ` Dietmar Maurer
2020-11-18 17:59 ` Stoiko Ivanov [this message]
2020-11-18 18:25 ` [pmg-devel] applied-series: [PATCH pmg-api 0/2] PBS integration: include statdb Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201118175935.11516-3-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal