Excerpt |
---|
Test the functioning of cron jobs for bitpreservation. |
Table of Contents | ||
---|---|---|
|
Goals
- Test cronjobs for bitpreservation
...
Procedure
Prepare Installation
On test@kbdevel@kb-prod-udv-001.kb.dk:
Code Block |
---|
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 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@kbdevel@kb-prod-udv-001, copy over the needed file:
Code Block |
---|
scp release_software_dist/projects/webarkivering/scripts/cronjobs/*.sh test@kbdevel@kb-test-adm-001.kb.dk:bin ssh test@kbdevel@kb-test-adm-001.kb.dk 'chmod 755 bin/*.sh' ssh test@kbdevel@kb-test-adm-001.kb.dk 'rm Bitpreservation-filestatus.jsp*' |
Create the new crontab:
Code Block |
---|
rm -f crontab_tmp; echo "*/5 * * * * (source ~/.bashrc; source ~/.bash_profile; /home/testdevel/bin/ba_mis_name_cron.sh devel test $TESTX $PORT $MAILRECEIVERS )" >> crontab_tmp echo "*/5 * * * * (source ~/.bashrc; source ~/.bash_profile; /home/testdevel/bin/ba_checksum_cron.sh devel test $TESTX $PORT $MAILRECEIVERS )" >> crontab_tmp |
Install the crontab:
Code Block |
---|
scp crontab_tmp test@kbdevel@kb-test-adm-001: ssh test@kbdevel@kb-test-adm-001 crontab crontab_tmp |
...
Wait five minutes for the cronjobs to run and then look at the output:
Code Block |
---|
ssh test@kbdevel@kb-test-adm-001 cat ${TESTX}/ba_cron_checksums.log ssh test@kbdevel@kb-test-adm-001 cat ${TESTX}/ba_cron_missing_files.log |
...
Disable the Cronjobs
Code Block |
---|
ssh test@kbdevel@kb-test-adm-001 'rm -f crontab_tmp; touch crontab_tmp; crontab crontab_tmp' |
Close Down the Test
cleanup_all_test.sh