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 5AD1869E9B for ; Wed, 15 Sep 2021 15:42:33 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 51F3B19AE7 for ; Wed, 15 Sep 2021 15:42:03 +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 6746219ADC for ; Wed, 15 Sep 2021 15:42:02 +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 3E94D4488A for ; Wed, 15 Sep 2021 15:42:02 +0200 (CEST) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pve-devel@lists.proxmox.com Date: Wed, 15 Sep 2021 15:41:47 +0200 Message-Id: <20210915134157.19762-1-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.396 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. [proxmox-backup-manager.rs, pull.rs, sync.rs, datastore.rs, jobs.rs, remote.rs] Subject: [pve-devel] [PATCH v2 proxmox-backup 00/10] pull/sync group filter X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2021 13:42:33 -0000 this has been requested a few times on the forum, e.g. for a special sync job for the most important groups, or seeding of a new datastore with a partial view of an existing one. while it's possible to achieve similar results with hacky workarounds based on group ownership and reduced "visibility", implementing it properly is not that complex. possible future additions in a similar fashion: - exclude filters - filtering in other API calls (tape, listing groups/snapshots) - only sync/pull encrypted snapshots (less trusted off-site location) - only sync/pull latest snapshot in each group (fast seeding of new datastore) changed since v1: - reworked filter to support different types, rebased - dropped last patch - add docs patch Fabian Grünbichler (10): api-types: add schema for backup group api: add GroupFilter(List) type BackupGroup: add filter helper pull: use BackupGroup consistently pull: allow pulling groups selectively sync: add group filtering remote: add backup group scanning manager: extend sync/pull completion manager: render group filter properly docs: mention group filter in sync docs docs/managing-remotes.rst | 6 ++ pbs-api-types/src/datastore.rs | 5 ++ pbs-api-types/src/jobs.rs | 96 +++++++++++++++++++++ pbs-datastore/src/backup_info.rs | 10 +++ src/api2/config/remote.rs | 73 +++++++++++++++- src/api2/config/sync.rs | 5 ++ src/api2/pull.rs | 15 +++- src/bin/proxmox-backup-manager.rs | 113 ++++++++++++++++++++++--- src/bin/proxmox_backup_manager/sync.rs | 21 +++++ src/server/pull.rs | 57 ++++++++++--- www/config/SyncView.js | 13 ++- www/window/SyncJobEdit.js | 12 +++ 12 files changed, 394 insertions(+), 32 deletions(-) -- 2.30.2