# Job table keep use Media or Job retention, so it's quite enought
# for good statistics
-# CREATE TABLE job_old (LIKE Job);
-# INSERT INTO job_old
-# (SELECT * FROM Job WHERE JobId NOT IN (SELECT JobId FROM job_old) );
+# CREATE TABLE JobHistory (LIKE Job);
+# INSERT INTO JobHistory
+# (SELECT * FROM Job WHERE JobId NOT IN (SELECT JobId FROM JobHistory) );
my $jobt = $bweb->get_stat_table();
my $graph = CGI::param('graph') || 'job_size';
}
if ($what{storage_cmd}) {
- if (!grep {/^$ret{storage_cmd}$/} ('mount', 'umount', 'release','status')) {
+ if (!grep {/^\Q$ret{storage_cmd}$/} ('mount', 'umount', 'release','status')) {
delete $ret{storage_cmd};
}
}
}
if ($what{since}) {
- my $age = $ret{age} || $opt_i{age};
+ my $age = $ret{age} || human_sec_unit($opt_i{age});
my $since = CGI::param('since') || strftime('%F %T', localtime(time - $age));
if ($since =~ /^(\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?)$/) {
$ret{since} = $1;
+-- Require > 7.4, else use createlang command
+CREATE PROCEDURAL LANGUAGE plpgsql;
+
-- --------------------------------------------------
-- Upgrade from 2.2
-- --------------------------------------------------
--
--
-CREATE PROCEDURAL LANGUAGE plpgsql;
BEGIN;
CREATE FUNCTION SEC_TO_TIME(timestamp with time zone)
--- First, create job_old table
--- CREATE TABLE job_old (LIKE Job);
+-- First, create JobHistory table
+-- CREATE TABLE JobHistory (LIKE Job);
--
-- then put this on your crontab
-- */20 * * * * psql -f /opt/bacula/etc/update_job_old.sql > /home/bacula/update_job_old.log
-INSERT INTO job_old
- (SELECT * FROM Job WHERE JobStatus in ('T', 'f', 'A') AND JobId NOT IN (SELECT JobId FROM job_old) );
+INSERT INTO JobHistory
+ (SELECT * FROM Job WHERE JobStatus in ('T', 'f', 'A') AND JobId NOT IN (SELECT JobId FROM JobHistory) );
+20Oct08
+ebl Rename job_old to JobHistory
+
07Oct08
ebl Add base64_decode_lstat() function to Mysql