HowTo: Change TSM Node’s Password

A short note about how to change TSM node’s password and remove its expiration.

Change Node’s Password from TSM Client

Execute set password from TSM Client command line, to change a node’s password.

tsm-cli> set password

Reset Node’s Password from TSM Server

Use the following syntax on TSM Server command line to set a password for a node.

tsm-serv> update node NODENAME PASSWORD

Remove Password Expiration

Set the option passexp=0 on TSM Server to disable password expiration for a node.

tsm-serv> update node NODENAME passexp=0

HowTo: Install TSM Client on CentOS/RHEL

This guide describes the process of installation and basic configuration of TSM (Tivoli Storage Manager) Client on CentOS/RHEL.

Downloading the TSM Client

Download the archive with the latest TSM Client for your OS from IBM public FTP.

For example, lets download and unpack TSM Client 6.3.1.0 for Centos 6.3 64-Bit:

# mkdir -p /tmp/tsminstall
# cd /tmp/tsminstall
# wget ftp://public.dhe.ibm.com/storage/tivoli-storage-management/maintenance/client/v6r3/Linux/LinuxX86/BA/v631/6.3.1.0-TIV-TSMBAC-LinuxX86.tar
# tar xvf 6.3.1.0-TIV-TSMBAC-LinuxX86.tar

After unpacking you should see the following files:

README_enu.htm
README_api_enu.htm
TIVsm-API64.x86_64.rpm
TIVsm-BA.x86_64.rpm
TIVsm-BAhdw.x86_64.rpm
TIVsm-JBB.x86_64.rpm
TIVsm-APIcit.x86_64.rpm
TIVsm-BAcit.x86_64.rpm
TIVsm-filepath-6.3.1-0-rhel55.x86_64.rpm
TIVsm-filepath-6.3.1-0-rhel60.x86_64.rpm
TIVsm-filepath-6.3.1-0-sles10sp3.x86_64.rpm
TIVsm-filepath-6.3.1-0-sles11sp1.x86_64.rpm
gskcrypt64-8.0.14.14.linux.x86_64.rpm
gskssl64-8.0.14.14.linux.x86_64.rpm

The packages that are needed for installation are highlighted.

Installing TSM Client

1. Resolving Dependences

Install gskcrypt and gskssl. Normally, these libraries can be found in an archive with the TSM Client.

# rpm -ivh gskcrypt64-8.0.14.14.linux.x86_64.rpm
# rpm -ivh gskssl64-8.0.14.14.linux.x86_64.rpm

2. Installing TSM Client

Use yum localinstall to installing TSM client from rpm files. In this case the enabled repositories will be used to resolve dependencies.

# yum localinstall TIVsm-API64.x86_64.rpm
# yum localinstall TIVsm-BA.x86_64.rpm

You can remove the temporary folder, if the installation has completed successfully.

# rm -rf /tmp/tsminstall

TSM Client Configuration

Add the TSM client service to autostart:

# chkconfig --add dsmcad
# chkconfig dsmcad on

Create configuration files from the samples:

# cd /opt/tivoli/tsm/client/ba/bin/
# cp dsm.opt.smp dsm.opt
# cp dsm.sys.smp dsm.sys

Open configuration files and append your settings.

The content of /opt/tivoli/tsm/client/ba/bin/dsm.sys – Example:

SErvername TSM-SERVER-1
COMMMethod TCPip
TCPPort 1500
TCPServeraddress 192.168.0.5
PASSWORDAccess generate
NODename CLIENT-NODE-12345
SCHEDMODe PROMPTED
MANAGEDServices schedule
ERRORLOGName /opt/tivoli/tsm/client/ba/bin/dsmerror.log
ERRORLOGRetention 7 D
SCHEDLOGName /opt/tivoli/tsm/client/ba/bin/dsmsched.log
SCHEDLOGRetention 7 D
DEDUPLICATION yes

The content of /opt/tivoli/tsm/client/ba/bin/dsm.opt – Example:

SErvername TSM-SERVER-1

TSM Server Configuration

Register the new node on your TSM Server.

Perform the following steps in the TSM Server’s console, if you haven’t registered the new node yet.

1. Register the new node

tsm> register node [NODE-NAME] [NODE-PASSWORD] domain=[DOMAIN]

Example:

tsm> register node CLIENT-NODE-12345 PASSW0RD domain=STANDARD

2. Associate the new node with a schedule

tsm> define assoc [DOMAIN] [SCHEDULE] [NODE-NAME]

Example:

tsm> define assoc STANDARD INCR_20H CLIENT-NODE-12345

These step are enough. Now logout and go back to your server.

Completing the TSM Client Configuration

Establish the first connection to TSM server from the client:

# dsmc query session

Enter the ‘user id’ (the name of your node) and the ‘password’.

If the session was successfully established, the password will be stored, and you won’t need to type it anymore.

Start the TSM client service:

# service dsmcad start

In a few minutes check the last schedule logs. Verify that the next backup has been successfully scheduled.

