binmode IDPBACKUP, ':utf8';
my $nodel;
my $ctr = 0;
+my $restored = 0;
while( <IDPBACKUP> ) {
chomp;
$ctr++;
if( $result ) {
try {
$dir->store( $result->object_key => $result );
+ $restored++;
} catch ($err) {
$nodel = 1;
if( $err =~ /already in use / || $err =~ /Duplicate/) {
}
}
close IDPBACKUP;
-say "Done.";
+say "Restored $restored / $ctr results.";
unlink( $dumpfile ) unless $nodel;
\ No newline at end of file