Gitlab Community Edition Instance

Commit bd3d7533 authored by Bjoern Nachtwey's avatar Bjoern Nachtwey
Browse files

just another in-between version

parent c4db1e39
......@@ -2,7 +2,7 @@
today=$(date "+%F");
# $1 => changelistfile
# $1 => path to FS
# $2 => optfile
# $3 => "missing" base path
......@@ -16,32 +16,35 @@ delfile=$today.del
incfile=$today.inc
expfile=$today.exp
grep -v '"tid"' < $1 | grep -v '"uid"' | grep -v '"gid"' | grep -v '"time"' | grep -v '"linkcount"' | grep -v '"size"' | grep -v "{" | grep -v "}" > $infile
# cat last three day's changelist to input file
cat $(find $1 -maxdepth 1 -name "*_chglst.json" -mtime -3) > $infile
# new files
grep -A2 '"CREATE"' $infile | grep '"pathname"' | sed -e 's/,$//' | awk -F '\"' '{print $4}' | sort | uniq > $newfile
grep -A2 '"CREATE"' $infile | grep '"pathname"' | sed -e 's/,$//' | awk -F '\"' '{print $4}' | sort | uniq > $newfile
# changed files
grep -A2 '"MODIFY"' $infile | grep '"pathname"' | sed -e 's/,$//' | awk -F '\"' '{print $4}' | sort | uniq > $chgfile
grep -A2 '"MODIFY"' $infile | grep '"pathname"' | sed -e 's/,$//' | awk -F '\"' '{print $4}' | sort | uniq > $chgfile
# renamed new files
grep -A3 '"RENAME"' $infile | grep '"newname"' | sed -e 's/,$//' | awk -F '\"' '{print $4}' | sort | uniq > $rnnfile
grep -A3 '"RENAME"' $infile | grep '"newname"' | sed -e 's/,$//' | awk -F '\"' '{print $4}' | sort | uniq > $rnnfile
# renamed old files
grep -A2 '"RENAME"' $infile | grep '"pathname"' | sed -e 's/,$//' | awk -F '\"' '{print $4}' | sort | uniq > $ronfile
grep -A2 '"RENAME"' $infile | grep '"pathname"' | sed -e 's/,$//' | awk -F '\"' '{print $4}' | sort | uniq > $ronfile
# deleted files
grep -A2 '"REMOVE"' $infile | grep '"pathname"' | sed -e 's/,$//' | awk -F '\"' '{print $4}' | sort | uniq > $delfile
grep -A2 '"REMOVE"' $infile | grep '"pathname"' | sed -e 's/,$//' | awk -F '\"' '{print $4}' | sort | uniq > $delfile
# files be processed with "i"
cat $newfile $chgfile $rnnfile | sed -e "s#^#$3#" | sort | uniq > $incfile
# files be processed with "i", but filter for files on the most top level
cat missed_files $(cat $newfile $chgfile $rnnfile | grep -v "^/[0-9]*$" | sed -e "s#^#$bpath#")| sort | uniq > $incfile
# files to be procced with "expire"
cat $delfile $ronfile | sed -e "s#^#$3#" | sort | uniq > $expfile
cat $delfile $ronfile | sed -e "s#^#$bpath#" | sort | uniq > $expfile
wc -l $today.???
set -x
# run Backups
/opt/tivoli/tsm/client/ba/bin/dsmc INCremental -filelist=$incfile -optfile=$optfile | tee out.txt
/opt/tivoli/tsm/client/ba/bin/dsmc INCremental -filelist=$incfile -optfile=$optfile | grep "ANS4037E" | cut -f2 -d"'" > missed_files
# run File Expiration
## /opt/tivoli/tsm/client/ba/bin/dsmc EXPire -filelist=$expfile -optfile=$optfile
/opt/tivoli/tsm/client/ba/bin/dsmc EXPire -filelist=$expfile -optfile=$optfile -noprompt
# get stats
echo $today $(wc -l $today.??? | awk '{print "; " $1 }' | tr "\n" " ") >> cfl.stats
# remove temporary files
$today.*
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment