r11643@llin: dpavlin | 2005-12-12 22:54:26 +0100
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Mon, 12 Dec 2005 20:59:55 +0000 (20:59 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Mon, 12 Dec 2005 20:59:55 +0000 (20:59 +0000)
 convert to bytes, delete backup_parts when re-creating archive

git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@257 8392b6e1-25fa-0310-8288-cc32f8e212ea

bin/BackupPC_tarIncCreate

index 9b9d39b..52f3618 100755 (executable)
@@ -199,7 +199,6 @@ my(%HardLinkExtraFiles, @HardLinks);
 #
 
 my $max_file_size = $Conf{'MaxArchiveFileSize'} || die "problem with MaxArchiveFileSize parametar";
-$max_file_size *= 1024;
 
 my $tar_dir = $Conf{InstallDir}.'/'.$Conf{GzipTempDir};
 die "problem with $tar_dir, check GzipTempDir in configuration\n" unless (-d $tar_dir && -w $tar_dir);
@@ -223,6 +222,15 @@ $sth->execute($Host, $ShareName, $Num);
 my ($backup_id) = $sth->fetchrow_array;
 $sth->finish;
 
+
+# delete exising backup_parts
+my $sth_delete_backup_parts = $dbh->prepare(qq{
+       delete from backup_parts
+       where backup_id = ?
+});
+$sth_delete_backup_parts->execute($backup_id);
+
+
 print STDERR "backup_id: $backup_id working dir: $tar_dir, max uncompressed size $max_file_size bytes, tar $tar_file\n" if ($opts{d});
 
 if (-e $tar_path_final) {