Log statistics in backup2disk

Backups are running in child processes so the CA object in the parent is
never updated. And per-fileset statistics are more interesting than the
total anyway.
This commit is contained in:
Peter J. Holzer 2021-01-31 13:47:59 +01:00
parent 0cbf922eda
commit 270c64e758
1 changed files with 8 additions and 7 deletions

View File

@ -197,13 +197,6 @@ sub run {
$self->backup2disk($target);
}
}
$self->log(3, "statistics:");
for (sort keys %{ $self->{counts} }) {
$self->log(3, " $_: $self->{counts}{$_}");
}
for (sort keys %{ $self->{times} }) {
$self->log(3, " $_: $self->{times}{$_} s");
}
$self->export();
}
@ -281,6 +274,14 @@ sub backup2disk {
$self->release_fileset($target);
$self->log(3, "finished backup for target host " . $target->{host} . " dir " . $target->{dir} . ": $count files");
$self->{counts}{objects} += $count;
$self->log(3, "statistics:");
for (sort keys %{ $self->{counts} }) {
$self->log(3, " $_: $self->{counts}{$_}");
}
for (sort keys %{ $self->{times} }) {
$self->log(3, " $_: $self->{times}{$_} s");
}
}
sub reserve_fileset {