# tail /opt/tivoli/tsm/client/ba/bin/dsmsched.log

In case of any problems check the last error logs:

# tail /opt/tivoli/tsm/client/ba/bin/dsmerror.log

Good Luck and Have Fun!

TSM Client Configuration File

The client options file is an editable file that identifies the server and communication method. It provides the configuration for backup, archiving, hierarchical storage management, and scheduling.

The configuration for the TSM client is defined in the following files depending on your OS:

Client OS Default configuration location Purpose
Windows C:\Program Files\Tivoli\TSM\baclient\dsm.opt Main TSM configuration file
Unix/Linux /opt/tivoli/tsm/client/ba/bin/dsm.sys Main TSM configuration file
Unix/Linux /opt/tivoli/tsm/client/ba/bin/dsm.opt Secondary TSM configuration file (used for dsmcad)

The Main TSM configuration file – Example

These are the minimum options required to get started using TSM:

$ cat /opt/tivoli/tsm/client/ba/bin/dsm.sys
   Servername                server_a
   COMMMethod                TCPip
   TCPPort                   1500
   TCPServeraddress          node.domain.company.com

The Secondary TSM configuration file – Example

We mainly need it if we use several TSM servers:

$ cat /opt/tivoli/tsm/client/ba/bin/dsm.opt
   Servername                server_a

Client Configuration File Options

Typical configuration options look like:

The SERVERNAME option specifies the name you want to use to identify a server.

SERVERNAME TSM-SERVER-1

The COMMMethod option specifies the communication method you use to provide connectivity for client-server communication.

COMMMethod         TCPip

The TCPPort option specifies a TCP/IP port address for a Tivoli Storage Manager server.

TCPPort            1500

The TCPServeraddress option specifies the TCP/IP address for a Tivoli Storage Manager server.

TCPServeraddress   192.168.0.5

The TCPCLIENTAddress option specifies a TCP/IP address if your client node has more than one address, and you want the server to contact an address other than the one that was used to make the first server contact.

TCPCLIENTAddress   192.168.0.200

The TCPCLIENTPort option specifies a different TCP/IP port number for the server to contact than the one that was used to make the first server contact.

TCPCLIENTPort      1501

The PASSWORDAccess option specifies whether you want to generate your password automatically or set as a user prompt.

PASSWORDAccess     generate

Use the NODename option in your client options file dsm.opt to identify your workstation to the server.

NODename           CLIENT-SERV-123456

The SCHEDMODe option specifies whether you want to use the polling mode (your client node periodically queries the server for scheduled work), or the prompted mode (the server contacts your client node when it is time to start a scheduled operation).

SCHEDMODe          PROMPTED

The INCLExcl option specifies the path and file name of an include-exclude options file.

INCLExcl           /opt/tivoli/tsm/client/ba/bin/inclexcl.def

The MANAGEDServices option specifies whether the Tivoli Storage Manager Client Acceptor service (CAD) manages the scheduler, the Web client, or both.

MANAGEDServices    schedule

The ERRORLOGName option specifies the fully qualified path and file name of the file in which to store information about errors that occur during processing.

ERRORLOGName       /opt/tivoli/tsm/client/ba/bin/dsmerror.log

The ERRORLOGRetention option specifies how many days to maintain error log entries before pruning, and whether to save the pruned entries.

ERRORLOGRetention  7 D

The SCHEDLOGName option specifies the path and file name where you want to store schedule log information.

SCHEDLOGName       /opt/tivoli/tsm/client/ba/bin/dsmsched.log

The SCHEDLOGRetention option specifies the number of days to keep entries in the schedule log, and whether to save the pruned entries.

SCHEDLOGRetention  7 D

The DEDUPLICATION option configures the client so that you can use data deduplication.

DEDUPLICATION YES

Displaying All Options

You can use the ‘query options’ command to display all or part of your options and their current settings relevant to the command-line client.

Display all options:

tsm> query options

Display only options beginning with sched:

tsm> query options sched*

My typical Configuration Files

Here are the typical configuration files that i use for deploying new TSM clients:

$ cat /opt/tivoli/tsm/client/ba/bin/dsm.sys
SErvername  TSM-SERVER-1
  COMMMethod         TCPip
  TCPPort            1500
  TCPServeraddress   192.168.0.5
  PASSWORDAccess     generate
  NODename           CLIENT-NODE-12345
  SCHEDMODe          PROMPTED
  MANAGEDServices    schedule
  ERRORLOGName       /opt/tivoli/tsm/client/ba/bin/dsmerror.log
  ERRORLOGRetention  7 D
  SCHEDLOGName       /opt/tivoli/tsm/client/ba/bin/dsmsched.log
  SCHEDLOGRetention  7 D
  DEDUPLICATION yes
$ cat /opt/tivoli/tsm/client/ba/bin/dsm.opt
SErvername  TSM-SERVER-1

