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 CE5879C0CA for ; Mon, 23 Oct 2023 13:19:25 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 94F8B12B63 for ; Mon, 23 Oct 2023 13:18:55 +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 for ; Mon, 23 Oct 2023 13:18:54 +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 AF2BC44592 for ; Mon, 23 Oct 2023 13:18:54 +0200 (CEST) From: Christian Ebner To: pve-devel@lists.proxmox.com Date: Mon, 23 Oct 2023 13:18:32 +0200 Message-Id: <20231023111835.238407-1-c.ebner@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.078 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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. [lxc.pm, create.pm] Subject: [pve-devel] [RFC v2 pve-container pve-manager 0/3] add partial restore 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: Mon, 23 Oct 2023 11:19:25 -0000 This patch series adds functionality to partially restore containers from backup, by allowing the user to selectively include/exclude mountpoints for restore. Mountpoints not included in the backup will not be deleted and recreated but rather attached to the container as unused disk after the restore. The same is true for mountpoints selected by the user to be excluded during restore. As is, there is a slight discrepancy in partial restore behaviour for PBS based and tar based backups, in cases where mountpoints are mounted in the file tree of another mountpoint. For tar based backups, all files below the uppermost mountpoint excluded from backup will not be restored, as the tar `--exclude` limits the file restore. For PBS based backups, each mountpoint is now backed up as individual pxar archive, therefore allowing to handle the restore more fine grained, by restoring the pxar archive directly to the moutpoint. This splitting of the PBS based backups into one archive per mountpoint introduces also side effects for backups created with the previous single root.pxar archive approach. During restore, the pxar archive per mountpoint cannot be found, producing a soft error message. Restore of the files is than handled directly from the main root.pxar archive. Any feedback is highly appreciated. pve-container: Christian Ebner (2): backup: do not delete not backed-up mps on restore api: allow to exclude mountpoins from restore src/PVE/API2/LXC.pm | 44 +++++++++++++++++++---- src/PVE/LXC/Create.pm | 83 ++++++++++++++++++++++++++++++++++++------- src/PVE/VZDump/LXC.pm | 10 +++--- 3 files changed, 113 insertions(+), 24 deletions(-) pve-manager: Christian Ebner (1): ui: lxc restore: add selective mountpoint restore www/manager6/Makefile | 1 + www/manager6/grid/BackupRestoreTargets.js | 37 +++++++++++++++++++++++ www/manager6/window/Restore.js | 34 +++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 www/manager6/grid/BackupRestoreTargets.js -- 2.39.2