Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Creating the
...
database dump file
This is an example for MySSQL.
1.
...
Stop the JobScheduler
2. Create a dump of the history tables
Code Block |
---|
./mysqldump
scheduler SCHEDULER_HISTORY SCHEDULER_ORDER_HISTORY SCHEDULER_ORDER_STEP_HISTORY SCHEDULER_VARIABLES
--host=<host> --port=<port> --user=<user> -p
--add-drop-table --skip-comments --single-transaction --opt > scheduler_history.dmp
|
3.
...
Create an archive database
Code Block |
---|
prompt:~> /opt/mysql-5.0.15/bin/mysql --host=<host> --port=<port> --user=<user> -p scheduler_archive mysql> create database scheduler_archive mysql> exit |
4.
...
Import dump to the archive
Code Block |
---|
prompt:~>./mysql --host=<host> --port=<port> --user=<user> -p scheduler_archive < scheduler_history.dmp
|
5.
...
Delete old records (please check scheduler_archive before doing this)
Code Block |
---|
prompt:~> ./mysql --host=<host> --port=<port> --user=<user> -p scheduler mysql> dropdelete tablefrom SCHEDULER_HISTORY where start_time < '2012-01-01'; mysql> dropdelete tablefrom SCHEDULER_ORDER_HISTORY where start_time < '2012-01-01'; mysql> dropdelete tablefrom SCHEDULER_ORDER_STEP_HISTORY where start_time < '2012-01-01'; mysql> exit |
6.
...
Optimize table
Code Block |
---|
prompt:~> ./opt/sos-berlin/..../install/scheduler_install_tables.shmysql --host=<host> --port=<port> --user=<user> -p scheduler mysql> OPTIMIZE TABLE SCHEDULER_HISTORY,SCHEDULER_ORDER_HISTORY,SCHEDULER_ORDER_STEP_HISTORY; mysql> exit |
How to access logs from the archive by id
Setup Set-up a new job scheduler JobScheduler instance. This instance should have no own not run any jobs.
To access a the task log
Code Block |
---|
http://localhost:4444/show_log?task=1262811
|
To access an order log
Code Block |
---|
http://localhost:4444/show_log?order=backup_pg_sql&history_id=403816
|