# check if host exists
my $host_info = $bpc->HostInfoRead( $host );
-#print Dumper($host_info, $bpc->HostInfoRead( 'localhost' ));
-die "host '$host' is not found\n" unless ($host_info->{$host});
+print Dumper($host_info, $bpc->HostInfoRead( 'localhost' ));
+die "host '$host' is not found, please add it to config/hosts configuration file\n" unless ($host_info->{$host});
# create restore host configuration
}
link $path, $restore_path || die "can't create link $path -> $restore_path: $!\n";
- $bpc->ServerMesg("log User backuppc started restore of $path");
+ my $user = $host_info->{$host}->{user} || die "can't get user for host $host";
+
+ $bpc->ServerMesg("log User $user started recovery from increment $path");
my $full = 0;
- my $r = $bpc->ServerMesg("backup $host $host backuppc $full");
+ my $r = $bpc->ServerMesg("backup $host $host $user $full");
print "backup --> $r";
die $r if ($r =~ m/^error/);