Linux‎ > ‎Ubuntu/Debian‎ > ‎

Recompiling .rpm packages to .deb/TSM backup on Debian 32 bit

apt-get install alien

wget ftp://ftp.software.ibm.com/storage/tivoli-storage-management/maintenance/client/v6r2/Linux/LinuxX86/v622/6.2.2.0-TIV-TSMBAC-LinuxX86.tar

alien -g gskcrypt32-8.0.13.4.linux.x86.rpm
alien -g gskssl32-8.0.13.4.linux.x86.rpm
alien -g TIVsm-API.i386.rpm
alien -g TIVsm-BA.i386.rpm

mv gskcrypt32-8.0/debian/ gskcrypt32-8.0/DEBIAN
mv gskssl32-8.0/debian gskssl32-8.0/DEBIAN
mv TIVsm-API-6.2.2/debian TIVsm-API-6.2.2/DEBIAN
mv TIVsm-BA-6.2.2/debian TIVsm-BA-6.2.2/DEBIAN

vi gskcrypt32-8.0/DEBIAN/control
vi gskssl32-8.0/DEBIAN/control
vi TIVsm-API-6.2.2/DEBIAN/control
vi TIVsm-BA-6.2.2/DEBIAN/control

Remove the blank line after Maintainer:
Remove "${shlibs:Depends}" in "Depends:" line
Join Two "Description:" lines into one line
Delete last two lines " ." and " Converted..."
Insert line, Version: 6.2.2
Append an empty line as last line


dpkg -b gskcrypt32-8.0
dpkg -b gskssl32-8.0
dpkg -b TIVsm-API-6.2.2
dpkg -b TIVsm-BA-6.2.2

dpkg -i gskcrypt32-8.0.deb
dpkg -i gskssl32-8.0.deb
dpkg -i TIVsm-API-6.2.2.deb
dpkg -i TIVsm-BA-6.2.2.deb

cd /opt/tivoli/tsm/client/ba/bin && ln -s ../../lang/EN_US .

ln -s /opt/tivoli/tsm/client/api/bin/libgpfs.so /lib/
ln -s /opt/tivoli/tsm/client/api/bin/libdmapi.so /lib/
ln -s /usr/local/ibm/gsk8/lib/libgsk8cms.so /lib/
ln -s /usr/local/ibm/gsk8/lib/libgsk8ssl.so /lib/
ln -s /usr/local/ibm/gsk8/lib/libgsk8sys.so /lib/
ln -s /usr/local/ibm/gsk8/lib/libgsk8iccs.so /lib/

run this command
#ldconfig

vi /opt/tivoli/tsm/client/ba/bin/dsm.sys
vi /opt/tivoli/tsm/client/ba/bin/dsm.opt

mkdir /var/tsm
touch /var/tsm/dsmsched.log
touch /var/tsm/dsmerror.log

crontab -e
#check whether dsmc service is running
5,25,45 * * * *   /root/bin/dsmcsched-check >> /dev/null


vi /root/bin/dsmcsched-check

#!/bin/bash
#
#
#Author:Sam
#Modified By:
#Version -1.1
#Script to check if tivoli backup process:'dsmc sched' is running on the server and restarts the client if not running.
#This script Runs every 20 minutes
#
#
MAIL=email@domain.com

if
         ps -ef |grep -v 'grep dsmc sched'|grep 'dsmc sched'

then
        echo  >> /dev/null

else
    nohup dsmc sched >> /dev/null &
        echo "dsmc sched service started on $HOSTNAME after possible client startup failure, please login and restart the client at your nearest convenience..." |mailx -s " NOTICE:DSMC SERVICE STARTED-$HOSTNAME" $MAIL
fi

#chmod 755 /root/bin/dsmcsched-check

vi /etc/init.d/dsmc;chmod 755 /etc/init.d/dsmc;chown root:root /etc/init.d/dsmc
#!/bin/sh
# Purpose:Create entries for chkconfig - Allows start and stop as service
# chkconfig: 2345 98 11
# Description: IBM Tivoli Storage Manager Server Service - dsmc


start() {
RUNNING=`ps -ef | grep dsmc | grep -v grep | grep -v /bin/sh | wc -l`
###DEBUG PARAMETER#########
#echo "RUNNING=" $RUNNING
###########################
if [ $RUNNING -gt 0 ]
then
echo "DSMC Service Is Already Runnning..."
else
export LANG=en_US
echo -n "Starting DSMC Service..."
nohup dsmc sched </dev/null >/dev/null 2>&1 &
echo " "
dsmc q sched|grep 'Session established with server'
echo "Done!"
fi
}

stop() {
RUNNING=`ps -ef | grep dsmc | grep -v grep | grep -v /bin/sh | wc -l`
if [ $RUNNING -gt 0 ]
then
echo -n "Shutting Down DSMC Service..."
pidof dsmc | xargs kill 9
echo "Done!"
sleep 1
ps -ef | grep "dsmc" | grep -v grep | grep -v "/bin/sh" |  awk '{print $1 "\t" $2 "\t"$5 "\t"$8, $9}'
else
echo "DSMC Service Is Already Stopped..."
fi
}

status() {
RUNNING=`ps -ef | grep dsmc | grep -v grep | grep -v /bin/sh | wc -l`
if [ $RUNNING -eq 0 ]
then
echo "DSMC Service Is Not running..."
else
echo "DSMC Service Is Running..."
echo -e  "User\tPID\tTime\tProcess"
ps -ef | grep "dsmc" | grep -v grep | grep -v "/bin/sh" |  awk '{print $1 "\t" $2 "\t"$5 "\t"$8, $9}'
fi
}


OPT=$1
case $OPT in
"start")
start
;;
"stop")
stop
;;
"restart")
stop
sleep 1
start
;;
"status")
status
;;
*)
echo "Usage: $0 {start | stop | restart | status}"
exit 1
;;
esac

exit 0


/etc/init.d/dsmc restart
/etc/init.d/dsmc status
dsmc q sched
Comments