49 |
} |
} |
50 |
} |
} |
51 |
|
|
|
my $total_kb = int($total_size / 1024); |
|
|
|
|
52 |
# and now a little magic to check multi-volume increments |
# and now a little magic to check multi-volume increments |
53 |
my $parts = 1; |
my $parts = 1; |
54 |
if ($#selected_backup_ids == 0) { |
if ($#selected_backup_ids == 0) { |
55 |
($parts) = $dbh->selectrow_array("select parts from backups where id = ?", undef, $selected_backup_ids[0]); |
($parts) = $dbh->selectrow_array("select parts from backups where id = ?", undef, $selected_backup_ids[0]); |
56 |
} |
} |
57 |
|
|
58 |
if ($total_kb > ($Conf{MaxArchiveSize} * $parts)) { |
if ($total_size > ($Conf{MaxArchiveSize} * $parts)) { |
59 |
$cont .= eval( q{ ${h2(Error)}}); |
$cont .= eval( q{ ${h2(Error)}}); |
60 |
$cont .= "Selected backups size $total_kb Kb exceed max archive size $Conf{MaxArchiveSize} Kb."; |
$cont .= "Selected backups size $total_size Kb exceed max archive size $Conf{MaxArchiveSize} Kb."; |
61 |
} elsif ($total_size == 0) { |
} elsif ($total_size == 0) { |
62 |
$cont .= eval( q{ ${h2(Error)}}); |
$cont .= eval( q{ ${h2(Error)}}); |
63 |
$cont .= "No backups selected."; |
$cont .= "No backups selected."; |