Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Excerpt

Test functioning of cron jobs for bitpreservation.

Table of Contents
outlinetrue

Goals

  • Test cronjobs for bitpreservation

Prerequisites

None special.

Procedure

Prepare Installation

On test@kb-prod-udv-001.kb.dk:

...

}
Code Block
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

...

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:

...

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

Create

...

the

...

new

...

crontab:

...

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

Install

...

the

...

crontab:

...

}
Code Block
scp crontab_tmp test@kb-test-adm-001:
ssh test@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}

Check Output from Cronjobs

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

Code Block
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
{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@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

...