Skip to content
Snippets Groups Projects
Commit 458ca756 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- added a test mode

- minors
parent 37e3e023
No related branches found
No related tags found
No related merge requests found
...@@ -10,31 +10,45 @@ function error () { ...@@ -10,31 +10,45 @@ function error () {
} }
function scan () { function scan () {
ERRLOG="$1" dir="$1"
prefix="$2"
ERRLOG="$3"
TIME=$(date +"%F_%X")
perl -I /home/aromeyke/perl5/lib/perl5/ /root/deep_fixitycheck.pl \ perl -I /home/aromeyke/perl5/lib/perl5/ /root/deep_fixitycheck.pl \
--map_path=/mnt/rosetta-prod_2021_deepfixity_tmp \ --map_path=/mnt/rosetta-prod_2021_deepfixity_tmp \
--search_dir="/mnt/rosetta-prod_2021_deepfixity_tmp/permanent_storage/normal/2021/${i}" \ --search_dir="/mnt/rosetta-prod_2021_deepfixity_tmp/permanent_storage/normal/2021/${dir}" \
--report="report_fixity_year2021_${i}_scan_gestartet_${TIME}.txt" \ --report="report_fixity_year2021_${prefix}_scan_gestartet_${TIME}.txt" \
--cache="deepfixity_cache_year2021_${i}.cache" \ --cache="deepfixity_cache_year2021_${prefix}.cache" \
--stage 1 --stage 1 2>> "$ERRLOG"
2>> "$ERRLOG" }
}
function fixity () { function fixity () {
ERRLOG="$1" dir="$1"
prefix="$2"
ERRLOG="$3"
TIME=$(date +"%F_%X")
perl -I /home/aromeyke/perl5/lib/perl5/ /root/deep_fixitycheck.pl \ perl -I /home/aromeyke/perl5/lib/perl5/ /root/deep_fixitycheck.pl \
--map_path=/mnt/rosetta-prod_2021_deepfixity_tmp \ --map_path=/mnt/rosetta-prod_2021_deepfixity_tmp \
--search_dir="/mnt/rosetta-prod_2021_deepfixity_tmp/permanent_storage/normal/2021/${i}" \ --search_dir="/mnt/rosetta-prod_2021_deepfixity_tmp/permanent_storage/normal/2021/${dir}" \
--report="report_fixity_year2021_${i}_fixity_gestartet_${TIME}.txt" \ --report="report_fixity_year2021_${prefix}_fixity_gestartet_${TIME}.txt" \
--cache="deepfixity_cache_year2021_${i}.cache" \ --cache="deepfixity_cache_year2021_${prefix}.cache" \
--stage 2 --stage 2 2>> "$ERRLOG"
2>> "$ERRLOG" }
}
# 04 already processed if [[ $1 == "TEST" ]]; then
for i in 02 03 05 06 07 08 09 10 11; do echo TEST
TIME=$(date +"%F_%X") TIME=$(date +"%F_%X")
ERRLOG="error_report_year2021_${i}_${TIME}.txt" PREFIX="TEST"
scan "ERRLOG" || error "$ERRLOG" ERRLOG="error_report_year2021_${PREFIX}_${TIME}.txt"
fixity "$ERRLOG" || error "$ERRLOG" scan "04/04" "$PREFIX" "ERRLOG" || error "$ERRLOG"
done fixity "04/04" "$PREFIX" "$ERRLOG" || error "$ERRLOG"
else
# 04 already processed
for month in 02 03 05 06 07 08 09 10 11; do
TIME=$(date +"%F_%X")
ERRLOG="error_report_year2021_${month}_${TIME}.txt"
scan "$month" "$month" "ERRLOG" || error "$ERRLOG"
fixity "$month" "$month" "$ERRLOG" || error "$ERRLOG"
done
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment