Commit 96694f82 authored by Bjoern Nachtwey's avatar Bjoern Nachtwey
Browse files

added some setting and reporting

parent c5458507
#! /bin/bash
###########################################################
# some settings
###########################################################
today=$(date "+%F")
# E-Mail
#email="tsm-team@gwdg.de"
email="bnachtw@gwdg.de"
# data path
dpath=/mnt/oc_stor_userdata
# snapshot path
#$spath=$(ls -d $dpath/.snapshot/snap_daily.* | grep $today)
# working dir for backup
wpath=/tsm/ocnode
###########################################################
# do backup
###########################################################
#
# 1. check for snapshot
if [[ ! -d $spath ]]
then
echo "no tsm snapshot! ABORT!"
# exit 100;
fi
# 2. run backup using dsmci.pl using docker
docker run --rm \
-v /tsm:/tsm:rw \
-v /home:/home:ro \
-v /opt/tivoli/tsm/client/ba/bin:/opt/tivoli/tsm/client/ba/bin:ro \
-v /etc/adsm:/etc/adsm:ro \
-v /mnt/oc_stor_userdata:/mnt/oc_stor_userdata:ro \
gwdg-tsm-client:8-1-12 /tsm/ocnode/OC-daily-selective-backup.sh
-v $dpath:$dpath:ro \
gwdg-tsm-client:8-1-12 bash -c "$wpath/OC-daily-selective-backup.sh $today"
# X. e-Mail output
cat $wpath/$today.daily-stats.txt | mail -s "OC-Backup: $today daily stats" $email
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