TSM as a home backup solution

I previously reported on how to install TSM on Ubuntu. Today I'm going to explain how to use TSM as a backup solution for everyday use. This might sound weird, as most people think professional backup solutions only offer VTL or tape backups; however, we'll create a FILE devclass as a virtual tape, which will allow us to use disk (eg an external USB disk) to store our backup data.

Here's the setup : a typical Windows/Linux client base, combined with one TSM server running on Linux. We're assuming that the backups will be put on an external USB disk, mounted at /mnt/DATA on the server, that TSM has been installed (and is up and running), and that the client package has been installed. In the install article about TSM, we placed our DB and log volumes in the TSM install directory. If you're really paranoid, you can place them on the external USB disk, but then you must take care that the disk is connected every time TSM starts up.

First, start up TSM by typing ./dsmserv from the TSM Server install directory (/opt/tivoli/tsm/server/bin); time to register an admin, and grant him system authorities :

reg admin myname mypasswd passe=9999
granth auth myname classes=system

Time to create the device class, we'll call it VTAPE, and we'll assign a capacity of 256 MB to it, which means our virtual tapes can hold 256 MB on them :

# mkdir -m 755 -p /mnt/DATA/Backups/TSM/Volumes
define devc VTAPE devtype=file maxcapacity=256M directory=/mnt/DATA/Backups/TSM/Volumes
define stgpool TAPEPOOL VTAPE pooltype=primary maxscratch=1000

The last command defines a tape pool containing maximum 1000 tapes, using our virtual tape device class.
Don't forget to change the default Policy Set's destination to the TAPEPOOL storage pool :

upd copygroup STANDARD destination=TAPEPOOL
validate policyset STANDARD STANDARD
activate policyset STANDARD STANDARD

We'll create a maintenance script with the TSM webadmin interface; an example of a maintenance script is something like :

backup db devc=vtape type=full wait=yes
expire inventory skipdirs=NO wait=yes
prepare
delete volhist todate=today type=stgreuse
delete volhist todate=today type=stgnew
delete volhist todate=today type=stgdelete

Time to configure the client(s). Let's back up our Ubuntu workstation by defining a client UBUNTU :

reg node UBUNTU passwd passexp=9999 USERID=NONE domain=STANDARD type=client

Create the following dsm.sys file in the /opt/tivoli/tsm/client/ba/bin directory which will backup the /home and /etc directories :

SErvername  mytsmsrv
   COMMmethod         TCPip
   TCPPort            1500
   TCPServeraddress   UBUNTU
  
   PASSWORDACCESS GENERATE
   SCHEDMODE POLLING
   NODENAME UBUNTU
   SCHEDLOGNAME /opt/tivoli/tsm/client/ba/bin/dsmsched.log
   errorlogretention 3
   resourceutilization 10
   SCHEDLOGRETENTION 3

   DOMAIN / /home 
   EXCLUDE /.../*
   INCLUDE /etc/.../*
   INCLUDE /home/.../*

Now time to test the client connection; run the dsmc binary, the first time it will ask you for a user id (just press enter, it's offering our client node name). The password is the 'passwd' password string we entered in the 'reg node' command :

# ./dsmc
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface - Version 5, Release 2, Level 3.0 
(c) Copyright by IBM Corporation and other(s) 1990, 2004. All Rights Reserved.

Node Name: UBUNTU
Session established with server SERVER1: Linux/i386
  Server Version 5, Release 2, Level 2.0
  Server date/time: 07/30/2007 19:10:37  Last access: 07/30/2007 18:42:27

Please enter your user id : 

Please enter password for user id "UBUNTU": 

Session established with server SERVER1: Linux/i386
  Server Version 5, Release 2, Level 2.0
  Server date/time: 07/30/2007 19:10:56  Last access: 07/30/2007 19:10:37

That's it ! You can start a backup session using :

# ./dsmc i

Happy backupping !

Joe Burnett Tue, 08/07/2007 - 21:09

I've been using TSM at home for many years now. It's the best backup/recovery software on the market! Thanks for promoting interest in TSM to the open source community!

Regards,
Joe Burnett

Alexandre Tchikalov Mon, 10/06/2008 - 21:44

thanks for the idea of using tsm server on ubunty, I knew that dsmc can run on debian systems but not the server.

few suggestions/ thoughts:
- use virtualmount points, so you can include these into domain statement and make your backup more efficient (see IBM docs)
- why prepare? to run it you need drm license, which is (IMHO) overkill for such simple setup.
- what is your recovery procedure then? IMHO it is more important than the installation steps :-) . If you configure prepare to store dr plan (prefix) on the same external media as dbbackup, you can easily restore your tsm but you do not mention so in your instructions. If not, it would be more difficult to restore tsm db without knowing devconfig, volhist, and optionally dsmserv.dsk and dsmserv.opt.
I would copy all these important files to the same external media (optionally also the client''s dsm.opt,sys): volhist and devcfg tsm internally and opt sys and dsk externally or with macros. If you have all these files you can restore your environment in no time and with minimum efforts from scratch.