/[BackupPC]/trunk/bin/BackupPC_updatedb
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/BackupPC_updatedb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 14 by dpavlin, Sun Jul 10 22:56:43 2005 UTC revision 15 by dpavlin, Mon Jul 11 00:07:25 2005 UTC
# Line 186  foreach my $host_key (keys %{$hosts}) { Line 186  foreach my $host_key (keys %{$hosts}) {
186                  my $backupNum = $backup->{'num'};                  my $backupNum = $backup->{'num'};
187                  my @backupShares = ();                  my @backupShares = ();
188    
189                  print $hosts->{$host_key}->{'host'},"\t$backupNum\n";                  print $hosts->{$host_key}->{'host'},"\t#$backupNum\n";
190    
191                  $sth->{backups_broj}->execute($hostID, $backupNum);                  $sth->{backups_broj}->execute($hostID, $backupNum);
192                  my ($broj) = $sth->{backups_broj}->fetchrow_array();                  my ($broj) = $sth->{backups_broj}->fetchrow_array();
# Line 256  sub found_in_db { Line 256  sub found_in_db {
256          my @param = ($shareID,$path,$name,$date,$size);          my @param = ($shareID,$path,$name,$date,$size);
257          $sth->{file_in_db}->execute(@param);          $sth->{file_in_db}->execute(@param);
258          my ($rows) = $sth->{file_in_db}->fetchrow_array();          my ($rows) = $sth->{file_in_db}->fetchrow_array();
259          print STDERR ( $rows ? '+' : '-' ), join(" ",@param), "\n";  #       print STDERR ( $rows ? '+' : '-' ), join(" ",@param), "\n";
260          return $rows;          return $rows;
261  }  }
262    
# Line 298  sub recurseDir($$$$$$$$) { Line 298  sub recurseDir($$$$$$$$) {
298    
299                  if (! $beenThere->{$key} && ! found_in_db(@data)) {                  if (! $beenThere->{$key} && ! found_in_db(@data)) {
300                          $sth->{'insert_files'}->execute(@data);                          $sth->{'insert_files'}->execute(@data);
301                          print STDERR "$key\n";  #                       print STDERR "$key\n";
302                          if ($filesInBackup->{$path_key}->{'type'} == BPC_FTYPE_DIR) {                          if ($filesInBackup->{$path_key}->{'type'} == BPC_FTYPE_DIR) {
303                                  $new_dirs++;                                  $new_dirs++;
304                          } else {                          } else {

Legend:
Removed from v.14  
changed lines
  Added in v.15

  ViewVC Help
Powered by ViewVC 1.1.26