Tuesday, 24 September 2013

complete process for initial backup


@@@@@@@@@@@@@@@@@ DEFINING DEVICE CLASSES

def devc filedev devt=file direc=h:\tsm_practice\filedev\
q devc
@@@@@@@@@@@@@@@@@ DEFINING STORAGE POOLS
q stg
define stg diskpool_by_me diskdev
define stg tapepool_by_me filedev poolt=primary maxscr=100
define stg copypool_by_me filedev poolt=copy maxscr=100
q stg
@@@@@@@@@@@@@@@@@ DEFINING VOLUMES FOR STORAGE POOLS
q vol
define vol diskpool_by_me h:\tsm_practice\volume\diskvol1.dsm f=200
define vol tapepool_by_me h:\tsm_practice\volume\tapevol1.dsm f=200
define vol tapepool_by_me h:\tsm_practice\volume\tapevol2.dsm f=200
define vol copypool_by_me h:\tsm_practice\volume\copyvol1.dsm f=200
define vol copypool_by_me h:\tsm_practice\volume\copyvol2.dsm f=200
q vol
q content h:\tsm_practice\volume\tapevol1.dsm
q con  h:\tsm_practice\volume\tapevol1.dsm  >> h:\tsm_practice\log_files\tapevolconts.acc

@@@@@@@@@@@@@@@@@  POLICY MANAGEMENT(DEFINING POLICIES)
q domain
def domain domain_4_qtp_practice
q policy
def policyset domain_4_qtp_practice qtp_pract_policy_set
q mgmt
def mgmtc domain_4_qtp_practice qtp_pract_policy_set qtp_pract_mgmtc
q copy

def copy domain_4_qtp_practice qtp_pract_policy_set qtp_pract_mgmtc standard verexists=3 verdeleted=2 retextra=2 retonly=3 destination=diskpool

assign defmgmtc domain_4_qtp_practice qtp_pract_policy_set qtp_pract_mgmtc

validate policy domain_4_qtp_practice qtp_pract_policy_set

ACTIVATE policy domain_4_qtp_practice qtp_pract_policy_set

@@@@@@@@@@@@@@@@@ connecting nodes to policy domain
update Node baclient1 baclient1 domain=domain_4_qtp_practice
update Node baclient2 baclient2 domain=domain_4_qtp_practice

@@@@@@@@@@@@@@@@@ assigning next storage pool
upd stg diskpool_by_me nextstg=tapepool_by_me
q vol
q vol stg=tapepool_by_me

@@@@@@@@@@@@@@@@@ backup & restore of baclient1 data(qtp_practice)
C:\Program Files\Tivoli\TSM\baclient>dsmc -node=baclient1
tsm> backup "H:\qtp_practice\\"
tsm> sel "H:\qtp_practice\\" -subdir=yes
tsm> backup "H:\qtp_practice\\" -ina
tsm> restore "H:\qtp_practice\\" "h:\restore\@24_7\" -ina -pick
tsm> restore "H:\qtp_practice\\" "h:\restore\@24_7\" -ina -pitdate=7/24/2013 -pittime=01:00

@@@@@@@@@@@@@@@@@ daily activities of administrator
@@@@@migration
migr stg diskpool low=0 dur=60

@@@@@backup stgpool
backup stg tapepool_by_me copypool_by_me maxprocess=2 wait=yes

@@@@@backup db

backup db devc=filedev type=full

backup db devc=filedev type=inc

@@@@@expiration
expire inventory dur=120

@@@@@reclaim stgpool
reclaim stg tapepool_by_me thres=60 duration=120

@@@@@@@@@@@@@@@@@ Admin_Schedules
q sched * t=a
def sched migr_by_me t=a cmd=" migr stg diskpool low=0 dur=20" starttime=10:00 active=yes
def sched backup_stg_by_me t=a cmd=" backup stg tapepool_by_me copypool_by_me maxprocess=2" starttime=10:10 active=yes
def sched backup_db_by_me t=a cmd=" backup db devc=filedev type=inc" starttime=10:20 active=yes
def sched expir_by_me t=a cmd=" expire inventory dur=20" starttime=10:40 active=yes
def sched reclaim_by_me t=a cmd=" reclaim stg tapepool_by_me thres=60 dur=20" starttime=10:50 active=yes
q ev * t=a
q ev *_by_me t=a
select * from tables
select * from admin_schedules

@@@@@@@@@@@@@@@@@ client_Schedules
q sched * *
select * from tables
select * from client_schedules
def sched domain_4_qtp_practice backup_qtp_pract_foldr desc="backup of qtp_practice folder which exists in h:\" objects="h:\qtp_practice\\" startdate=07/26/2013 starttime=17:45 duration=20 durunits=minutes period=1 perunits=days
def assoc domain_4_qtp_practice BACKUP_QTP_PRACT_FOLDR baclient1

