2012年10月9日 星期二

tsm client for ubuntu 64

 1.get the TSM RPMs
    wget "ftp://ftp.software.ibm.com/storage/t...C-LinuxX86.tar"

 2.install ksh and ia32-libs、libstdc++5
    # apt-get install alien libstdc++5 ksh ia32-libs

  
 3.unpack the archive
    tar xvf 5.5.2.0-TIV-TSMBAC-LinuxX86.tar

 4.unpack the RPM archives (ignore warnings re scripts)
    alien -g TIVsm-API.i386.rpm
    alien -g TIVsm-BA.i386.rpm


 5.change directory names
    mv TIVsm-API-5.5.2/debian TIVsm-API-5.5.2/DEBIAN
    mv TIVsm-BA-5.5.2/debian TIVsm-BA-5.5.2/DEBIAN


 6.edit the control files
    vim TIVsm-API-5.5.2/DEBIAN/control
    -- remove blank line after "Maintainer:" line
    -- in "Architecture:" line change "i386" to "amd64"
    -- delete "${shlibs epends}" in "Depends:" line
    -- joing two "Description:" lines into one line
    -- insert line "Version: 5.5.2"
    -- delete last two lines " ." and " (Converted..."
    -- append an empty line as last line
    |Source: tivsm-api
    |Section: alien
    |Priority: extra
    |Maintainer: who are you
    |Package: tivsm-api
    |Architecture: amd64
    |Depends:
    |Description: the API IBM Tivoli Storage Manager API
    |Version: 5.5.2

    |
    -- save and exit

    vim TIVsm-BA-5.5.2/DEBIAN/control
    -- remove blank line after "Maintainer:" line
    -- in "Architecture:" line change "i386" to "amd64"
    -- delete "${shlibsepends}" in "Depends:" line
    -- joing two "Description:" lines into one line
    -- insert line "Version: 5.5.2"
    -- delete last two lines " ." and " (Converted..."
    -- append an empty line as last line
    |Source: tivsm-ba
    |Section: alien
    |Priority: extra
    |Maintainer: who are you
    |Package: tivsm-ba
    |Architecture: amd64
    |Depends:
    |Description: the Backup Archive Client IBM TSM Client
    |Version: 5.5.2

    |
    -- save and exit

 7.create *.deb packages
    dpkg -b TIVsm-API-5.5.2
    dpkg -b TIVsm-BA-5.5.2


 8.create /etc/ld.so.conf.d/tsm-api.conf with this one line:
    /opt/tivoli/tsm/client/api/bin

    ldconfig
 
 9.install *.deb packages
    dpkg -i TIVsm-API-5.5.2.deb
    dpkg -i TIVsm-BA-5.5.2.deb

10.create/modify TSM configuration files
    vim /opt/tivoli/tsm/client/ba/bin/dsm.opt
    | ServerName TSMServer
    | Domain ALL-LOCAL
    | DateFormat 3
    -- save and exit
 
11.vim /opt/tivoli/tsm/client/ba/bin/dsm.sys
    | ServerName TSMServer
    | CommMethod TCPip
    | TcpPort 1500
    | TcpServerAddress tsmserver.your.domain.com
    | NodeName registered-name-for-this-system
    | PasswordAccess generate
    | Compression On
    | ErrorLogName /var/log/dsmerror.log
    | ErrorLogRetention 5 D
    | SchedLogName /var/log/dsmsched.log
    | SchedLogRetention 5 D
    |* InclExcl /opt/tivoli/tsm/client/ba/bin/dsm.inclexcl
    -- set the TcpServerAddress to the fully qualified name of the TSM Server
    -- set the NodeName to the node name as registered with the TSM Server
    -- save and exit
12.ln -s /opt/tivoli/tsm/client/api/bin/libgpfs.so /lib32/
     ln -s /opt/tivoli/tsm/client/api/bin/libdmapi.so /lib32/
     ln -s /opt/tivoli/tsm/client/lang/en_US/ /opt/tivoli/tsm/client/ba/bin/

