public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v3 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS
@ 2024-06-07 13:33 Christian Ebner
  2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-guest-common 1/4] vzdump: add PBS change detection mode configuration Christian Ebner
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Christian Ebner @ 2024-06-07 13:33 UTC (permalink / raw)
  To: pve-devel

This patch series defines the vzdump configuration description as well
as backup job configuration option in the WebUI to set the
experimental `change-detection-mode` parameter to the
proxmox-backup-client invocation for container backups having a Proxmox
Backup Server storage target.

This allows to either set the parameter to the node wide vzdump.conf
or on a per job level. The following shows an exemplary job
configuration taken from /etc/pve/jobs.cfg:

```
vzdump: backup-ab2edf62-d43c
	schedule yearly
	compress zstd
	enabled 1
	fleecing 0
	mode snapshot
	notes-template {{guestname}}
	pbs-change-detection-mode metadata
	storage pbs-local
	vmid 100
```

This patches depend on a proxmox-backup-client compiled with the
following 2 patches applied:
https://lists.proxmox.com/pipermail/pbs-devel/2024-June/009779.html

Changes since version 2:
- Adapted to new default change detection mode being called `legacy`

pve-guest-common:

Christian Ebner (1):
  vzdump: add PBS change detection mode configuration

 src/PVE/VZDump/Common.pm | 8 ++++++++
 1 file changed, 8 insertions(+)

pve-container:

Christian Ebner (1):
  vzdump: conditionally set PBS change detection mode option

 src/PVE/VZDump/LXC.pm | 2 ++
 1 file changed, 2 insertions(+)

pve-manager:

Christian Ebner (2):
  www: advanced backup: add pbs change detection mode selector
  vzdump: add pbs-change-detection-mode to config template

 configs/vzdump.conf                         |  1 +
 www/manager6/panel/BackupAdvancedOptions.js | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH v3 pve-guest-common 1/4] vzdump: add PBS change detection mode configuration
  2024-06-07 13:33 [pve-devel] [PATCH v3 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Christian Ebner
@ 2024-06-07 13:33 ` Christian Ebner
  2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-container 2/4] vzdump: conditionally set PBS change detection mode option Christian Ebner
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Ebner @ 2024-06-07 13:33 UTC (permalink / raw)
  To: pve-devel

Define the possible modes to be configured in a PBS file change
detection mode.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 2:
- s/default/legacy

 src/PVE/VZDump/Common.pm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/PVE/VZDump/Common.pm b/src/PVE/VZDump/Common.pm
index 1539444..e04af8c 100644
--- a/src/PVE/VZDump/Common.pm
+++ b/src/PVE/VZDump/Common.pm
@@ -354,6 +354,14 @@ my $confdesc = {
 	requires => 'storage',
 	optional => 1,
     },
+    'pbs-change-detection-mode' => {
+	type => 'string',
+	description => "EXPERIMENTAL: PBS mode used to detect file changes and switch encoding"
+	    . " format for container backups.",
+	optional => 1,
+	default => 'legacy',
+	enum => [ 'legacy', 'data', 'metadata' ],
+    },
 };
 
 sub get_confdesc {
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH v3 pve-container 2/4] vzdump: conditionally set PBS change detection mode option
  2024-06-07 13:33 [pve-devel] [PATCH v3 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Christian Ebner
  2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-guest-common 1/4] vzdump: add PBS change detection mode configuration Christian Ebner
@ 2024-06-07 13:33 ` Christian Ebner
  2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-manager 3/4] www: advanced backup: add pbs change detection mode selector Christian Ebner
  2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-manager 4/4] vzdump: add pbs-change-detection-mode to config template Christian Ebner
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Ebner @ 2024-06-07 13:33 UTC (permalink / raw)
  To: pve-devel