@@@@@@@@@@@@@@@@@ increasing db & log volumes
def dbvol H:\tsm_practice\volume\dbvol\db2.dsm f=30
extend db 10
reduce db 10
q db
def logvol H:\tsm_practice\volume\logvol\log2.dsm f=20
extend log 10
reduce log 10
q log
@@@@@@@@@@@@@@@@@ help contents
q help
 

commands used in real time

  commands required to work in real time

CHECKIN COMMANDS

----------------------------

Ø  CHECKIN libvol <LIBNAME> search=yes status=scratch/Private (Tapes in slots)

 

Ø  CHECKIN libvol <LIBNAME> search=bulk status=scratch/Private (Tapes in I/O slots)

 

Ø  checkin libvol <LIBNAME> search=yes/bulk status=scratch/Private checkl=barcode (Does not mount the tape)

 

Ø  Label libvol <LIBNAME> checkin=scratch search=yes/bulk labelsource=barcode (new tapes)

 

Ø  Label libvol <LIBNAME> checkin=scratch search=yes/bulk labelsource=barcode overwrite=yes (old tapes)

 

Ø  Label libvol lb1.1.0.4 checkin=scratch search=bulk  labelsource=barcode

 

Ø  Label libvol TS3573 checkin=scratch search=yes labelsource=barcode

 

Ø  Label libvol IBM3582 checkin=scratch search=yes labelsource=barcode

 

Ø  checkout libvol IBM3582 phc702 remove=yes checklabel=no

 

Ø  checkin libv IBM3582 search=yes status=scratch checkl=barcode (for whole libr )

 

Ø  checkin libv IBM3582 search=bulk status=Scratch checkl=barcode ( If tapes in I/O stations )

 

Ø  checkin libv overland search=yes status=scr

 

Ø  checkin libv 3584atl status=scratch search=bulk devt=lto checklabel=barcode

 

Ø  Label libvol IBM3582 checkin=scratch search=yes labelsource=barcode (new tapes)

 

Ø  Label libvol IBM3582_2 checkin=scratch search=yes labelsource=barcode overwrite=yes (old tapes)

 

Ø  Label libvol IBM3582 checkin=scratch search=yes labelsource=barcode overwrite=yes (old tapes)

 

CHECKOUT

------------------

Ø  checkout libv <LIB NAME> <VOLUME NAME> remove=yes/no (mounts the tape)

 

Ø  checkout libv <LIB NAME> <VOLUME NAME> remove=yes/no checklabel=yes

 

Ø  checkout libv 3584atl UJ0211 remove=yes checklabel=no

 

DRM

-------

Ø  move drm UJ0211 tostate=vault

 

Ø  move drm * wherestate=vaultretreive tostate=onsiteretreive

 

Ø  select count(*) from drmedia where state='VAULTRETRIEVE'

 

Ø  select count(*) from drmedia where state='MOUNTABLE'

 

Ø  select volume_name,state,stgpool_name  from drmedia

 

Ø  select volume_name from drmedia where state= 'VAULT' and volume_name in (select volume_name from volumes)

 

Ø  select volume_name as Tapes from drmedia where state='COURIERRETRIEVE' (RETRIEVE)

 

Ø  select volume_name as Tapes from drmedia where state='VAULTRETRIEVE'   ( RETURN )

 

Ø  select volume_name as Tapes from drmedia where state='MOUNTABLE'      ( TAPE)

 

 

AUDIT  LIBRARY

------------------------

 
Ø  AUDIT LIBR  ibm3582 checklabel=barcode

 

 
 

VOLUMES

-------------

 

Ø  select  stgpool_name, sum(physical_mb) from occupancy group by stgpool_name

 

Ø  Select count(*) from libvolumes where status='Scratch' 

 

Ø  select volume_name from libvolumes where status='Scratch'

 

Ø  select volume_name from libvolumes where status='Private'

 

Ø  select stgpool_name,volume_name,pct_utilized from volumes where stgpool_name='STANDARD_TAPEPOOL' and pct_utilized < 10

 

Ø  select volume_name,pct_utilized,stgpool_name,status from volumes where access='READONLY' and volume_name in (select volume_name from libvolumes )

 

Ø  select volume_name,stgpool_name from volumes where volume_name in (select volume_name from libvolumes )

 

Ø  select volume_name,access, status,  pct_utilized from volumes where pct_utilized>50 and volume_name in (select volume_name from libvolumes )

 

Ø  select volume_name, pct_utilized from volumes where pct_utilized>90 and stgpool_name='NW_DISKPOOL' and volume_name in (select volume_name from libvolumes )

 

Ø  select volume_name,access,status from volumes where stgpool_name='OS2_TAPEPOOL' and upper(status)='FULL' and volume_name in (select volume_name from libvolumes)

 

