You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Creating the dumpfile

This is a sample for MySql.

1.Stop the JobScheduler

2.Create a dump of history tables

 ./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

 prompt:~> ./mysql --host=<host> --port=<port> --user=<user> -p scheduler_archive 
 mysql> create database scheduler_archive
 mysql> exit

4.import dump to the archive

 prompt:~>./mysql --host=<host> --port=<port> --user=<user> -p scheduler_archive < scheduler_history.dmp

5.Optional drop the archived tables (DO NOT DROP SCHEDULER_VARIABLES!!!!!!!!!!!!!!!!!)

  prompt:~> ./mysql --host=<host> --port=<port> --user=<user> -p scheduler 
  mysql> drop table SCHEDULER_HISTORY
  mysql> drop table SCHEDULER_ORDER_HISTORY
  mysql> drop table SCHEDULER_ORDER_STEP_HISTORY
  mysql> exit

6.Recreate the tables

  prompt:~> ./opt/sos-berlin/..../install/scheduler_install_tables.sh

How to access logs from the archive by id

Setup a new job scheduler instance. This instance should have no own jobs.

To access a task log

 http://localhost:4444/show_log?task=1262811

To access an order log

 http://localhost:4444/show_log?order=backup_pg_sql&history_id=403816
  • No labels