--- trunk/bin/BackupPC_incPartsUpdate 2005/10/10 13:04:51 157 +++ trunk/bin/BackupPC_incPartsUpdate 2005/10/10 13:39:10 158 @@ -61,9 +61,10 @@ my $sth = $dbh->prepare( qq{ select + backups.id as backup_id, hosts.name as host, shares.name as share, - num as num + backups.num as num from backups join shares on backups.hostid = shares.hostid and shares.id = backups.shareid @@ -75,6 +76,8 @@ $sth->execute(); +my $sth_inc_size = $dbh->prepare(qq{ update backups set inc_size = ? where id = ? }); + %BackupPC::SearchLib::Conf = %Conf; while (my $row = $sth->fetchrow_hashref) { @@ -88,7 +91,13 @@ system($cmd) == 0 or die "failed: $?"; - print fmt_time(time() - $t),"\n"; + my $size = (stat( "$tar_dir/$tar_file" ))[7]; + + print fmt_time(time() - $t)," $size bytes\n"; + + $sth_inc_size->execute($size, $row->{'backup_id'}); + + $dbh->commit; }