Ø  select volume_name, pct_utilized, pct_reclaim from volumes where PCT_RECLAIM >90 and STGPOOL_NAME=’ < stgpool name>

 

Ø  select volume_name as Tapes from volumes where stgpool_name='ARCHIVE_TAPEPOOL' and location is null and status='FULL' 

 

Ø  move media * stgpool=archive_tapepool wherestate=mountableinlib wherestatus=full append=no ovflocation=onsite_archives checklabel=no

 

Ø  select platform_name,count(*) from nodes group by platform_name

 

Ø  select stgpool_name,devclass_name,count(*) as "VOLUMES" from volumes group by stgpool_name,devclass_name

 

Ø  select volume_name,stgpool_name,pct_utilized,status from volumes order by stgpool_name asc

 

Ø  select volume_name,stgpool_name,pct_utilized,state from media

 

Ø  select volume_name,stgpool_name,pct_utilized,status from volumes where volume_name in (select volume_name from libvolumes ) order by stgpool_name asc

 

Ø  select volume_name,stgpool_name,pct_utilized,access from volumes where volume_name in (select volume_name from libvolumes ) order by stgpool_name asc

 

Ø  select volume_name,stgpool_name,pct_utilized,status  from volumes where volume_name in (select volume_name from libvolumes where library_name='IBM3582_2') order by stgpool_name asc

 

Ø  select a.library_name,b.volume_name,b.stgpool_name,b.pct_utilized,b.status from libvolumes a,volumes b where a.volume_name=b.volume_name order by stgpool_name asc

 

Ø  select volume_name,stgpool_name,pct_utilized,status from volumes where volume_name in (select volume_name from libvolumes ) and stgpool_name='OFFSITE_COPYPOOL'

 

Ø  select volume_name,access,pct_utilized,STATUS from volumes where stgpool_name='STANDARD_TAPEPOOL' and volume_name in (select volume_name from libvolumes)

 

Ø  select volume_name,state,stgpool_name from drmedia where upd_date>'2006-08-20'

 

Ø  select volume_name,stgpool_name,pct_utilized,access from volumes where pct_utilized<20 order by stgpool_name asc

 

Ø  select volume_name,stgpool_name,pct_utilized,STATUS from volumes where stgpool_name='STANDARD_TAPEPOOL'

 

Ø  select volume_name,stgpool_name,pct_utilized,status  from volumes where stgpool_name='OFFSITE_COPYPOOL' and volume_name not in (select volume_name from libvolumes )

 

 
LIBRARY

--------------

Ø  select library_name as "Library", count(*) as "Number of Scratch" from libvolumes where status='Scratch' group by library_name

 

Ø  select count(*) as IBM3582_Scratch from libvolumes where status='Scratch' and library_name='IBM3582'

 

Ø  select count(*) as IBM3582_2_Scratch from libvolumes where status='Scratch' and library_name='IBM3582_2'

 

 
TAPES

--------
 

Ø  set sqldisplay wide

 

Ø  select count(*) as "Total tapes in Libray" from libvolumes

 

Ø  select volume_name as " ",status as "All Tapes in Library" from libvolumes order by status by asc

 

Ø  select volume_name,pct_utilized,status,access from volumes where stgpool_name='ARCHIVE_TAPEPOOL' and status='Empty'

 

Ø  select volume_name as "Full Archive Tapes in Library" from volumes where stgpool_name='ARCHIVE_TAPEPOOL' and location is null and status='FULL'

 

Ø  select count(*) as "Total Archive Tapes in Library" from volumes where stgpool_name='ARCHIVE_TAPEPOOL' and location is null and status='FULL'

 

Ø  select volume_name,stgpool_name,access,write_errors,read_errors,pct_utilized from volumes where write_errors <> 0 or read_errors <> 0 order by stgpool_name

 

Ø  select volume_name,status,cleanings_left from libvolumes where status='Cleaner'

 


Ø  select volume_name,STGPOOL_NAME, PCT_UTILIZED,STATUS from volumes where stgpool_name='STANDARD_TAPEPOOL' and status='FULL'

 

  

 

 

ARCHIVE MEDIA :

________________

 
Ø  move media * stg=archive_tapepool wherest=mountableinlib wherestatus=full remove=no

 

Ø  move media 067AHWL2 stg=ARCHIVE_TAPEPOOL wherestate=mountablenotinlib wherestatus='Empty'

 

Ø  q media stg=Archive_tapepool wherestate=mountablenotinlib wherestatus='Empty'

 
 

Schedules

--------------

Ø  select schedule_name,starttime,active from admin_schedules order by starttime asc

 

Ø  select starttime,schedule_name from client_schedules order by schedule_name asc

 

Ø  UPDATE SCHEDULE BKUP-NOTESMAIL-TAPEPOOL TYPE=ADMIN ACTIVE=YES

