Gitlab Community Edition Instance

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

just storing a template

parent e6c5353a
#! /bin/bash
today=$(date "+%F");
# $1 => changelistfile
# $2 => optfile
# $3 => "missing" base path
optfile=$2
infile=$today.reduced
newfile=$today.new
chgfile=$today.chg
rnnfile=$today.rnn
ronfile=$today.ron
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
# new files
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
# renamed new files
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
# deleted files
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 to be procced with "expire"
cat $delfile $ronfile | sed -e "s#^#$3#" | 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
# run File Expiration
## /opt/tivoli/tsm/client/ba/bin/dsmc EXPire -filelist=$expfile -optfile=$optfile
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