From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 0C16C6C798 for ; Thu, 23 Sep 2021 13:37:42 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0A85724C56 for ; Thu, 23 Sep 2021 13:37:42 +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 56B0824C06 for ; Thu, 23 Sep 2021 13:37:40 +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 2A03C44A8E for ; Thu, 23 Sep 2021 13:37:40 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Thu, 23 Sep 2021 13:37:26 +0200 Message-Id: <20210923113739.4151043-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.362 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 Subject: [pbs-devel] [PATCH proxmox-backup v2 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2021 11:37:42 -0000 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 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/prune.rs | 44 ++++++++-- proxmox-backup-client/src/snapshot.rs | 113 ++++++++++++++++++++++++++ src/api2/admin/datastore.rs | 111 +++++++++++++++++++++++-- src/backup/datastore.rs | 61 +++++++++++--- src/server/prune_job.rs | 6 +- src/server/pull.rs | 19 ++++- tests/prune.rs | 44 +++++++++- www/datastore/Content.js | 75 +++++++++++++++++ www/datastore/Prune.js | 4 + 12 files changed, 481 insertions(+), 37 deletions(-) -- 2.30.2