Ø  UPDATE SCHEDULE BKUP-STANDARD-DISKPOOL TYPE=ADMIN ACTIVE=YES

Ø  UPDATE SCHEDULE BKUP-STANDARD-TAPEPOOL TYPE=ADMIN ACTIVE=YES

Ø  UPDATE SCHEDULE REC-OFFSITE-NOTESMAIL-START TYPE=ADMIN ACTIVE=YES

Ø  UPDATE SCHEDULE REC-OFFSITE-TAPEPOOL-START TYPE=ADMIN ACTIVE=YES

Ø  DELETE SCHEDULE NOTESMAIL_DOMAIN RERUN_NOTEMAIL_BACKUP

Ø  DELETE SCHEDULE NT_DOMAIN W2K_RERUN

 

 

IMMEDIATE SCHEDULE:

____________________

 
Ø  DEFINE CLIENTACTION SHSPAPP001 DOMAIN=NT_DOMAIN ACTION=INCREMENTAL

Ø  DEFINE SCHEDULE NT_DOMAIN @325 ACTION=INCREMENTAL PRIORITY=1 PERUNITS=ONETIME DURATION=5 DURUNITS=DAYS

Ø  DEFINE ASSOCIATION NT_DOMAIN @325 SHSPAPP001

 

DB

-----

Ø  select pct_utilized as "DB % Utilized",cache_hit_pct as "Cache Hit %",last_backup_date as "Last DB Backup" from db   

 

Ø  delete volhist todate=-30 type=dbbackup

 

Ø  select  count(*) from drmedia where voltype='DBBackup'

 

Ø  select  count(*) from drmedia where voltype='CopyStgPool'

 

  

RESTORE

-----------

Ø  RESTORE -SU=YES -INACTIVE -PICK -PRESERVEPATH=NONE -FROMNODE=FLUF1P1E_FS (or FLUF2P1E) "/FLRLNMXX/MAIL5/ABC12345.NSF"  /FLRLNADM01/RESTORE/

 

Ø  restore -su=yes -inactive -pick -preservepath=none -fromnode=fluf2p1e_fs04 "/flrlnm04/mail8/ter12881.nsf" /flrlnadm01/restore/

 

Ø  restore -su=yes -inactive -pick -preservepath=none -fromnode=fluf2p1e_fs "/flrlnm06/mail8/rep95427.nsf" /flrlnadm01/restore/

 

Ø  restore -pitd=8/17/2013 -pitt=13:00:00 c:\mydir\

 

Ø  RESTORE -SU=YES -INACTIVE -PICK  "source"  "destination"  -pitd=8/17/2013 -pitt=13:00:00

 
 
 

BACKUPS

-----------

 

Ø  select node_name, filespace_name, backup_date from backups

 

Ø  select node_name,summary.activity,sum(cast(summary.bytes/1024/1024/1024 as decimal(6,2))) as GB from nodes, summary where (end_time between current_timestamp - 24 hours and current_timestamp) and activity='BACKUP' and ((nodes.node_name=summary.entity)) group by node_name,summary.activity order by activity,node_name asc

 

Ø  select * from summary where activity='BACKUP'

 

Ø  Select node_name, filespace_name, summary. activity, sum(cast(summary.bytes/1024/1024/1024 as decimal(6,2))) as GB from backups, summary where summary.activity='BACKUP' AND BACKUP_DATE='2009-10-07'

 

Ø  select node_name,filespace_name,summary.bytes from backups, summary where summary.activity='BACKUP' AND BACKUP_DATE='2009-10-07' and node_name='CJSPDFP001'

 

Ø  select node_name,filespace_name,summary.bytes from backups, summary where backups.BACKUP_DATE='2007-03-07' and backups.node_name=summary.entity

 

Ø  select entity, sum(cast(summary.bytes/1024/1024/1024 as decimal(6,2))) as GB from summary

 

SESSIONS:

___________

 

Ø  select session_id,client_name,wait_seconds,(bytes_received/1024/1024) as DATA_MB  from sessions order by client_name

 

Ø  select session_id,client_name,state,wait_seconds,cast(bytes_received/1024/1024 as decimal(9,2)) as DATA_MB  from sessions order by client_name

 

 

 

FILESPACES

__________

 

Ø  select filespace_name,backup_start,backup_end from filespaces where node_name like GV%FIL%'

 

Ø  select filespace_name,backup_start,backup_end from filespaces where node_name='GvPPFIL001'

 

Select statement for obtaining the total amount of data backed up for all the nodes for 1 month:

 

Ø  "select ENTITY,ACTIVITY,(BYTES/1024/1024) as BACKUP_MB,time(START_TIME) as START_TIME,date(START_TIME) as START_DATE,time(END_TIME) as END_TIME,date(END_TIME) as END_DATE from summary where ACTIVITY='BACKUP' AND date(START_TIME) >= CURRENT_DATE - 30 days"

