public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS
@ 2024-05-29 12:07 Christian Ebner
  2024-05-29 12:07 ` [pve-devel] [PATCH v2 pve-guest-common 1/4] vzdump: add PBS change detection mode configuration Christian Ebner
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Christian Ebner @ 2024-05-29 12:07 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 patch series applied:
https://lists.proxmox.com/pipermail/pbs-devel/2024-May/009526.html

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] 6+ messages in thread

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

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

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

 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..76e5f8a 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 => 'default',
+	enum => [ 'default', '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] 6+ messages in thread

* [pve-devel] [PATCH v2 pve-container 2/4] vzdump: conditionally set PBS change detection mode option
  2024-05-29 12:07 [pve-devel] [PATCH v2 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Christian Ebner
  2024-05-29 12:07 ` [pve-devel] [PATCH v2 pve-guest-common 1/4] vzdump: add PBS change detection mode configuration Christian Ebner
@ 2024-05-29 12:07 ` Christian Ebner
  2024-05-29 12:07 ` [pve-devel] [PATCH v2 pve-manager 3/4] www: advanced backup: add pbs change detection mode selector Christian Ebner
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Christian Ebner @ 2024-05-29 12:07 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 1:
- 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] 6+ messages in thread

* [pve-devel] [PATCH v2 pve-manager 3/4] www: advanced backup: add pbs change detection mode selector
  2024-05-29 12:07 [pve-devel] [PATCH v2 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Christian Ebner
  2024-05-29 12:07 ` [pve-devel] [PATCH v2 pve-guest-common 1/4] vzdump: add PBS change detection mode configuration Christian Ebner
  2024-05-29 12:07 ` [pve-devel] [PATCH v2 pve-container 2/4] vzdump: conditionally set PBS change detection mode option Christian Ebner
@ 2024-05-29 12:07 ` Christian Ebner
  2024-05-29 12:07 ` [pve-devel] [PATCH v2 pve-manager 4/4] vzdump: add pbs-change-detection-mode to config template Christian Ebner
  2024-06-07 10:58 ` [pve-devel] [PATCH v2 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Fabian Grünbichler
  4 siblings, 0 replies; 6+ messages in thread
From: Christian Ebner @ 2024-05-29 12:07 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 1:
- prefix subject with correct repo

 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] 6+ messages in thread

* [pve-devel] [PATCH v2 pve-manager 4/4] vzdump: add pbs-change-detection-mode to config template
  2024-05-29 12:07 [pve-devel] [PATCH v2 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Christian Ebner
                   ` (2 preceding siblings ...)
  2024-05-29 12:07 ` [pve-devel] [PATCH v2 pve-manager 3/4] www: advanced backup: add pbs change detection mode selector Christian Ebner
@ 2024-05-29 12:07 ` Christian Ebner
  2024-06-07 10:58 ` [pve-devel] [PATCH v2 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Fabian Grünbichler
  4 siblings, 0 replies; 6+ messages in thread
From: Christian Ebner @ 2024-05-29 12:07 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 1:
- prefix subject with correct repo

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

diff --git a/configs/vzdump.conf b/configs/vzdump.conf
index 33893e69..ca7f0828 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: default|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] 6+ messages in thread

* Re: [pve-devel] [PATCH v2 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS
  2024-05-29 12:07 [pve-devel] [PATCH v2 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS Christian Ebner
                   ` (3 preceding siblings ...)
  2024-05-29 12:07 ` [pve-devel] [PATCH v2 pve-manager 4/4] vzdump: add pbs-change-detection-mode to config template Christian Ebner
@ 2024-06-07 10:58 ` Fabian Grünbichler
  4 siblings, 0 replies; 6+ messages in thread
From: Fabian Grünbichler @ 2024-06-07 10:58 UTC (permalink / raw)
  To: Proxmox VE development discussion

Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>

with one slight caveat - I'd like to change the "Default" enum value in
PBS to something else "V1", "Legacy", .., which has some consequences
here, so I held off applying this for now..

On May 29, 2024 2:07 pm, Christian Ebner wrote:
> 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 patch series applied:
> https://lists.proxmox.com/pipermail/pbs-devel/2024-May/009526.html
> 
> 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
> 
> 
> 


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

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

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

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

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