TEST 5A
Test the functioning of cron jobs for bitpreservation.
Goals
- Test cronjobs for bitpreservation
Prerequisites
None special.
Procedure
Prepare Installation
On devel@kb-prod-udv-001.kb.dk:
cd prepared_software/ # VERSION assumes the existence of /home/devel/nas_versions/NetarchiveSuite-$VERSION.zip export VERSION=XXXXXXXXX export TESTX=TEST5A export PORT=807? export MAILRECEIVERS=foo@bar.dk all_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 devel@kb-prod-udv-001, copy over the needed file:
scp cronjobs/*.sh devel@kb-test-adm-001.kb.dk:bin ssh devel@kb-test-adm-001.kb.dk 'chmod 755 bin/*.sh' ssh devel@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/devel/bin/ba_mis_name_cron.sh devel test $TESTX $PORT $MAILRECEIVERS )" >> crontab_tmp echo "*/5 * * * * (source ~/.bashrc; source ~/.bash_profile; /home/devel/bin/ba_checksum_cron.sh devel test $TESTX $PORT $MAILRECEIVERS )" >> crontab_tmp
Install the crontab:
scp crontab_tmp devel@kb-test-adm-001: ssh devel@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 devel@kb-test-adm-001 cat ${TESTX}/ba_cron_checksums.log ssh devel@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 devel@kb-test-adm-001 'rm -f crontab_tmp; touch crontab_tmp; crontab crontab_tmp'
Close Down the Test
cleanup_all_test.sh