Ø

 

 

For Archive

 

Ø  "select ENTITY,ACTIVITY,(BYTES/1024/1024) as BACKUP_MB,time(START_TIME) as START_TIME,date(START_TIME) as START_DATE,time(END_TIME) as END_TIME,date(END_TIME) as END_DATE from summary where ACTIVITY='ARCHIVE' AND date(START_TIME) >= CURRENT_DATE - 30 days"

 

Ø  select distinc(volume_name) from volumeusage where node_name='XXXXX'

 

Ø  ba stg Standard_tapepool offsite_copypool

 

Ø  ba stg notesmail_tapepool notesmail_offsite_copypool

 

Ø  ba stg notesmail_diskpool notesmail_offsite_copypool

 

Ø  backup db devclass=ltoclass1 t=f s=y

 

LIBRARY AND DRIVES

___________________

 

Ø  define path SMSPAPP002 mt3.0.0.3 srctype=server desttype=drive device=mt3.0.0.3  library=LB1.1.0.4'

 

Ø  define drive LB1.1.0.4 mt4.0.0.3 element=89'

 

EXPORT AND IMPORT

__________________

 
Ø  export node DECOMM_EN-BDC2-20-06-05-23 files="\\en-bdc2\d$" filedata=all toserver='PESPBAK001' previewimport=yes

Ø  export node DECOMM_EN-BDC2-20-06-05-23 filesdata=backup previewimport=yes devclass=ltoclass1 scratch=yes

 
MONTHLY REPORT:

-----------------------------

 Ø  select server_name from status

 
Ø  select activity as "Backup/Archive",count (*) as "Monthly Count" from summary where activity='BACKUP' AND start_time !< '$1' and end_time !>'$2'or activity='ARCHIVE' AND start_time !< '$1' and end_time !> '$2' group by activity

Ø  select count (*) as "Total" from summary where activity='BACKUP'AND start_time !< '$1' and end_time !>'$2'or activity='ARCHIVE' AND start_time !< '$1' and end_time !> '$2'

 
Ø  Select cast ((sum (affected)) as varchar(25)) as "Total No. Objects Backed Up", case when sum(bytes) > 1073741824 then cast(sum(bytes)/1073741824 as varchar(10))||' Gb' when sum(bytes) > 1048576 then cast(sum(bytes)/1048576 as varchar(10))||' Mb' when sum(bytes) > 1024 then cast(sum(bytes)/1024 as varchar(10))||' Kb' else cast(sum(bytes) as varchar(10)) end as "Total Size" from summary where activity='BACKUP'AND start_time !< '$1' and end_time !>'$2'or activity='ARCHIVE' AND start_time !< '$1' and end_time !> '$2'

 
Ø  select SESSION_ID,CLIENT_NAME,STATE,current_timestamp-START_TIME as "Elapsed Time",BYTES_RECEIVED/1024/1024/1024,CLIENT_PLATFORM,OUTPUT_VOL_ACCES            S from sessions where OUTPUT_VOL_ACCESs is not null

 
 Ø  SELECT NODE_NAME,CLIENT_VERSION,CLIENT_RELEASE,CLIENT_LEVEL,CLIENT_OS_LEVEL from NODES where NODE_NAME in (select Node_name from ASSOCIATIONS)

 Ø  select volume_name,STGPOOL_NAME,(current_timestamp-LAST_READ_DATE) as "last accessed" from volumes where volume_name in (select volume_name from libvolumes) and stgpool_name='STANDARD_TAPEPOOL' and (current_timestamp-LAST_READ_DATE)> 90 days order by 3

 
Ø  q ev * *mon* begind=-30 endd=today

basics of tsm 5.5

tsm basics(v5.5)

  

Tivoli Storage Manager Server – In a traditional LAN configuration, the role of a Tivoli Storage Manager server is to store the backup or archive data from the backup-archive clients that it supports to storage media. It also has a database of information to keep track of the data it manages, including policy management objects, users and administrators, and client nodes.

Tivoli Storage Manager Server refers to an instance, not a physical instance. You can have multiple instances of the server on the same system.

Scheduler – Administrator-defined schedules allow for the automation of Tivoli Storage Manager Server and backup-archive client operations. A comprehensive and integrated set of schedules can provide the basis for efficient data management with little need for intervention during normal operations.

Scheduling Tivoli Storage Manager backup-archive client operations consists of schedules on the Tivoli Storage Manager server and a scheduler component that runs on the Tivoli Storage Manager Client machine.

Backup-Archive Client – The TSM backup-archive client is a service which sends data to, and retrieves data from, a TSM server. The TSM backup-archive client must be installed on every machine that needs to transfer data to server-managed storage called storage pools. The TSM server uses a unique node name to identify each TSM backup-archive client instance. A password can be used to authenticate communications between the TSM backup-archive client and server. Data can be recovered to the same client machine that initially transferred it or to another client with a compatible file system format if that client has provided permission.

