User Tools

Site Tools


tsm:restore

TSM:Restore using command line

FIXME To restore a full filespace, add a / at the end of command, ex

dsmc restore /opt/ -subdir=yes -optfile=/opt/tivoli/tsm/client/ba/bin/dsm.opt

You can choose interactive mode, by using dsmc command, or directly start the full command: dsmc <TSM command>. Here I just explain interactive mode:

[root@oracle01]/root# /usr/bin/dsmc
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
  Client Version 6, Release 2, Level 2.0  
  Client date/time: 06/15/11   10:53:47
(c) Copyright by IBM Corporation and other(s) 1990, 2010. All Rights Reserved.

Node Name: ORACLE01
Session established with server TSM1: AIX
  Server Version 6, Release 2, Level 1.1
  Server date/time: 06/15/11   10:53:47  Last access: 06/15/11   10:41:09
tsm> 

Search a file which was backup on TSM:

  • Unordered List Itemfull path is required, is the file is not in your current directory (before starting dsmc)
  • option -ina (inactive files), to list an old version of a file, or a deleted file. Active file is a file that was present on the server during last backup.
tsm> q ba smit.log
           Size        Backup Date                Mgmt Class           A/I File
           ----        -----------                ----------           --- ----
     2,205,527  B  06/07/11   22:15:43             DEFAULT              A  /root/smit.log
tsm> q ba "/root/smit.log"
           Size        Backup Date                Mgmt Class           A/I File
           ----        -----------                ----------           --- ----
     2,205,527  B  06/07/11   22:15:43             DEFAULT              A  /root/smit.log
tsm> q ba -ina "/root/smit.log"
           Size        Backup Date                Mgmt Class           A/I File
           ----        -----------                ----------           --- ----
     2,205,527  B  06/07/11   22:15:43             DEFAULT              A  /root/smit.log
     2,199,224  B  05/06/11   22:16:04             DEFAULT              I  /root/smit.log
     2,203,791  B  05/23/11   22:15:53             DEFAULT              I  /root/smit.log

Restore a file which was backup on TSM:

  • options: -sub (subdirectory to restore), -ina (list active and inactive versions), -pitt (point in time), -pitd (point in time date), -pick (create an interactive list of files to restore)…, check for other optins into the “help”

Usage: rest “<file or directory>” [target_dir/] [options]

tsm> dsmc rest "/Users/user1/file?.c" /Users/user2/ -sub=yes

Restore all files in the /home/mydir directory to their state as of 1:00 PM on August 17, 2002.

tsm> restore -ina -pitd=8/17/2002 -pitt=13:00:00 /home/mydir/

Restore in interactive mode, by choosing the version you want restore:

tsm> rest -pick -ina /root/smit.log /tmp/
TSM Scrollable PICK Window - Restore

     #    Backup Date/Time        File Size A/I  File
        ----------------------------------------------------------------------------------------------------------------------------
     1. | 06/07/11   22:15:43       2.10 MB  A   /root/smit.log
x    2. | 05/23/11   22:15:53       2.10 MB  I   /root/smit.log
     3. | 05/06/11   22:16:04       2.09 MB  I   /root/smit.log
        0---------10--------20--------30--------40--------50--------60--------70--------80--------90--------100-------110-------120-
<U>=Up  <D>=Down  <T>=Top  <B>=Bottom  <R#>=Right  <L
<G#>=Goto Line #  <
<#:#+>=Select A Range <#:
pick> O

Restore on a specific path, without full folder tree

[root@oracle01]/root# /usr/bin/dsmc restore -preservepath=none /usr/bxx/log/vm_list.txt /tmp/
Restoring              97 /usr/bga/log/vm_list.txt --> /tmp/vm_list.txt [Done]
tsm/restore.txt · Last modified: 2023/11/23 16:58 by manu