Commit 32dc9de5 authored by Bjoern Nachtwey's avatar Bjoern Nachtwey
Browse files

added some files for weekly backup using dsmci.pl

parent 96694f82
# dsmci.cfg
* sample configuration file for dsmci.pl as used for development
# you may use either "*" or "#" to comment
# you may also add comments at the end of an option line
# if options are not given, defaults will be used
# options available:
# MAXTHREADS=<Number> # maximum number of parallel threads to be used
# OPTIONFILE=<Path and Name> # .. of dsm.opt file (or however it is called)
DEPTH = 1
MAXTHREADS = 50 * in this example just 3 threads
MODE = SCHED
OPTFILE = /tsm/ocnode/owncloud.opt
STARTPATH = /mnt/oc_stor_userdata/argyris.papantonis@med.uni-goettingen.de/
STARTPATH = /mnt/oc_stor_userdata/
#! /bin/bash
# initial path
wpath=/tsm/ocnode # working dir path
# switch to workig dir
cd $wpath
# do parallel backup
perl -f dsmci.pl
exit $?
#! /bin/bash
#
# inital approach without controlling the NetApp snapshot, just assume it's there :-)
#
###########################################################
# some settings
###########################################################
# E-Mail
#email="tsm-team@gwdg.de"
email="bnachtw@gwdg.de"
# data path
dpath=/mnt/oc_stor_userdata
# snapshot path
spath=$dpath/.snapshot/tsm
# working dir for backup
wpath=/tsm/ocnode
today=$(date "+%F");
###########################################################
# 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 -it \
-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 $spath:$dpath:ro \
gwdg-tsm-client:8-1-12 bash -c 'export LANG=en_US.UTF-8 && cd /tsm/ocnode && /tsm/ocnode/run-dsmci.pl'
rc=$?
# X. e-Mail output
cat $wpath/$today.dsmci-stats.txt | mail -s "OC-Backup: $today weekly 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