Policy-Based Management – Business policy is used to centrally manage backup-archive client data. Policies are created by the administrator and stored in the database on the server.

Storage Rules, Based on the Business Requirements

Tape Library – A tape library is essentially a box that holds drives and cartridges, and provides automation for tape operation.

Important Components of TSM Server

  • TSM Database
  • Recovery Log
  • Administrative Scheduler
  • Storage Pools
  • Policy Management
  • Tape Library

Important Components of B/A Client

  • B/A Client
  • B/A Client Scheduler

 
Important Files TSM Server

  • dsmserv.dsk                     
  • volhist.out                         
  • devcnfg.out
  • dsmserv.opt
  • initserv.log

Important Files baclient

  • dsm.opt                              
  • dsmsched.log
  • dsmerror.log
  • dsm.exe
  • dsmc.exe

Important License Files:

  • tsmbasic.lic
  • tsmee.lic
  • dataret.lic

 Administrator Management Capabilities

  • System Privilege              All TSM Server Task
  • Storage Privilege             Database, Recovery Log, Storage pool Management
  • Operator Privilege          Server Availability, Resource Usage, Physical Media Mgmt
  • Policy Privilege                                Policy Domain, Policy Set, Mgmt Class, Copy Group, Schedule
  • Analyst Privilege             Review and Reset Server statistics
  • Node Privilege                 Client actions, Product Usage , Activity Monitoring

 Administrative Command Line:

Start the administrative command line at the operating system prompt. The paths may vary, but the default paths are as follows:

Windows:            Program Files >> Tivoli >> TSM >> Server

AIX:                        /usr/Tivoli/tsm/server/bin

Linux:                 /opt/Tivoli/tsm/server/bin    

To start the administrative command line, type:  dsmadmc

Backup/Archive Client Command Line:

Start the backup-archive client command line at the operating system prompt. The paths may vary, but the default paths are as follows:

Windows:            Program Files >> Tivoli >> TSM >> baclient

AIX:                        /usr/Tivoli/tsm/client/ba/bin

Linux:                 /opt/Tivoli/tsm/client/ba/bin

To start the backup-archive client command line, type:  dsmc

 


TSM Database
TSM Database contains the information about the files which are backed up or archived from each and every client. That means it contains the information about file name, file size, file path and location of the file within the storage pools. TSM Database also contains information that is needed for server operations such as Authentication for the TSM Administrators and Clients, Policy rules that applies to client file system, Admin schedules and Client Schedules.

 

Estimating Space Requirements for TSM Database

  • 1 KB of database space per copy

Or

  • 3% to 5% of total amount of data to be backed up

 v  Spread TSM Database for better performance  i.e. divide more volumes or files

i.e.          10 GB*53No’s=530 GB

20 GB*26No’s=530 GB

 
Commands for DB
ü  Define dbvol volume_name Formatsize=format_size
ü  Ex:          Define dbvol D:\TSMDB\db2.dsm  f=20
ü  Extend DB size_in_mb
ü  Ex:          Extend DB 20
ü  Reduce DB size_in_mb
ü  Ex:          Reduce DB 20
ü  Query DB f=d

 

Command for Defining Database Copy or Mirroring Database

ü  Define dbcopy primary_copy mirror_copy Formatsize=size_in_mb
Ex: def dbc D:\db1copy.dsm E:\db1coptmir.dsm f=12

 

Backup TSM Database

TSM Database Backup Types

  • Full Backup
  • Incremental Backup
  • Database Out-of-Band(Snapshot Backup) or DB Snapshot Backup

 

Full backup when the following occurs:

  • Database has never been backed up.
  • Maximum incremental backups reached. i.e. 32 Incremental Backups
  • Database has been extended or reduced.
  • Recovery log mode changed to Roll-Forward (default = normal).

 Command for Backup Database

ü  Backup DB devclass=devclassname Type=Incremental|Full|DBSnapshot Volumenames=volname(s) Scratch=Yes|No Wait=Yes|No
        Ex:Backup DB devclass=ltoclass Scratch=yes/no Type=Incr

 

ü  Whenever a TSM database backup will be happened all the transactions or entries present in the Recovery Log will be committed or updated to the TSM Database hence it will reduce the percentage utilized of Recovery Log.

ü  To decrease or reduce percentage utilized in TSM DB & Recovery Log backup should be perform.

ü  In Real Time Recovery Log Percentage Utilized will be 0%.

ü  If Recovery Log Percentage utilized will reach to its maximum i.e.100% user cannot logged into TSM Server.

ü  To Automate DB backups Triggers can be used

 

Triggers

