use lib '@amperldir@';
use strict;
+use warnings;
use Getopt::Long;
use Amanda::Config qw( :init :getconf config_dir_relative );
use Amanda::Paths;
use Amanda::Constants;
use Amanda::Process;
+use Amanda::Logfile;
my $kill_enable=0;
my $process_alive=0;
my $logdir=config_dir_relative(getconf($CNF_LOGDIR));
my $logfile = "$logdir/log";
my $amreport="$sbindir/amreport";
-my $amlogroll="$amlibexecdir/amlogroll";
my $amtrmidx="$amlibexecdir/amtrmidx";
my $amcleanupdisk="$amlibexecdir/amcleanupdisk";
if (-f $logfile) {
Amanda::Debug::debug("Processing log file");
run_system(0, $amreport, $config_name, "--from-amdump");
- run_system(1, $amlogroll, $config_name);
+
+ my $ts = Amanda::Logfile::get_current_log_timestamp();
+ Amanda::Logfile::log_rename($ts);
+
run_system(1, $amtrmidx, $config_name);
} else {
print "amcleanup: no unprocessed logfile to clean up.\n";