Test of the Bitpreservation functionality

Recent issues:



None special.


Prepare Installation

See Setup DK test environment.

Upload a Small Bitarchive

ssh devel@kb-prod-udv-001.kb.dk
scp -r ${HOME}/bitarchive_testdata kb-test-adm-001:
ssh kb-test-adm-001 chmod 755  bitarchive_testdata/upload.sh
#ssh kb-test-adm-001 'source .bash_profile;bitarchive_testdata/upload.sh $TESTX arcfiles'
#ssh kb-test-adm-001 'source .bash_profile;bitarchive_testdata/upload.sh $TESTX warcfiles'
ssh devel@kb-test-adm-001
bash bitarchive_testdata/upload.sh $TESTX arcfiles
bitarchive_testdata/upload.sh $TESTX warcfiles

Check Bitpreservation Status

Go to the Bitpreservation section of the GUI and update information for each replica.

Each replica should have the same number of files (25) and there should be no errors.

Delete a File

ssh devel@kb-prod-udv-001.kb.dk
mkdir -p temp_test3a
scp netarkdv@sb-test-bar-001.statsbiblioteket.dk:/netarkiv/0001/netarkdv/${TESTX}/filedir/2-metadata* temp_test3a/
ssh netarkdv@sb-test-bar-001.statsbiblioteket.dk rm /netarkiv/0001/netarkdv/${TESTX}/filedir/2-metadata*

Check that File is Missing in GUI

In the GUI, update the file status for SB. There should be one file missing.

Restore File Manually

Copy the file back:

scp temp_test3a/2-metadata* netarkdv@sb-test-bar-001.statsbiblioteket.dk:/netarkiv/0001/netarkdv/${TESTX}/filedir/

Now go to the Bitpreservation GUI and and check the box Get info for the "missing" file. The page should now say "There are no more missing files".

Delete the File Again

Delete the file again as in the above procedure.

Restore the File via the GUI

Corrupt a File in the Bitarchive

ssh netarkdv@sb-test-bar-001.statsbiblioteket.dk ls -l /netarkiv/0001/netarkdv/${TESTX}/filedir/2-metadata*
ssh netarkdv@sb-test-bar-001.statsbiblioteket.dk "echo foobar >> /netarkiv/0001/netarkdv/${TESTX}/filedir/2-metadata*"
ssh netarkdv@sb-test-bar-001.statsbiblioteket.dk ls -l /netarkiv/0001/netarkdv/${TESTX}/filedir/2-metadata*

The file size should have increased by a few bytes.

In the GUI, update the checksums for the replica SBN.

There should now be one file with an error. The file should have status UPLOAD_FAILED for SBN. Remain on this page in the GUI.

The number of files in all the replicas should be equal.

Corrupt the File Further

ssh netarkdv@sb-test-bar-001.statsbiblioteket.dk "echo barfoo >> /netarkiv/0001/netarkdv/${TESTX}/filedir/2-metadata*"

Try to Correct the File Through the GUI

Try to correct the file through the GUI (the credentials should be given as "examplecredentials").

It should fail with the message ...failed due to checksum mismatch... .

Correct the File Through the GUI

Delete a Checksum Entry

ssh kb-test-acs-001 "sed -i '/2-metadata/d' ${TESTX}/CS/checksum_CS.md5"

Verify the Deleted Entry

Correct the Deleted Entry

Corrupt a Checksum Entry

ssh kb-test-acs-001 "sed -i '/2-metadata/s/$/foobar/' ${TESTX}/CS/checksum_CS.md5"

Correct the Corrupted Entry

Stop the Test and Clean-Up