public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-container pve-manager 0/2] add config option for metadata based PBS backup
@ 2023-11-15 15:59 Christian Ebner
  2023-11-15 15:59 ` [pve-devel] [PATCH pve-container 1/2] config: backup: add PBS change detection mode Christian Ebner
  2023-11-15 15:59 ` [pve-devel] [PATCH pve-manager 2/2] lxc: options: add PBS change detecion mode selector Christian Ebner
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Ebner @ 2023-11-15 15:59 UTC (permalink / raw)
  To: pve-devel

This patches add a config option to LXCs which allows to select metadata
based file change detection when backing up using PBS.

This patches depend on the corresponding series send to the pbs-devel
mailing list [0].

[0] https://lists.proxmox.com/pipermail/pbs-devel/2023-November/007059.html

Christian Ebner (1):
  lxc: options: add PBS change detecion mode selector

 www/manager6/lxc/Options.js | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

-- 
2.39.2





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

* [pve-devel] [PATCH pve-container 1/2] config: backup: add PBS change detection mode
  2023-11-15 15:59 [pve-devel] [PATCH pve-container pve-manager 0/2] add config option for metadata based PBS backup Christian Ebner
@ 2023-11-15 15:59 ` Christian Ebner
  2023-11-15 15:59 ` [pve-devel] [PATCH pve-manager 2/2] lxc: options: add PBS change detecion mode selector Christian Ebner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Ebner @ 2023-11-15 15:59 UTC (permalink / raw)
  To: pve-devel

Adds the config option to switch from regular to metadata based change
detection mode when using PBS as backend.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 src/PVE/LXC/Config.pm | 7 +++++++
 src/PVE/VZDump/LXC.pm | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 56e1f10..687d3bf 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -612,6 +612,13 @@ my $confdesc = {
 	description => "Try to be more verbose. For now this only enables debug log-level on start.",
 	default => 0,
     },
+    pbs_change_detection_mode => {
+	optional => 1,
+	type => 'string',
+	enum => ['data', 'metadata'],
+	description => "File change detection mode used for PBS backups.",
+	default => 'data',
+    },
 };
 
 my $valid_lxc_conf_keys = {
diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index c68a06f..d3aa57d 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -119,6 +119,8 @@ sub prepare {
     my $exclude_dirs = $task->{exclude_dirs} = [];
 
     $task->{hostname} = $conf->{'hostname'} || "CT$vmid";
+    $task->{pbs_change_detection_mode} = $conf->{'pbs_change_detection_mode'}
+	if $conf->{'pbs_change_detection_mode'};
 
     my ($id_map, $rootuid, $rootgid) = PVE::LXC::parse_id_maps($conf);
     $task->{userns_cmd} = PVE::LXC::userns_command($id_map);
@@ -395,6 +397,9 @@ sub archive {
 	push @$param, '--backup-id', $vmid;
 	push @$param, '--backup-time', $task->{backup_time};
 
+	push @$param, '--change-detection-mode', $task->{pbs_change_detection_mode}
+	    if $task->{pbs_change_detection_mode};
+
 	if (my $entries_max = $opts->{"performance"}->{"pbs-entries-max"}) {
 	    push $param->@*, '--entries-max', $entries_max;
 	    $self->loginfo(
-- 
2.39.2





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

* [pve-devel] [PATCH pve-manager 2/2] lxc: options: add PBS change detecion mode selector
  2023-11-15 15:59 [pve-devel] [PATCH pve-container pve-manager 0/2] add config option for metadata based PBS backup Christian Ebner
  2023-11-15 15:59 ` [pve-devel] [PATCH pve-container 1/2] config: backup: add PBS change detection mode Christian Ebner
@ 2023-11-15 15:59 ` Christian Ebner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Ebner @ 2023-11-15 15:59 UTC (permalink / raw)
  To: pve-devel

Add selector to switch between default and metadata based change
detection mode for backups using PBS as backend.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 www/manager6/lxc/Options.js | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/www/manager6/lxc/Options.js b/www/manager6/lxc/Options.js
index d0a53fc7..61b38d6a 100644
--- a/www/manager6/lxc/Options.js
+++ b/www/manager6/lxc/Options.js
@@ -141,6 +141,25 @@ Ext.define('PVE.lxc.Options', {
 	    hookscript: {
 		header: gettext('Hookscript'),
 	    },
+	    pbs_change_detection_mode: {
+		header: gettext('PBS change detection mode'),
+		defaultValue: 'data',
+		editor: caps.vms['VM.Config.Options'] ? {
+		    xtype: 'proxmoxWindowEdit',
+		    subject: gettext('PBS change detection mode'),
+		    items: {
+			xtype: 'proxmoxKVComboBox',
+			name: 'pbs_change_detection_mode',
+			deleteEmpty: true,
+			value: '__default__',
+			comboItems: [
+			    ['__default__', "Default"],
+			    ['metadata', "Metadata"],
+			],
+			fieldLabel: gettext('Mode'),
+		    },
+		} : undefined,
+	    },
 	};
 
 	var baseurl = 'nodes/' + nodename + '/lxc/' + vmid + '/config';
-- 
2.39.2





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

end of thread, other threads:[~2023-11-15 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-15 15:59 [pve-devel] [PATCH pve-container pve-manager 0/2] add config option for metadata based PBS backup Christian Ebner
2023-11-15 15:59 ` [pve-devel] [PATCH pve-container 1/2] config: backup: add PBS change detection mode Christian Ebner
2023-11-15 15:59 ` [pve-devel] [PATCH pve-manager 2/2] lxc: options: add PBS change detecion mode selector 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