User Tools

Site Tools


tsm:tsm_client_cmd

How to enter to TSM client:

root@lnxsrv~# dsmc

How to check where are the configuration files (usually is /usr/tivoli/tsm/client/ba/bin):

root@lnxsrv~# echo $DSM_DIR

How to check when last backup ran:

root@lnxsrv~# dsmc q fi

How to check schedule (use “-se” if you want to check it for a specific server):

root@lnxsrv~# dsmc q sched
root@lnxsrv~# dsmc q sched -se=tsmserver1

How to look for files under some directory:

root@lnxsrv~# dsmc q b -subdir=yes -inactive "/data/stuff/*"

How to look for files under some directory on the backup server for a host:

root@lnxsrv~# dsmc q b -inactive -subdir=yes -se=&ltclient> "/data/stuff/*"

How to restore from incremental backup all files in /data/stuff directory, including the deleted ones active or inactive:

root@lnxsrv~# dsmc restore -subdir=yes -latest "/data/stuff/*"

How to restore files to /tmp/oldfiles:

root@lnxsrv~# dsmc restore -pick -subdir=yes "/data/stuff/*" /tmp/oldfiles/

How to restore inactive files:

root@lnxsrv~# dsmc restore -inactive -pick -subdir=yes "/data/stuff/*" /tmp/oldfiles/

How to restore without overwriting existing files:

root@lnxsrv~# dsmc restore -verbose -subdir=yes –rep=no /data/stuff/

How to look for all *.arc files between specific days mm/dd/yyyy:

root@lnxsrv~# dsmc q b -inactive -dateformat=1 -subdir=yes "/oracle/archives/*.arc" -FROMdate=01/03/2010 -TODate=01/03/2010

How to run a backup now:

root@lnxsrv~# dsmc incr -ver

How to backup a single file:

root@lnxsrv~# dsmc backup "/etc/filesystems"

How to restore /exploit/ to a point in time:

root@lnxsrv~# dsmc restore -subdir=y -ina -pitdate="10/08/11" "/exploit/*" /tmp/exploit-restore/

How to restore some files between dates:

root@lnxsrv~# dsmc restore -subdir=y -ina "/exploit/*" /tmp/exploit-restore/ -FROMdate=05/03/2010 -TODate=06/03/2010

How to display a list of all your backups on /home/ (use the detail option to display the last modification date and the creation date of each file):

root@lnxsrv~# dsmc q backup -sub=yes -detail "/home/*"

How to display a list of all your backed up files with dateformat and timeformat options:

root@lnxsrv~# dsmc q b -date=1 -time=4 -su=y "/home/*"

How to include the timeformat option in a command (it must precede the fromtime, pittime, and totime options):

root@lnxsrv~# dsmc q b -date=1 -timeformat=4 -fromd=05/01/2006 -fromt=11:59AM /

How to display a list of active and inactive backup versions of files from which you can select versions to restore:

root@lnxsrv~# dsmc restore "/user/project/*"-pick -inactive

How to restore all files in the /home/ directory to their state as of 3:00 PM on March 10, 2010:

root@lnxsrv~# dsmc restore -pitd=3/10/2010 -pitt=15:00:00 /home/

How to restore from archive: 1. List the backups:

root@aixsrv # dsmc q arch /home/user/important.txt
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
  Client Version 5, Release 3, Level 5.4  
  Client date/time: 02/23/12   13:44:54
(c) Copyright by IBM Corporation and other(s) 1990, 2007. All Rights Reserved.

