From 8ae2bf1a8d865eaf9224ac6fe43a2bd1d5294aab Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 13 Mar 2024 08:53:01 +0100 Subject: [PATCH] Fix handling nuances of `src_mbuffer` (#632) * lib/ZnapZend/Config.pm: checkBackupSets(): do not ignore src_mbuffer=off [#629] Signed-off-by: Jim Klimov * lib/ZnapZend/Config.pm: checkBackupSets(): do not assign "undef" src_mbuffer, fall back to "off" [#629] Signed-off-by: Jim Klimov --------- Signed-off-by: Jim Klimov Co-authored-by: Tobias Oetiker --- lib/ZnapZend/Config.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ZnapZend/Config.pm b/lib/ZnapZend/Config.pm index 8aeb01ad..42ec8b27 100644 --- a/lib/ZnapZend/Config.pm +++ b/lib/ZnapZend/Config.pm @@ -185,11 +185,16 @@ my $checkBackupSets = sub { } } if ($backupSet->{src_mbuffer}) { - if (!($self->zfs->fileExistsAndExec($backupSet->{src_mbuffer}))) { + if ($backupSet->{src_mbuffer} ne 'off' and !($self->zfs->fileExistsAndExec($backupSet->{src_mbuffer}))) { warn "*** WARNING: executable '$backupSet->{src_mbuffer}' does not exist on source system, will ignore\n\n"; $backupSet->{src_mbuffer} = undef; } } + if (!($backupSet->{src_mbuffer})) { + # Do not leave loose ends after all + $self->zLog->info("WARNING: property 'src_mbuffer' not set on backup for " . $backupSet->{src} . ", defaulting to 'off'"); + $backupSet->{src_mbuffer} = 'off'; + } if (!exists($backupSet->{src_mbuffer_size}) or !($backupSet->{src_mbuffer_size})) { $backupSet->{src_mbuffer_size} = $backupSet->{mbuffer_size}; $self->zLog->info("WARNING: property 'src_mbuffer_size' not set on backup for " . $backupSet->{src} . ", inheriting from legacy 'mbuffer_size': " . $backupSet->{src_mbuffer_size}) if $backupSet->{src_mbuffer_size};