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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 0B1769280A for ; Mon, 13 Feb 2023 16:46:09 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CE60026144 for ; Mon, 13 Feb 2023 16:46:08 +0100 (CET) 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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 13 Feb 2023 16:46:04 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E66E946D9E for ; Mon, 13 Feb 2023 16:46:02 +0100 (CET) From: Hannes Laimer To: pbs-devel@lists.proxmox.com Date: Mon, 13 Feb 2023 16:45:51 +0100 Message-Id: <20230213154555.49610-1-h.laimer@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.034 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 0/4] native local sync-jobs 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: Mon, 13 Feb 2023 15:46:09 -0000 Add support for local sync. Sync-jobs without a remote are considered local, and use a different logic for pulling. The main reason for not reusing the existing pull logic is that the current logic relies on having a HttpClient and without a remote we can't create one. Having separate logic for local pulling however should speed up local syncs a bit, and for syncs in the same datastore, chunck transmission can be skipped all together. Also the autocompletion and UI is updated to support local sync-jobs. The new logic is mostly adding a local alternative whenever the HttpClient is used. Since the pulling process involves a lot of functions calling functions to do smaller stuff it was not really possible to split the changes up more. The first 3 patches are not buildable, I split them for easier review. Hannes Laimer (4): api2: make remote for sync-jobs optional pull: add logic for local pull manager: add completion for local sync-jobs ui: add ui support for local sync-jobs pbs-api-types/src/jobs.rs | 4 +- pbs-client/src/backup_reader.rs | 5 + src/api2/admin/datastore.rs | 10 + src/api2/config/remote.rs | 2 +- src/api2/config/sync.rs | 41 ++- src/api2/node/tasks.rs | 4 +- src/api2/pull.rs | 78 +++-- src/bin/proxmox-backup-manager.rs | 67 ++-- src/server/email_notifications.rs | 16 +- src/server/pull.rs | 499 +++++++++++++++++++----------- www/form/RemoteTargetSelector.js | 29 +- www/window/SyncJobEdit.js | 8 +- 12 files changed, 502 insertions(+), 261 deletions(-) -- 2.30.2