mirror of https://github.com/digint/btrbk
btrbk: fix info logging for send/receive
parent
7807fface8
commit
31f0f97ff0
12
btrbk
12
btrbk
|
@ -2501,8 +2501,6 @@ sub macro_send_receive(@)
|
||||||
my $target_type = $config_target->{target_type} || die;
|
my $target_type = $config_target->{target_type} || die;
|
||||||
my $incremental = config_key($config_target, "incremental");
|
my $incremental = config_key($config_target, "incremental");
|
||||||
|
|
||||||
DEBUG "Receiving from subvolume: $source->{PRINT}";
|
|
||||||
|
|
||||||
# check for existing target subvolume
|
# check for existing target subvolume
|
||||||
if(my $err_vol = vinfo_subvol($target, $source->{NAME})) {
|
if(my $err_vol = vinfo_subvol($target, $source->{NAME})) {
|
||||||
ABORTED($config_target, "Target subvolume \"$err_vol->{PRINT}\" already exists");
|
ABORTED($config_target, "Target subvolume \"$err_vol->{PRINT}\" already exists");
|
||||||
|
@ -2517,20 +2515,20 @@ sub macro_send_receive(@)
|
||||||
{
|
{
|
||||||
# create backup from latest common
|
# create backup from latest common
|
||||||
if($parent) {
|
if($parent) {
|
||||||
INFO "Incremental from parent: $parent->{PRINT}";
|
INFO "Creating incremental backup...";
|
||||||
}
|
}
|
||||||
elsif($incremental ne "strict") {
|
elsif($incremental ne "strict") {
|
||||||
INFO "No common parent subvolume present, creating full backup";
|
INFO "No common parent subvolume present, creating full backup...";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
WARN "Backup to $target->{PRINT} failed: no common parent subvolume found, and option \"incremental\" is set to \"strict\"";
|
WARN "Backup to $target->{PRINT} failed: no common parent subvolume found for \"$source->{PRINT}\", and option \"incremental\" is set to \"strict\"";
|
||||||
$info{ERROR} = 1;
|
$info{ERROR} = 1;
|
||||||
ABORTED($config_target, "No common parent subvolume found, and option \"incremental\" is set to \"strict\"");
|
ABORTED($config_target, "No common parent subvolume found, and option \"incremental\" is set to \"strict\"");
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
INFO "Option \"incremental\" is not set, creating full backup";
|
INFO "Creating full backup...";
|
||||||
$parent = undef;
|
$parent = undef;
|
||||||
delete $info{parent};
|
delete $info{parent};
|
||||||
}
|
}
|
||||||
|
@ -2728,7 +2726,7 @@ sub macro_archive_target($$$;$)
|
||||||
if($archive_total) {
|
if($archive_total) {
|
||||||
INFO "Archived $archive_success/$archive_total subvolumes";
|
INFO "Archived $archive_success/$archive_total subvolumes";
|
||||||
} else {
|
} else {
|
||||||
INFO "No missing archived subvolume found";
|
INFO "No missing archives found";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $archive_success;
|
return $archive_success;
|
||||||
|
|
Loading…
Reference in New Issue