Allows to switch the backup clients change detection mode based on
the option set in the backup jobs configuration for backup jobs with
Proxmox Backup Server target.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 2:
- no changes

 src/PVE/VZDump/LXC.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index 8c28a5e..06e02eb 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -394,6 +394,8 @@ sub archive {
 	push @$param, '--backup-type', 'ct';
 	push @$param, '--backup-id', $vmid;
 	push @$param, '--backup-time', $task->{backup_time};
+	push @$param, '--change-detection-mode', $opts->{"pbs-change-detection-mode"}
+	    if $opts->{"pbs-change-detection-mode"};
 
 	if (my $entries_max = $opts->{"performance"}->{"pbs-entries-max"}) {
 	    push $param->@*, '--entries-max', $entries_max;
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH v3 pve-manager 3/4] www: advanced backup: add pbs change detection mode selector
  2024-06-07 13:33 [pve-devel] [PATCH v3 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Christian Ebner
  2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-guest-common 1/4] vzdump: add PBS change detection mode configuration Christian Ebner
  2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-container 2/4] vzdump: conditionally set PBS change detection mode option Christian Ebner
@ 2024-06-07 13:33 ` Christian Ebner
  2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-manager 4/4] vzdump: add pbs-change-detection-mode to config template Christian Ebner
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Ebner @ 2024-06-07 13:33 UTC (permalink / raw)
  To: pve-devel

The proxmox backup client allows to switch the method used to encode
data based on a change-detection-mode parameter.  Expose this setting
as experimental feature in the advanced panel for a backup job.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 2:
- no changes

 www/manager6/panel/BackupAdvancedOptions.js | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/www/manager6/panel/BackupAdvancedOptions.js b/www/manager6/panel/BackupAdvancedOptions.js
index 1026c6f4..adc71847 100644
--- a/www/manager6/panel/BackupAdvancedOptions.js
+++ b/www/manager6/panel/BackupAdvancedOptions.js
@@ -236,6 +236,26 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
 		value: gettext("Run jobs as soon as possible if they couldn't start on schedule, for example, due to the node being offline."),
 	    },
 	},
+	{
+	    xtype: 'pveTwoColumnContainer',
+	    startColumn: {
+		xtype: 'proxmoxKVComboBox',
+		fieldLabel: gettext('PBS change detection mode'),
+		name: 'pbs-change-detection-mode',
+		deleteEmpty: true,
+		value: '__default__',
+		comboItems: [
+		    ['__default__', "Default"],
+		    ['data', "Data"],
+		    ['metadata', "Metadata"],
+		],
+	    },
+	    endFlex: 2,
+	    endColumn: {
+		xtype: 'displayfield',
+		value: gettext("EXPERIMENTAL: Mode to detect file changes and archive encoding format for container backups."),
+	    },
+	},
 	{
 	    xtype: 'component',
 	    padding: '5 1',
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH v3 pve-manager 4/4] vzdump: add pbs-change-detection-mode to config template
  2024-06-07 13:33 [pve-devel] [PATCH v3 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Christian Ebner
                   ` (2 preceding siblings ...)
  2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-manager 3/4] www: advanced backup: add pbs change detection mode selector Christian Ebner
@ 2024-06-07 13:33 ` Christian Ebner
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Ebner @ 2024-06-07 13:33 UTC (permalink / raw)
  To: pve-devel

Include the additional parameter to set the `change-detection-mode`
for backup jobs with Proxmox Backup Server target as node wide
configuration, including possible variants to be set.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 2:
- s/default/legacy

 configs/vzdump.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/vzdump.conf b/configs/vzdump.conf
index 33893e69..54913073 100644
--- a/configs/vzdump.conf
+++ b/configs/vzdump.conf
@@ -16,3 +16,4 @@
 #exclude-path: PATHLIST
 #pigz: N
 #notes-template: {{guestname}}
+#pbs-change-detection-mode: legacy|data|metadata
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-07 13:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-07 13:33 [pve-devel] [PATCH v3 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Christian Ebner
2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-guest-common 1/4] vzdump: add PBS change detection mode configuration Christian Ebner
2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-container 2/4] vzdump: conditionally set PBS change detection mode option Christian Ebner
2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-manager 3/4] www: advanced backup: add pbs change detection mode selector Christian Ebner
2024-06-07 13:33 ` [pve-devel] [PATCH v3 pve-manager 4/4] vzdump: add pbs-change-detection-mode to config template Christian Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal