Skip to content

Commit

Permalink
pbackup: Remove test command implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Apr 7, 2025
1 parent f044e04 commit bc8d7cd
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions bin/pbackup
Original file line number Diff line number Diff line change
Expand Up @@ -895,41 +895,6 @@ sub cmd_disable {
}
sub cmd_test {
my $files = 0;
my $jobs = 0;
my $COUNT_SQL = <<'EOF';
SELECT
stat_job_id AS count_job_id,
count(stat_job_id) as count_count
FROM stat
GROUP BY stat_job_id
EOF
my $keep = time - $DAYS * 24 * 60 * 60;
my $sth = $dbh->prepare(<<"EOF");
SELECT job_name, stat_started, stat_files, path_server, path_path
FROM job,stat, path, ($COUNT_SQL)
WHERE stat_job_id = job_id AND job_path_id = path_id
AND stat_job_id = count_job_id AND count_count > 1
AND stat_started < ?
ORDER BY stat_started
EOF
$sth->execute($keep);
while (my $row = $sth->fetchrow_arrayref) {
my ($job_name, $stat_started, $stat_files, $path_server, $path_path) = @$row;
printf " %-21s %s %10s %s:%s\n",
$job_name,
shortDate($stat_started),
$stat_files,
$path_server,
$path_path;
$files += $stat_files;
$jobs++;
}
print "\n";
print "(expire time : " . shortDate($keep) . ")\n";
print "To do: $files files $jobs jobs\n";
}
sub move_new {
Expand Down

0 comments on commit bc8d7cd

Please sign in to comment.