Tivoli Storage Manager How To

How to schedule a periodic TSM backup

Create a crontab by running

SHELL=/bin/bash
LANG=en_US.UTF-8
# m h  dom mon dow   command
0 3 * * 7 /opt/tivoli/tsm/client/ba/bin/dsmc inc>>  /backup/scripts/tsmback.log 2>&1 

Or create a backup script, something like this

#!/bin/bash
DATE=`date +%Y-%m-%d.%H-%M-%S`
sudo dsmc inc >> ~/dsmstdout.log
echo remote $DATE $? >>~/backup-status.log

And then schedule it in the crontab
0 0 * * 0 /home/user/bin/backup-remote

Do not try to cut the full paths, cron needs them spelled out.

How to create and move database and logs in TSM

First find out the current size of the DB and the logs

q db
q log

Then simply create new ones:

def dbvol /new location/new db file name.vol formatsize=size in MB
def logvol /new location/new log file name.vol formatsize=size in MB

Wait a bit to make sure they are created
q proc

Then delete the old

del dbvol /old location/old db file name.vol
del logvol /old location/old log file name.vol

Verify by querying the db and the log

How to create and move local volumes in TSM

dsmadmc -se=local
q vol
q proc
def vol backuppool /backup/tsmbackups8.vol formatsize=50000
move data /backup/tsmbackups1.vol

then you can delete/remove the old vol file
del vol /backup/tsmbackups1.vol

How to install TSM 5.5 server on Ubuntu 64bit

First convert rpm's to deb's with alien. Make sure to convert the scripts and expect non critical errors to show up. Install prerequisites:

sudo dpkg -i libstdc++5_3.3.6-18_amd64.deb

  • Install other prerequisites
sudo apt-get install language-pack-en gawk ksh
sudo locale-gen en_US

  • Now install the server, temporarily setting your shell to bash (not necessary for TSM 5.5.6 on Ubuntu 12.10):
sudo ln -sf bash /bin/sh
sudo dpkg -i tivsm-server_5.5.0-0_amd64.deb 
sudo dpkg -i tivsm-license_5.5.0-0_amd64.deb
sudo ln -sf dash /bin/sh

  • Edit or restore from backups dsmserv.dsk, dsmserv.opt as appropriate /opt/tivoli/tsm/server/bin
  • Run dsmserv for the first time:
cd /opt/tivoli/tsm/server/bin
sudo ./dsmserv

  • Register the licenses, accept current date then halt (in TSM server prompt):
reg lic file(*.lic)
accept date
halt

  • Enable automatic startup:
cp /dsmsource/etc/init.d/dsmserv /etc/init.d/dsmserv
sudo update-rc.d dsmserv defaults 99
sudo service dsmserv start

How to install TSM client on Ubuntu 64bit

For the new 6.3 64bit client do the following:

  • Get the pre-reqs

  • Create a /usr/lib64 folder. It will be deleted later.
  • Convert packages
sudo alien -k --scripts gskcrypt64-8.0.14.11.linux.x86_64.rpm
sudo alien -k --scripts gskssl64-8.0.14.11.linux.x86_64.rpm
sudo alien -k --scripts TIVsm-API64.x86_64.rpm
sudo alien -k --scripts TIVsm-BA.x86_64.rpm

  • Install packages
sudo dpkg -i gskssl64_8.0-14.11_amd64.deb
sudo dpkg -i tivsm-api64_6.3.0-0_amd64.deb
sudo dpkg -i tivsm-ba_6.3.0-0_amd64.deb 

  • Move all lib 64 links to shared libraries into /usr/lib folder
cd /usr/lib64
sudo mv libgpfs.so libdmapi.so libha_gs_r.so libct_cu.so libxmlutil-5.5.2.0.so libtsm552xercs-cl_6_0.so libApiDS.so /usr/lib
rmdir /usr/lib64

  • Restore from backup or configure the client by manually by editing /opt/tivoli/tsm/client/ba/bin/dsm.sys and /opt/tivoli/tsm/client/ba/bin/dsm.opt
  • If restoring from backup you may want to restore /opt/tivoli/tsm/client/ba/bin/TSM.PWD, as it contains your stored TSM client password, if dsm.opt has "passwordaccess generate" not "prompt" and "encryptkey save". For more information check here
  • Also if you don't need dsmtca, delete or change permissions on it to stop it from running. It has suid capabilities (rwsr-xr-x)
  • Test
dsmadmc -se=local

How to install TSM client on Ubuntu 32bit

For the old 5.5 32bit client do this:

  • Prepare and install the packages
sudo alien -k --scripts TIVsm-BA.i386.rpm
sudo alien -k --scripts TIVsm-API.i386.rpm
sudo dpkg -i --force-architecture *.deb

  • Move shared libraries
cd /usr/lib
sudo mv libgpfs.so libdmapi.so libha_gs_r.so libct_cu.so libxmlutil-5.5.2.0.so libtsm552xercs-cl_6_0.so libApiDS.so /usr/lib32

  • Install a 32bit libstdc5. For a 64 bit system do the following:
wget ''http://security.ubuntu.com/ubuntu/pool/universe/i/ia32-libs/ia32-libs_2.7ubuntu6.1_amd64.deb''
dpkg-deb -x ia32-libs_2.7ubuntu6.1_amd64.deb ia32-libs
sudo cp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib32/
cd /usr/lib32
sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5
sudo chmod go+r libstdc++.so.5.0.7

  • Configure the client by setting dsm.sys/opt
cd /opt/tivoli/tsm/client/ba/bin
sudo vi dsm.sys
sudo vi dsm.opt

How to restore TSM server after loosing log and db volumes

cd /opt/tivoli/tsm/server/bin
PATH=$PATH:/opt/tivoli/tsm/server/bin:/opt/tivoli/tsm/client/ba/bin; export PATH
sudo dd if=/dev/zero of=tsmlog.vol bs=4096 count=3000
or
sudo ./dsmfmt -m -log /backup/tsmlog.vol 256
sudo dd if=/dev/zero of=tsmdb.vol bs=4096 count=3000
or
sudo ./dsmfmt -m -db /backup/tsmdb.vol 1000
sudo ./dsmserv format 1 tsmlog.vol 1 tsmdb.voldel logvol
then
add user admin password
grant authority admin classes=system



@HowTo @IBM