From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <w.bumiller@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 646D579DE1
 for <pbs-devel@lists.proxmox.com>; Thu, 28 Oct 2021 11:33:18 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 55F021DD3F
 for <pbs-devel@lists.proxmox.com>; Thu, 28 Oct 2021 11:33:18 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id B66C51DD34
 for <pbs-devel@lists.proxmox.com>; Thu, 28 Oct 2021 11:33:17 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 846DD4582B
 for <pbs-devel@lists.proxmox.com>; Thu, 28 Oct 2021 11:33:17 +0200 (CEST)
Date: Thu, 28 Oct 2021 11:33:15 +0200
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Message-ID: <20211028093315.qdktdbsc3mfvcmvv@olga.proxmox.com>
References: <20211027112238.3758515-1-d.csapak@proxmox.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20211027112238.3758515-1-d.csapak@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.582 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [datastore.rs, snapshot.rs, prune.rs, pull.rs]
Subject: [pbs-devel] applied series: [PATCH proxmox-backup v3 00/13] add
 'protected' setting for snapshots
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 28 Oct 2021 09:33:18 -0000

applied series

The mentioned error handling thing is a non-issue as File::create
doesn't use O_EXCL anyway, and the cleanup can be done as follow-up.

On Wed, Oct 27, 2021 at 01:22:25PM +0200, Dominik Csapak wrote:
> this v3 is mostly to provide a current rebase on master, since some of
> the code was moved
> 
> add the means to 'protect' a snapshot against pruning and removal by
> adding a file '.protected' in the snapshot folder
> 
> in the v2, i opted against syncing the protected flag for two reasons:
> * it gives the admin the choice on each datastore if he wants to keep
>   the snapshot or not(if we sync it, we would have to sync it everytime?)
> * it is much simpler to implement
> 
> changes from v2:
> * rebase on master
> * increase width of action column (so that all icons are visible)
> 
> changes from v1:
> * rebase on master
> * return the PruneMark enum instead of two booleans in compute_prune_info
> * lock the snapshot when setting/removig the flag
> * don't bail if the file does not exist on removal
> * add a 'protected show' command to the client
> * add a docs section to explain the protected flag
> 
> changes from rfc:
> * added gui parts
> * added tests
> * fixed a bug (that the test uncovered)
> * add pbs client command
> * prevent removal (also during sync)
> 
> Dominik Csapak (13):
>   pbs-datastore: add protection info to BackupInfo
>   pbs-datastore: skip protected backups in pruning
>   add protected info of snapshots to api and task logs
>   tests/prune: add tests for protecteded backups
>   backup/datastore: prevent protected snapshots to be removed
>   pull_store/group: dont try remove locally protected snapshots
>   api2: datastore/delete_group: throw error for partially removed group
>   api2/admin/datastore: add get/set_protection
>   proxmox-backup-client: add 'protected' commands
>   ui: PruneInputPanel: add keepReason 'protected' for protected backups
>   ui: add protected icon to snapshots
>   fix #3602: ui: datastore/Content: add action to set protection status
>   docs: add info about protection flag to client docs
> 
>  docs/backup-client.rst                |  19 +++++
>  pbs-api-types/src/datastore.rs        |   2 +
>  pbs-datastore/src/backup_info.rs      |  20 ++++-
>  pbs-datastore/src/datastore.rs        |  61 +++++++++++---
>  pbs-datastore/src/prune.rs            |  44 ++++++++--
>  proxmox-backup-client/src/snapshot.rs | 113 ++++++++++++++++++++++++++
>  src/api2/admin/datastore.rs           | 111 +++++++++++++++++++++++--
>  src/server/prune_job.rs               |   6 +-
>  src/server/pull.rs                    |  20 ++++-
>  tests/prune.rs                        |  44 +++++++++-
>  www/datastore/Content.js              |  77 +++++++++++++++++-
>  www/datastore/Prune.js                |   4 +
>  12 files changed, 483 insertions(+), 38 deletions(-)
> 
> -- 
> 2.30.2