my $in_backup_increment;
-if ( !getopts("th:n:p:r:s:b:w:", \%opts) ) {
+if ( !getopts("th:n:p:r:s:b:w:v", \%opts) ) {
print STDERR <<EOF;
usage: $0 [options]
Required options:
-p pathAdd new path prefix
-b BLOCKS BLOCKS x 512 bytes per record (default 20; same as tar)
-w writeBufSz write buffer size (default 1048576 = 1MB)
+ -v verbose output
EOF
exit(1);
}
my $dsn = $Conf{SearchDSN};
my $db_user = $Conf{SearchUser} || '';
- print STDERR curr_time(), "getting files for $host:$share increment $dumpNo...";
+ print STDERR curr_time(), "getting files for $host:$share increment $dumpNo..." if ($opts{v});
my $sql = q{
SELECT path
FROM files
my $sth = $dbh->prepare($sql);
$sth->execute($host, $share, $dumpNo);
my $count = $sth->rows;
- print STDERR " found $count items\n";
+ print STDERR " found $count items\n" if ($opts{v});
while (my $row = $sth->fetchrow_arrayref) {
-print STDERR "+ ", $row->[0],"\n";
+#print STDERR "+ ", $row->[0],"\n";
$in_backup_increment->{ $row->[0] }++;
}
#print STDERR "? $tarPath\n";
return unless ($in_backup_increment->{$tarPath});
-print STDERR "A $tarPath\n";
+#print STDERR "A $tarPath\n";
if ( defined($PathRemove)
&& substr($tarPath, 0, length($PathRemove)) eq $PathRemove ) {