22 |
} elsif ($pidfile->pid ne $$) { |
} elsif ($pidfile->pid ne $$) { |
23 |
$pidfile->remove; |
$pidfile->remove; |
24 |
$pidfile = new File::Pid; |
$pidfile = new File::Pid; |
|
$pidfile->write; |
|
|
print STDERR "$0 using pid ",$pidfile->pid," file ",$pidfile->file,"\n"; |
|
25 |
} |
} |
26 |
|
$pidfile->write; |
27 |
|
print STDERR "$0 using pid ",$pidfile->pid," file ",$pidfile->file,"\n"; |
28 |
|
|
29 |
my $t_fmt = '%Y-%m-%d %H:%M:%S'; |
my $t_fmt = '%Y-%m-%d %H:%M:%S'; |
30 |
|
|
202 |
my $inc_nr = 0; |
my $inc_nr = 0; |
203 |
|
|
204 |
foreach my $backup (@backups) { |
foreach my $backup (@backups) { |
205 |
|
|
206 |
$inc_nr++; |
$inc_nr++; |
207 |
last if ($opt{m} && $inc_nr > $opt{m}); |
last if ($opt{m} && $inc_nr > $opt{m}); |
208 |
|
|
209 |
my $backupNum = $backup->{'num'}; |
my $backupNum = $backup->{'num'}; |
210 |
my @backupShares = (); |
my @backupShares = (); |
211 |
|
|
212 |
print $hosts->{$host_key}->{'host'}, "\t#$backupNum\n"; |
print $hosts->{$host_key}->{'host'}, |
213 |
|
"\t#$backupNum\t", |
214 |
|
$backup->{nFilesNew} || '?', "/", $backup->{nFiles} || '?', |
215 |
|
" files\n"; |
216 |
|
|
217 |
$sth->{backups_broj}->execute($hostID, $backupNum); |
$sth->{backups_broj}->execute($hostID, $backupNum); |
218 |
my ($broj) = $sth->{backups_broj}->fetchrow_array(); |
my ($broj) = $sth->{backups_broj}->fetchrow_array(); |