Test functioning of cron jobs for bitpreservation.
Goals
- Test cronjobs for bitpreservation
Prerequisites
None special.
Procedure
Prepare Installation
On test@kb-prod-udv-001.kb.dk:
export TESTX=TEST5A export PORT=807? export MAILRECEIVERS=foo@bar.dk stop_test.sh cleanup_all_test.sh prepare_test_db.sh install_test.sh start_test.sh
Check the the GUI is available at http://kb-test-adm-001:$PORT .
Run a Harvest
Define and run a selective harvest of netarkivet.dk, with the default order template and a once-per-week schedule.
Install Crontabs
On test@kb-prod-udv-001, copy over the needed file:
scp release_software_dist/projects/webarkivering/scripts/cronjobs/*.sh test@kb-test-adm-001.kb.dk:bin ssh test@kb-test-adm-001.kb.dk 'chmod 755 bin/*.sh' ssh test@kb-test-adm-001.kb.dk 'rm Bitpreservation-filestatus.jsp*'
Create the new crontab:
rm -f crontab_tmp; echo "*/5 * * * * (source ~/.bashrc; source ~/.bash_profile; /home/test/bin/ba_mis_name_cron.sh test $TESTX $PORT $MAILRECEIVERS )" >> crontab_tmp echo "*/5 * * * * (source ~/.bashrc; source ~/.bash_profile; /home/test/bin/ba_checksum_cron.sh test $TESTX $PORT $MAILRECEIVERS )" >> crontab_tmp
Install the crontab:
scp crontab_tmp test@kb-test-adm-001: ssh test@kb-test-adm-001 crontab crontab_tmp
Check Output from Cronjobs
Wait five minutes for the cronjobs to run and then look at the output:
ssh test@kb-test-adm-001 cat ${TESTX}/ba_cron_checksums.log ssh test@kb-test-adm-001 cat ${TESTX}/ba_cron_missing_files.log
The output should not show any errors.
Also check the webpage
http://kb-test-adm-001.kb.dk:${PORT}/BitPreservation/Bitpreservation-filestatus.jsp
. The date of last update should correspond to when the cronjobs were last run.
Disable the Cronjobs
ssh test@kb-test-adm-001 'rm -f crontab_tmp; touch crontab_tmp; crontab crontab_tmp'
Close Down the Test
cleanup_all_test.sh