13. run an incremental backup
    dsmc incremental

14. create upstart script
    vim /etc/init/dsm-sched.conf
    # dsm-sched

    # This service starts the TSM "dsmc sched" backup process
    # and respawns it when the dsmc process gets
    # killed or dies.

    Description “start the Tivoli Storage Manager scheduler”

    start on runlevel 2
    start on runlevel 3
    start on runlevel 4
    start on runlevel 5

    stop on runlevel 0
    stop on runlevel 1
    stop on runlevel 6

    respawn
    exec /usr/bin/dsmc sched >>/tmp/dsm-sched.log 2>&1

    # end of dsm-sched
    -- save and exit

    start the TSM scheduler
    start dsm-sched

    verify the scheduler picked up its scheduletail /var/log/dsmsched.log

2012年3月14日 星期三

TSM 還原指令

1.Restore the most recent backup version of the /Users/monnett/Documents/h1.doc file, even if the backup is inactive.
dsmc restore /Users/monnett/Documents/h1.doc -latest

2.Display a list of active and inactive backup versions of files from which you can select versions to restore.
dsmc restore "/Users/monnett/Documents/*"-pick -inactive
這個指令可以看你目錄下所有的東西,因為有些檔案已過期,不是active
dsmc restore /Users/monnett/Documents/* -ina -subdir=y
要加Ina,才會把過期的檔案撈回去

3.Restore the /Users/monnett/Documents/h1.doc file to its original directory.
dsmc restore /Users/monnett/Documents/h1.doc

4.Restore the /Users/monnett/Documents/h1.doc file under a new name and directory.
dsmc restore /Users/monnett/Documents/h1.doc /Users/gordon/Documents/h2.doc

5.Restore the files in the /Users directory and all of its subdirectories.
dsmc restore /Users/ -subdir=yes

6.Restore all files in the /Users/gordon/Documents directory to their state as of 1:00 PM on August 17, 2003.
dsmc restore -pitd=8/17/2003 -pitt=13:00:00 /Users/gordon/Documents/
dsmc restore "/fs1/*" -sub=y -pitdate=08/01/2003 -pittime=06:00:00

7.Restore all files from the /Users/mike/Documents directory that end with .bak to the /Users/mike/projectn/ directory.
dsmc restore "/Users/mike/Documents/*.bak" /Users/mike/projectn/

8.Restore files specified in the restorelist.txt file to a different location.
dsmc restore -filelist=/Users/user2/Documents/ restorelist.txt /Users/NewRestoreLocation/

9.還原指定的時間與日期,接-LATest可還原inactive file
dsmc REStore -FROMDate=06/01/96 -TODate=06/30/96 -LATest "*.f" -pittine=07:00:00 -subdir=y
大寫表示可以打縮寫
dsmc RES -FROMD=06/01/96 -TOD=06/30/96 -LAT "*.f"

指定檔案路徑名稱做過濾,在指定檔案還原
(例檔案名稱有100.xlsx)如有繁體中文請在putty→translation→remote character set:選擇UTF8不然無法下指令
dsmc query backup '/home/share/@*/100*.xlsx' -ina -subdir=y
可以show出所有有關100的檔案
Size      Backup Date        Mgmt Class A/I File
             ----      -----------        ---------- --- ----
        68,744  B  04/13/11   01:14:28    DEFAULT     A  /home/share/@月報/100年月報/1.xlsx
        45,326  B  04/20/11   01:23:03    DEFAULT     A  /home/share/@月報/100年月報/2.xlsx
        79,367  B  05/12/11   01:23:56    DEFAULT     A  /home/share/@月報/100年月報/2.xlsx
        45,220  B  05/13/11   01:19:47    DEFAULT     A  /home/share/@月報/100年月報/3.xlsx
        87,012  B  06/29/11   01:10:57    DEFAULT     A  /home/share/@月報/100年月報/3.xlsx
找到想要還原的檔案直接restore (使用pick 選擇要回復的檔案)