btrbk: print different prefix for incremental/non-incremental backups

pull/30/head
Axel Burri 2015-01-25 17:59:55 +01:00
parent 6a0820abae
commit e76ad88d65
1 changed files with 4 additions and 1 deletions

5
btrbk
View File

@ -1354,6 +1354,7 @@ MAIN:
} }
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";
$config_target->{subvol_non_incremental} = 1;
$success = btrfs_send_receive($snapshot, $droot, undef, $receive_log, $config_target); $success = btrfs_send_receive($snapshot, $droot, undef, $receive_log, $config_target);
} }
else { else {
@ -1362,6 +1363,7 @@ MAIN:
} }
else { else {
INFO "Creating full backup (option \"incremental\" is not set)"; INFO "Creating full backup (option \"incremental\" is not set)";
$config_target->{subvol_non_incremental} = 1;
$success = btrfs_send_receive($snapshot, $droot, undef, $receive_log, $config_target); $success = btrfs_send_receive($snapshot, $droot, undef, $receive_log, $config_target);
} }
} }
@ -1511,7 +1513,8 @@ MAIN:
# print(($_->{preserve} ? "===" : "---") . " $_->{name}\n"); # print(($_->{preserve} ? "===" : "---") . " $_->{name}\n");
# } # }
# } # }
print "+++ $config_target->{subvol_created}\n" if($config_target->{subvol_created}); my $create_mode = ($config_target->{subvol_non_incremental} ? "***" : ">>>");
print "$create_mode $config_target->{subvol_created}\n" if($config_target->{subvol_created});
if($config_target->{subvol_deleted}) { if($config_target->{subvol_deleted}) {
print "--- $_\n" foreach(sort { $b cmp $a} @{$config_target->{subvol_deleted}}); print "--- $_\n" foreach(sort { $b cmp $a} @{$config_target->{subvol_deleted}});
} }