Types of Triggers

  • Space Triggers                                   Used if Log Mode is Normal and Roll-Forward Mode
  • DBBackup Triggers                           Used if Log Mode in Roll-Forward Mode only

 

Space Triggers


Space Triggers defines settings for triggers that determine when and how Tivoli Storage Manager prepares additional space when predetermined thresholds have been exceeded in the database and recovery logs.

 

Command for Defining Space Trigger

ü  Define spacetrigger DB/LOG/STG fullpct=percent spaceexpansion=percent expansionprefix=path mirrorprefixes=“path1,path2“ max=size_in_mb
ü  Ex:Define spacetrigger db fullpct=80 spaceexpansion=20      expansionprefix=c:\tsmserver\ mirrorprefixes=“f:\mirvol1\,g:\mirvol2\“ max=10000

 

Command for Defining DBBackupTrigger

ü  Define  DBBackuptrigger devclass=device_class_name logfullpct=percent imcredevclass=device_class_name numincremental=number mininterval=minutes minlogfreepct=percent
ü  Ex: Define DBBackuptrigger devclass=ltoclass logfullpct=50   numincremental=6 mininterval=0 minlogfreepct=0

 


Restoring TSM Database

Types of Restoring TSM Database

  • Point-in-time(Normal) Recovery
  • Roll-forward to most recent state Recovery
  • Single database volume Recovery

 

Point-in-Time (Normal) Recovery

Pros:

o    Smaller size for recovery log.

o    No auditing of the database is required after the restore.

 

Cons:

o    Cannot restore to most recent state.

o    Single database volume cannot be restored.

o    Auditing of storage pools is required after a database restore

 

Roll-Forward Recovery

Pros:

o    Database can be restored to most recent state.

o    No auditing of the database or storage pools is required after the restore.

o    Single database volume can be restored.

Cons:

o    Larger recovery logs.

o    Mirrored recovery log consumes additional disk space

 

Command for restoring a database to its most current state:

ü       DSMSERV RESTORE DB PREVIEW=No|Yes

 

Command for restoring a single database volume to its most current state:

ü       DSMSERV RESTORE DB DBVolume=volname PREVIEW=No|Yes

 

 

 

Command for restoring a database to a specific point in time; history file available:

ü  DSMSERV RESTORE DB TODate=date TOTime=time Source=DBBackup|DBSnapshot  PREVIEW=No|Yes

 

Command for restoring a database to a specific point in time; history file unavailable:

ü  DSMSERV RESTORE DB devclass=devclassname volumename=volname COMMIT=No|Yes
 
        Ex: dsmserv restore db devclass=ltoclass volume=A100L2 commit=No
 

 

ü  While restoring database first take latest version of Full DB volume with Commit=No


ü  Commit the DB for the last or latest volume with the option Commit=Yes

 

 

 

 

 

Real Time

 

1.       What is the Command to Set Buffer Pool Size?

A).   Cmd: Setopt BUFPOOLSIZE 262144

Note: It should be mentioned in KB. Recommended maximum value is 1 GB

2.       What is the Size of DATABASE in your environment?

A).   110 GB          -              6.5 TB to 7.4 TB

 


Recovery Log

The recovery log contains information about database updates that have not yet been committed. Updates can include activities such as defining a management class, backing up a client file, and registering a client node. Changes to the database are recorded in the recovery log to maintain a consistent database image

 

 

Commands for Recovery Log
ü  Define logvol volume_name Formatsize=format_size
ü  Ex:          Define logvol D:\TSMLOG\log2.vol  f=20
ü  Extend LOG size_in_mb
ü  Ex:          Extend LOG 20
ü  Reduce LOG size_in_mb
ü  Ex:          Reduce LOG 20
ü  Query Log

 

Recovery Log

 

  • Default Size                                        8Mb
  • Max Size                                               13GB
  • Recommended Size                        10GB
  • Predominately write-oriented.

 

Estimating Space Requirements for Recovery Log

 

  • 1 KB of recovery log space x daily number of transactions.

Or

  • 5% to 10% of total database size for normal mode

And

  • 10% to 15% of total database size for roll-forward mode.

 

ü  Do not spread recovery log i.e. do not divide more volumes or files  max is 13

i.e.          1 GB*13No’s=13 GB

3 GB*4No’s=12 GB

Defining Recovery Log or Mirroring Recovery Log

 

ü  Define logcopy primary_copy mirror_copy Formatsize=size_in_mb
                Ex: def logcopy D:\log1copy.dsm E:\log1coptmir.dsm f=12

 

Types of Log Modes

 

  • Normal Mode

    • Log space in normal mode is managed as a circular array of blocks.
    • Out of log space causes in-flight transactions to abort.
    • Log space is freed when transactions commit or abort
    • For every Transaction tail will be moved along with Head

 

  • Roll-Forward Mode

    • For every Transaction  Head will be moved and tail is fixed

 

