Page History
...
Checksum Checker is program that can run to verify the checksum of every item within DSpace. Checksum Checker was designed with the idea that most System Administrators will run it from the cron. Depending on the size of the repository choose the options wisely.
Command used: |
|
Java class: | org.dspace.app.checker.ChecksumChecker |
Arguments short and (long) forms): | Description |
| Loop continuously through the bitstreams |
| Specify a handle to check |
| Space separated list of bitstream IDs |
| Check count |
| Checking duration |
| Calls online help |
| Loop once through bitstreams |
| Prune old results (optionally using specified properties file for configuration |
| Report all processing |
There are three aspects of the Checksum Checker's operation that can be configured:
...
Optionally, you may choose to receive automated emails listing the Checksum Checkers' results to the email address specified in the mail.admin
configuration property. Schedule it to run after the Checksum Checker has completed its processing (otherwise the email may not contain all the results). As of DSpace 4.1, an email is only generated if the selected report contains at least one bitstream needing attention.
Command used: |
|
Java class: | org.dspace.checker.DailyReportEmailer |
Arguments short and (long) forms): | Description |
| Send all the results (everything specified below) |
| Send E-mail report for all bitstreams set as deleted for today. |
| Send E-mail report for all bitstreams not found in assetstore for today. |
| Send E-mail report for all bitstreams where checksum has been changed for today. |
| Send the Unchecked bitstream report. |
| Send E-mail report for all bitstreams set to longer be processed for today. |
| Help |
You can also combine options (e.g. -m -c
) for combined reports.
Cron. Follow the same steps above as you would running checker in cron. Change the time but match the regularity. Remember to schedule this after Checksum Checker has run. For an example cron setup, see Scheduled Tasks via Cron.
Database Query
A query like the following can be used to check the results of the checker:
Code Block | ||
---|---|---|
| ||
SELECT
ch.process_start_date,
ch.process_end_date,
ch.result,
ch.checksum_expected,
ch.checksum_calculated,
b.bitstream_id,
bfr.short_description,
b.store_number,
substring(b.internal_id for 2) || '/' || substring(b.internal_id from 3 for 2) || '/' || substring(b.internal_id from 5 for 2) || '/' || b.internal_id AS bitstream_path,
hi.handle AS item_handle,
hc.handle AS collection_handle
FROM checksum_history ch
JOIN bitstream b
ON ch.bitstream_id = b.bitstream_id
JOIN bitstreamformatregistry bfr
ON b.bitstream_format_id = bfr.bitstream_format_id
LEFT JOIN bundle2bitstream bb
ON b.bitstream_id = bb.bitstream_id
LEFT JOIN item2bundle ib
ON bb.bundle_id = ib.bundle_id
LEFT JOIN item i
ON ib.item_id = i.item_id
LEFT JOIN handle hi
ON i.item_id = hi.resource_id
AND hi.resource_type_id = 2
LEFT JOIN handle hc
ON i.owning_collection = hc.resource_id
AND hc.resource_type_id = 3
WHERE ch.result != 'CHECKSUM_MATCH'
AND date_trunc('day', process_start_date) = CURRENT_DATE
ORDER BY ch.check_id DESC |