Versions Compared

Key

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

...

Excerpt

Test the functioning of cron jobs for bitpreservation.

Table of Contents
outlinetrue

Goals

  • Test cronjobs for bitpreservation

Prerequisites

None special.

Procedure

Prepare Installation

On devel@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
{code}

Check the the GUI is available at [

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:

...

}
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*'
{code}

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
{code}

Install

...

the

...

crontab:

...

}
Code Block
scp crontab_tmp test@kbdevel@kb-test-adm-001:
ssh test@kbdevel@kb-test-adm-001 crontab crontab_tmp
{code}

h3. Check Output from Cronjobs

Wait five minutes for the cronjobs to run and then look at the output:
{code}
ssh test@kb

Check Output from Cronjobs

Wait five minutes for the cronjobs to run and then look at the output:

Code Block
ssh devel@kb-test-adm-001 cat ${TESTX}/ba_cron_checksums.log
ssh test@kbdevel@kb-test-adm-001 cat ${TESTX}/ba_cron_missing_files.log
{code}

The

...

output

...

should

...

not

...

show

...

any

...

errors.

...

Also

...

check

...

the

...

webpage

...

}
Code Block
http://kb-test-adm-001.kb.dk:${PORT}/BitPreservation/Bitpreservation-filestatus.jsp{code}

.

...

The

...

date

...

of

...

last

...

update

...

should

...

correspond

...

to

...

when

...

the

...

cronjobs

...

were

...

last

...

run.

...

Disable

...

the

...

Cronjobs

...

}
Code Block
ssh test@kbdevel@kb-test-adm-001 'rm -f crontab_tmp; touch crontab_tmp; crontab crontab_tmp'
{code}

h3. Close Down the Test

Close Down the Test

cleanup_all_test.sh

...