To Secure or Protect TSM Server

  • Use automatic backup triggers.
  • Use space triggers.
  • Use recovery log mirroring.
  • Store backup volumes off-site.
  • Store backup of DEVCNFG.OUT, VOLHIST.OUT, DSMSERV.OPT and DSMSERV.DSK off-site.
  • Complement with database mirroring for 24 x 7 environments (operate 24 hours a day, 7 days a week).
  • Define volume history and device class backup files.
  • Back up the database using administrator scheduling facility.
  • Schedule database backup immediately following storage pool backup.
  • Use Disaster Recovery Manager to automate the recovery of the TSM database.

 

For Storage pools:

  • Create a copy storage pool.
  • Do a backup of the primary storage pools to the copy storage pool.

 

 

Do the following daily:

  • Do a backup of the primary storage pools to copy storage pools.
  • Back up the database.
  • Save the volume history file, the device configuration file, and the output of the QUERY SYSTEM command.
  • Move storage pool volumes, database backup, volume history file, and the device configuration file off-site

 

Tivoli Storage Manager Maintenance Plans

Processes can be scripted to:

  • Back up the primary storage pools.
  • Back up the server database.
  • Update a basic disaster recovery plan.
  • Migrate stored data from primary storage pools to the next level storage pools.
  • Remove expired data from server storage.
  • Reclaim fragmented tapes by consolidating active data.

 
Daily Administration Cycle

 
Copy storage pool:

  • Sequential only.
  • Multiple primary pools can use one copy pool.
  • Back up each primary storage pool hierarchy to same copy pool (Best Practice).

 Back up to copy pool:

  • Is independent of client backups.
  • Retains file level granularity.
  • Is an incremental backup of files.

 

Initiate backup:

  • Manually with command or Administration Center.
  • Automatically with administrative command scheduling.
  • Once per primary pool.

 

Client Configuration Files:

  • Windows

          dsm.opt

  • AIX

          dsm.opt

          dsm,sys

 

Configure Client Access to the Server/ Options to set in the dsm.opt File

  •  NodeName
  •  TCPServeraddress
  •  COMMMethod
  •  TCPPORT

 

 

Client Options

  • Options defined on the server with server-enforced client options. The server overrides client values with FORCE=YES.
  • Options entered locally on the command line.
  • Options defined on the server for a schedule using the options parameters.
  • Options entered locally in the options file.
  • Options received from the server with client options not enforced by the server. The server does not override client values, when FORCE=NO is used.
  • Default option values.

 

Type of Backups

  • Progressive or Incremental Backup

    • Complete
    • Date Only
    • Without Journal

  • Selective Backup

    • (Always Backup)

  • Image Backup
  • Logical Volume Backup
  • Subfile Backup
  • NAS Filesystem Backup
  • Backup Sets

 

Policies enable data management based on business requirements identifying the following:

  •  Data to back up
  •  Data to archive
  •  Where to store the data
  •  Retention period
  •  Number of versions to  retain

 

Important Parameters in Copy Group

  • DESTination=poolname – Specifies the name of the primary storage pool where backup data is to be stored.
  • VERExists=verevalue – Specifies the maximum number of backup versions to retain for current files.
  • RETExtra=retevalue – Specifies how many days Tivoli Storage Manager retains a backup version after that version becomes inactive.
  • VERDeleted=verdvalue – Specifies the maximum number of backup versions to retain for files that are deleted from the client file system.
  • RETOnly=retovalue – Specifies the retention time, in days, for the last backup version of a file that has been deleted or has expired from the client's file system.

 

 

Default Server Policies

BACKRETention=30

ARCHRETention=365

 

TSM in the STANDARD Domain Default Policy Settings

      Backup                                                               Archive

Type = Backup                                                   Type = Archive

DESTination = Backuppool                            DESTination = Archivepool

FREQuency = 0                                                  FREQuency = Cmd          

MODE = MODified                                           MODE = ABSolute

SERialization = SHRSTatic                               SERialization = SHRSTatic

VERExists = 2                                                     

VERDeleted = 1                                                

RETExtra = 30

RETOnly = 60

 

Expire Inventory

 

  • Default Value                                    24Hrs (1 day)
  • Max Value                                          336Hrs (14 days)
  • To Remove Expire set value to   0


Storage pools are collections of like media that provide storage for backed up, archived, and migrated files.

 

 

Command for Defining Device Class
ü  Define devclass devclass_name devtype=type_of_device
ü  Ex: Define devclass Diskclass devtype=DISK
ü   Ex: Def devc autodlt_class devt=dlt format=drive library=autodltlib
ü  Ex: Define devclass ltotape devtype=lto library=ltolib format=ultrium mountlimit=12 mountretention=5   prefix=adsm estcapacity=100G