Gitlab Community Edition Instance
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bnachtw
TSM-Scripts
Commits
abcc4e51
Commit
abcc4e51
authored
Feb 28, 2022
by
Bjoern Nachtwey
Browse files
just storing a template
parent
e6c5353a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Backup/changed-filelists-template.sh
0 → 100644
View file @
abcc4e51
#! /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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment