index: test
sudo rm -Rf /data/backuppc/data/casket || true
- sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb -i
+ sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb -j
xls: test
sudo -u backuppc /data/backuppc/bin/BackupPC_xls_report
createdb $(db)
date > $(profile_file)
echo "## NORMAL RUN" >> $(profile_file)
- sudo rm -Rf /data/backuppc/data/casket || true
- estcall raw -auth admin admin 'http://localhost:1978/master?action=nodedel&name=backuppc' || true
- estcall raw -auth admin admin 'http://localhost:1978/master?action=nodeadd&name=backuppc&label=BackupPC%20search%20index'
sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb -c $(profile_opt) | tee -a $(profile_file)
echo "## DProf RUN" >> $(profile_file)
- sudo rm -Rf /data/backuppc/data/casket || true
- estcall raw -auth admin admin 'http://localhost:1978/master?action=nodeadd&name=backuppc&label=BackupPC%20search%20index'
sudo -u backuppc perl -d:DProf /data/backuppc/bin/BackupPC_updatedb -d $(profile_opt)
dprofpp 2>&1 | tee -a $(profile_file)
echo "## DBI_PROFILE RUN" >> $(profile_file)
my %opt;
-if ( !getopts("cdm:v:i", \%opt ) ) {
+if ( !getopts("cdm:v:ij", \%opt ) ) {
print STDERR <<EOF;
usage: $0 [-c|-d] [-m num] [-v|-v level] [-i]
-d delete database before import
-m num import just num increments for one host
-v num set verbosity (debug) level (default $debug)
- -i update HyperEstraier full text index
+ -i update Hyper Estraier full text index
+ -j update full text, don't check existing files
+
+Option -j is variation on -i. It will allow faster initial creation
+of full-text index from existing database.
+
EOF
exit 1;
}
my ($host_id, $share_id, $num) = @_;
+ my $skip_check = $opt{j} && print STDERR "Skipping check for existing files -- this should be used only with initital import\n";
+
unless ($use_hest) {
print STDERR "HyperEstraier support not enabled in configuration\n";
return;
my $fid = $row->{'fid'} || die "no fid?";
my $uri = 'file:///' . $fid;
- my $id = ($hest_db || $hest_node)->uri_to_id($uri);
- next unless ($id == -1);
+ unless ($skip_check) {
+ my $id = ($hest_db || $hest_node)->uri_to_id($uri);
+ next unless ($id == -1);
+ }
# create a document object
my $doc = HyperEstraier::Document->new;
## update index ##
-if (($opt{i} || ($index_path && ! -e $index_path)) && !$opt{c}) {
+if (($opt{i} || $opt{j} || ($index_path && ! -e $index_path)) && !$opt{c}) {
# update all
print "force update of HyperEstraier index ";
print "importing existing data" unless (-e $index_path);
print "by -i flag" if ($opt{i});
+ print "by -j flag" if ($opt{j});
print "\n";
hest_update();
}