diff options
Diffstat (limited to 'lib/App/Beam/Restore.pm')
-rw-r--r-- | lib/App/Beam/Restore.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/App/Beam/Restore.pm b/lib/App/Beam/Restore.pm index 7e3129a..5c2dcf2 100644 --- a/lib/App/Beam/Restore.pm +++ b/lib/App/Beam/Restore.pm @@ -8,7 +8,7 @@ our @ISA = qw(App::Beam); use Unix::Sysexits; use App::Beam; -use App::Beam::History::Entry qw(:state); +use App::Beam::History::Entry qw(state_string :state); use Getopt::Long qw(GetOptionsFromArray); =head1 NAME @@ -69,13 +69,17 @@ sub run { unless defined $index; } - $self->debug(1, "restoring from backup $index"); + $self->debug(1, "restoring from backup " . + $self->format_name(undef, $index)); $self->abend(EX_UNAVAILABLE, "backup $index was not successful") unless $self->{history}->top($index)->state == STATE_SUCCESS; foreach my $item (@items) { + $self->debug(1, "restoring $item"); my $backend = $self->{backend}{$self->get("item.$item.backend")}; - $backend->restore($index, $item); + my $status = $backend->restore($index, $item); + $self->update_status($status); + $self->debug(1, "$item: " . state_string($status)); } } |