From: Dietmar Maurer <dietmar@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Hannes Laimer <h.laimer@proxmox.com>
Subject: Re: [pbs-devel] [PATCH v1 proxmox-backup] add benchmark flag to backup creation for proper cleanup when running a benchmark
Date: Thu, 10 Sep 2020 07:48:34 +0200 (CEST) [thread overview]
Message-ID: <251922008.1099.1599716915388@webmail.proxmox.com> (raw)
In-Reply-To: <20200902094122.104475-2-h.laimer@proxmox.com>
some comment:
@@ -118,10 +118,8 @@ async move {
let (path, is_new, _snap_guard) = datastore.create_locked_backup_dir(&backup_dir)?;
if !is_new { bail!("backup directory already exists."); }
let absolute_backup_dir_path = format!("{}/{}", &datastore.base_path().to_str().unwrap(), backup_group);
- let mut worker_type = "backup";
- if benchmark {
- worker_type = "benchmark";
- }
+ let worker_type = if benchmark { "benchmark" } else { "backup" };
+
WorkerTask::spawn(worker_type, Some(worker_id), userid.clone(), true, move |worker| {
let mut env = BackupEnvironment::new(
env_type, userid, worker.clone(), datastore, backup_dir);
On 09/02/2020 11:41 AM Hannes Laimer <h.laimer@proxmox.com> wrote:
>
>
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> v1:
> - set worker_type to 'benchmark', if it is one
> - delete whole '<datastore>/host/benchmark'-folder after benchmark
This is super dangerous, because you delete the whole group now, i.e: you
can do the following
run job /vm/12345 --benchmark
which completely removes all you VM backups?!
prev parent reply other threads:[~2020-09-10 5:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 9:41 [pbs-devel] [PATCH v1 proxmox-backup 0/1] serverside benchmark cleanup Hannes Laimer
2020-09-02 9:41 ` [pbs-devel] [PATCH v1 proxmox-backup] add benchmark flag to backup creation for proper cleanup when running a benchmark Hannes Laimer
2020-09-10 5:48 ` Dietmar Maurer [this message]
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=251922008.1099.1599716915388@webmail.proxmox.com \
--to=dietmar@proxmox.com \
--cc=h.laimer@proxmox.com \
--cc=pbs-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