rename MaxArchiveFileSize to ArchiveChunkSize
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 28 Jan 2011 12:50:33 +0000 (13:50 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 28 Jan 2011 12:50:33 +0000 (13:50 +0100)
grep -rl MaxArchiveFileSize . | xargs -i sh -cv "perl -p -i -n -e 's/MaxArchiveFileSize/ArchiveChunkSize/' {}"

bin/BackupPC_ASA_PostArchive_Update
bin/BackupPC_tarIncCreate
conf/config.pl
lib/BackupPC/Search.pm

index 3ffb763..8d69bf6 100755 (executable)
@@ -263,8 +263,8 @@ sub check_archive {
                        $items++;
                        $tar_size_inarc += $entry->size;
 
                        $items++;
                        $tar_size_inarc += $entry->size;
 
-                       if ($tar_size_inarc > $Conf{MaxArchiveFileSize}) {
-                               print ", part $filename is too big $tar_size_inarc > $Conf{MaxArchiveFileSize}\n";
+                       if ($tar_size_inarc > $Conf{ArchiveChunkSize}) {
+                               print ", part $filename is too big $tar_size_inarc > $Conf{ArchiveChunkSize}\n";
                                return 0;
                        }
 
                                return 0;
                        }
 
index 3cad08f..a76e439 100755 (executable)
@@ -196,7 +196,7 @@ my(%HardLinkExtraFiles, @HardLinks);
 # Write out all the requested files/directories
 #
 
 # 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{GzipTempDir};
 die "problem with $tar_dir, check GzipTempDir in configuration\n" unless (-d $tar_dir && -w $tar_dir);
 
 my $tar_dir = $Conf{GzipTempDir};
 die "problem with $tar_dir, check GzipTempDir in configuration\n" unless (-d $tar_dir && -w $tar_dir);
@@ -657,7 +657,7 @@ sub TarWriteFile
     my $size = $in_backup_increment->{$tarPath};
     return unless (defined($size));
 
     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});
 
     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});
index 235fe0b..d852607 100644 (file)
@@ -2319,8 +2319,8 @@ $Conf{ArchiveMediaSize} = 4404019200;
 #
 # maximum size of one (uncompressed) file on archive medium (in bytes)
 # default: 2Gb - 2k for DVD
 #
 # maximum size of one (uncompressed) file on archive medium (in bytes)
 # default: 2Gb - 2k for DVD
-#$Conf{MaxArchiveFileSize} = (2048 - 2) * 1024 * 1024;
-$Conf{MaxArchiveFileSize} = 2145386496;
+#$Conf{ArchiveChunkSize} = (2048 - 2) * 1024 * 1024;
+$Conf{ArchiveChunkSize} = 2145386496;
 
 #
 # Temporary directory for ISO images (relative to install dir)
 
 #
 # Temporary directory for ISO images (relative to install dir)
index c996568..b1b8bea 100644 (file)
@@ -470,7 +470,7 @@ sub displayBackupsGrid($) {
        my $param = shift;
 
        my $max_archive_size = $Conf{ArchiveMediaSize} || die "no ArchiveMediaSize";
        my $param = shift;
 
        my $max_archive_size = $Conf{ArchiveMediaSize} || die "no ArchiveMediaSize";
-       my $max_archive_file_size = $Conf{MaxArchiveFileSize}  || die "no MaxFileInSize";
+       my $max_archive_file_size = $Conf{ArchiveChunkSize}  || die "no MaxFileInSize";
 
        my $retHTML .= q{
                <form id="forma" method="POST" action="}.$MyURL.q{?action=burn">
 
        my $retHTML .= q{
                <form id="forma" method="POST" action="}.$MyURL.q{?action=burn">