Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

Creating the

...

database dump file

This is an example for MySqlMySSQL.

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:~> ./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> delete from SCHEDULER_HISTORY where start_time < '2012-01-01';
 mysql> delete from SCHEDULER_ORDER_HISTORY where start_time < '2012-01-01';
 mysql> delete from SCHEDULER_ORDER_STEP_HISTORY where start_time < '2012-01-01';
 mysql> exit

6. Optimize table

Code Block

 prompt:~> ./mysql --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