update SQL for new schema, cleanup
[BackupPC.git] / bin / BackupPC_tarIncCreate
index e747466..a76e439 100755 (executable)
@@ -61,7 +61,7 @@
 
 use strict;
 no  utf8;
-use lib "__INSTALLDIR__/lib";
+use lib "/usr/local/BackupPC/lib";
 use File::Path;
 use Getopt::Std;
 use DBI;
@@ -69,7 +69,7 @@ use BackupPC::Lib;
 use BackupPC::Attrib qw(:all);
 use BackupPC::FileZIO;
 use BackupPC::View;
-use BackupPC::SearchLib;
+use BackupPC::Search;
 use Time::HiRes qw/time/;
 use POSIX qw/strftime/;
 use File::Which;
@@ -80,7 +80,7 @@ die("BackupPC::Lib->new failed\n") if ( !(my $bpc = BackupPC::Lib->new) );
 my $TopDir = $bpc->TopDir();
 my $BinDir = $bpc->BinDir();
 my %Conf   = $bpc->Conf();
-%BackupPC::SearchLib::Conf = %Conf;
+%BackupPC::Search::Conf = %Conf;
 my %opts;
 my $in_backup_increment;
 
@@ -196,12 +196,12 @@ my(%HardLinkExtraFiles, @HardLinks);
 # Write out all the requested files/directories
 #
 
-my $max_file_size = $Conf{'MaxArchiveFileSize'} || die "problem with MaxArchiveFileSize parametar";
+my $max_file_size = $Conf{'ArchiveChunkSize'} || die "problem with MaxArchiveFileSize parametar";
 
-my $tar_dir = $Conf{InstallDir}.'/'.$Conf{GzipTempDir};
+my $tar_dir = $Conf{GzipTempDir};
 die "problem with $tar_dir, check GzipTempDir in configuration\n" unless (-d $tar_dir && -w $tar_dir);
 
-my $tar_file = BackupPC::SearchLib::getGzipName($Host, $ShareName, $Num) || die "can't getGzipName($Host, $ShareName, $Num)";
+my $tar_file = BackupPC::Search::getGzipName($Host, $ShareName, $Num) || die "can't getGzipName($Host, $ShareName, $Num)";
 
 my $tar_path_final = $tar_dir . '/' . $tar_file;
 my $tar_path = $tar_path_final . '.tmp';
@@ -657,7 +657,7 @@ sub TarWriteFile
     my $size = $in_backup_increment->{$tarPath};
     return unless (defined($size));
 
-    # is this file too large to fit into MaxArchiveFileSize?
+    # is this file too large to fit into ArchiveChunkSize?
 
     if ( ($current_tar_size + tar_overhead($tarPath) + $size) > $max_file_size ) {
        print STDERR "# tar file $current_tar_size + $tar_header_length + $size > $max_file_size, splitting\n" if ($opts{d});