Querying Nodes, Events, Schedules and Sessions from the TSM Server

  • QUERY NODE – display the information about one or more registered nodes;
  • QUERY EVENT – display the status of scheduled events;
  • QUERY SCHEDULE – display information about one or more schedules;
  • QUERY SESSION – display information about node sessions.

Querying Nodes

Display the information on all registered client nodes:

tsm> query node

Display the information on the node named JOHN2013:

tsm> query node JOHN2013

Display complete information on the node named JOHN2013:

tsm> query node JOHN2013 format=detailed

Read more

Querying Events

Display the information for 10 days, for all events, scheduled on the node named JOHN2013:

tsm> query event * * begindate=-10 enddate=today node=JOHN2013

Display the complete information for 10 days:

tsm> query event * * begindate=-10 enddate=today format=detailed node=JOHN2013

Display the information, for all events, scheduled on the node named JOHN2013, during specific days:

tsm> query event * * begindate=01/15/2013 enddate=01/20/2013 node=JOHN2013

Read more

Querying Schedules

Display the information on all registered schedules:

tsm> query schedule

Display the information about schedule INCR_20H in domain STANDARD:

tsm> query schedule STANDARD INCR_20H

Display the complete information about schedule INCR_20H:

tsm> query schedule * INCR_20H format=detailed

Display associated schedules, for the node named JOHN2013:

tsm> query schedule node=JOHN2013

Display nodes associated with a schedule INCR_20H:

tsm> query association * INCR_20H

Display nodes without associated schedule:

tsm> SELECT node_name FROM nodes WHERE node_name NOT IN \ 
(SELECT node_name FROM associations)

Read more

Querying Sessions

Display the information on all current sessions:

tsm> query session

Display the information on sessions from a node named JOHN2013:

tsm> SELECT client_name,session_id,start_time,CAST(bytes_sent/1024/1024 \
AS DEC(8,2)) AS "MB_Sent", CAST(bytes_received/1024/1024 AS DEC(8,2)) \ 
AS "MB_Rcvd" FROM sessions WHERE client_name='JOHN2013'

Read more

Restoring Data from the TSM Server — TSM Client Command Line

The following guide describes how to restore files and folders from TSM Server using TSM Client command line.

The basic syntax for restoring data from TSM is the following:

tsm> restore [source-file] [destination-file]

If the destination of restoration is omitted, then the TSM will restore the file to its original location.

By default, the TSM restores the most current active version of a file.

Restoration of a Single File

To specify a directory as a destination, you need to add slash “/” at the end of the destination path of restoration. Note that the TSM may overwrite a file of the same name in the destination directory.

tsm> restore /home/john/MyFile.txt  /home/john/restore/

The following example demonstrates that the restored file will be named MyFile-rest.txt.

tsm> restore /home/john/MyFile.txt   /home/john/restore/MyFile-rest.txt

Restoration of Multiply Files

Multiply files can be restored using “file by file” restoration like above, or using wildcards.

Available wildcards

  • ? – for a single character substitution;
  • * – for multiple characters substitution.

ATTENTION: You cannot use wildcards in the names of the folders.

Examples:

tsm> restore /home/john/MyFi?e.txt  /home/john/restore/ 
tsm> restore /home/john/*.txt   /home/john/restore/

Restoration of Multiple Files and Folders

To restore a full directory and the contents of all its sub-directories you need to use -subdir=yes option.

tsm> restore -subdir=yes /home/john/files/*  /home/john/restore/

Restoration of Entire Partitions

Essentially, the syntax is the same as in “Restoration of Multiple Files and Folders” above. However, the obvious caveats are to ensure that you have enough space in the destination partition.

tsm> restore -subdir=yes /home  /tmp/restore/

Point in Time Restoration

Here is the syntax for the restoration of a single file for specific date and time . Syntax is the same for the other cases.

There are three different types of date available for restores:

  • todate – will restore all ACTIVE and INACTIVE files backed up BEFORE the date specified;
  • fromdate – will restore all ACTIVE and INACTIVE files backed up AFTER the indicated date;
  • pitdate – will restore only the files that were ACTIVE on the day specified.

You can use -*date and -pittime options together or separately.

tsm> restore -pitdate=MM/dd/YYYY -pittime=hh:mm \
/home/john/MyFile.txt  /home/john/restore/
  • MM – a month
  • dd – a day
  • YYYY – a year
  • hh – an hour
  • mm – minutes

TIP: The format of pitdate command differs upon the clients. Use the same format as your client uses.

Restoration of Old or Deleted Files

As with the GUI, TSM does not, by default, list or restore old and deleted inactive versions of files and directories.

If you want to restore a such file, you need use the -inactive and -pick options.

The -pick option causes TSM to display a list of files from which you can pick.

Issuing a restore as below will display a pick window.

tsm> restore -subdir=yes  -inactive -pick /home/john/*  /tmp/restore/

In a pick interface you will be able to select files to restore via the numbers.

Remember to issue the destination path of restoration with the original restore command if you want to prevent overwriting current versions of files with older versions.