Node Name: aixsrv
Session established with server GZTSMSERV: AIX-RS/6000
  Server Version 5, Release 5, Level 5.2
  Server date/time: 02/23/12   13:44:54  Last access: 02/23/12   13:44:47

             Size  Archive Date - Time    File - Expires on - Description
             ----  -------------------    -------------------------------
    12,892,074  B  03/02/11   06:22:39    /home/user/important.txt 03/01/12   Archive Date: 03/02/11
    14,837,646  B  04/02/11   06:19:00    /home/user/important.txt 04/01/12   Archive Date: 04/02/11
    16,764,897  B  05/02/11   05:48:05    /home/user/important.txt 05/01/12   Archive Date: 05/02/11
    25,636,989  B  06/02/11   06:10:06    /home/user/important.txt 06/01/12   Archive Date: 06/02/11
    31,112,013  B  07/02/11   06:18:35    /home/user/important.txt 07/01/12   Archive Date: 07/02/11
    29,823,633  B  08/02/11   06:43:03    /home/user/important.txt 08/01/12   Archive Date: 08/02/11
    22,432,587  B  09/02/11   09:01:12    /home/user/important.txt 09/01/12   Archive Date: 09/02/11
    20,339,856  B  10/05/11   11:57:45    /home/user/important.txt 10/04/12   Archive Date: 10/05/11
    20,339,856  B  10/05/11   11:57:45    /home/user/important.txt 10/04/12   Archive Date: 10/05/11
    13,886,136  B  11/02/11   05:51:21    /home/user/important.txt 11/01/12   Archive Date: 11/02/11
     7,927,674  B  12/07/11   05:37:25    /home/user/important.txt 12/06/12   Archive Date: 12/07/11
     8,516,901  B  01/03/12   12:03:54    /home/user/important.txt 01/02/13   Archive Date: 01/03/12
     2,150,058  B  02/02/12   06:15:12    /home/user/important.txt 02/01/13   Archive Date: 02/02/12

2. Run the restore command If you do not specify the target path (/tmp/bm/ in our example), the file will be restored on its original location):

root@aixsrv # dsmc retrieve /home/user/important.txt /tmp/bm/ -FROMdate=09/02/11 -TODate=09/02/11
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
  Client Version 5, Release 3, Level 5.4  
  Client date/time: 02/23/12   14:58:31
(c) Copyright by IBM Corporation and other(s) 1990, 2007. All Rights Reserved.

Retrieve function invoked.

Node Name: aixsrv
Session established with server AIXTSM: AIX-RS/6000
  Server Version 5, Release 5, Level 5.2
  Server date/time: 02/23/12   14:58:31  Last access: 02/23/12   14:55:43


Total number of objects retrieved:        2
Total number of objects failed:           0
Total number of bytes transferred:    21.39 MB
Data transfer time:                    0.24 sec
Network data transfer rate:        88,638.33 KB/sec
Aggregate data transfer rate:        179.85 KB/sec
Elapsed processing time:           00:02:01

3. List the result:

root@aixsrv # ls -la /tmp/bm/user/important.txt
-rw-rw-rw-   1 root     cft        22432587 Sep 02 06:10 /tmp/bm/user/important.txt

How to show the TSM Server Connection Information:

root@aixsrv # dsmc q sess
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface - Version 5, Release 2, Level 2.9 
(c) Copyright by IBM Corporation and other(s) 1990, 2003. All Rights Reserved.

Node Name: aixsrv
Session established with server GZTSM-199: AIX
  Server Version 6, Release 3, Level 3.100
  Server date/time: 06.11.2013 10:22:29  Last access: 06.11.2013 10:22:25

TSM Server Connection Information

Server Name.............: AIXTSM
Server Type.............: AIX
Server Version..........: Ver. 6, Rel. 3, Lev. 3.100
Last Access Date........: 06.11.2013 10:22:29
Delete Backup Files.....: "Yes"
Delete Archive Files....: "Yes"

Node Name...............: aixsrv
User Name...............: root

How to display the TSM exclusion list:

root@aixsrv # dsmc query inclexcl
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
  Client Version 6, Release 2, Level 2.3  
  Client date/time: 11/06/13   14:45:35
(c) Copyright by IBM Corporation and other(s) 1990, 2010. All Rights Reserved.

Node Name: aixsrv
Session established with server AIXTSM: AIX
  Server Version 6, Release 3, Level 3.100
  Server date/time: 11/06/13   14:44:37  Last access: 11/06/13   14:41:37

*** FILE INCLUDE/EXCLUDE ***
Mode Function  Pattern (match from top down)  Source File
---- --------- ------------------------------ -----------------
No exclude filespace statements defined.
Excl Directory /var/spool/qdaemon             Server
Excl Directory /var/spool/lpd                 Server
Excl Directory /proc                          Server
Excl Directory /mnt                           Server
Excl Directory /media*                        Server
Excl Directory /cdrom*                        Server
Excl Directory /.../*.tmp                     Server
Excl Directory /.../*.temp                    Server
Excl Directory /.../tmp                       Server
Excl Directory /.../temp                      Server
Excl Directory /.../iso                       Server
No DFS include/exclude statements defined.
tsm/tsm_client_cmd.txt · Last modified: 2021/01/01 21:25 (external edit)