Skip to content

Commit

Permalink
Fix handling nuances of src_mbuffer (#632)
Browse files Browse the repository at this point in the history
* lib/ZnapZend/Config.pm: checkBackupSets(): do not ignore src_mbuffer=off [#629]

Signed-off-by: Jim Klimov <[email protected]>

* lib/ZnapZend/Config.pm: checkBackupSets(): do not assign "undef" src_mbuffer, fall back to "off" [#629]

Signed-off-by: Jim Klimov <[email protected]>

---------

Signed-off-by: Jim Klimov <[email protected]>
Co-authored-by: Tobias Oetiker <[email protected]>
  • Loading branch information
jimklimov and oetiker authored Mar 13, 2024
1 parent 07fbdf4 commit 8ae2bf1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ZnapZend/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 8ae2bf1

Please sign in to comment.