IBM Spectrum Protect: Difference between revisions

From Leo's Notes
This page was last edited on 4 February 2020, at 19:08.
mNo edit summary
Line 15: Line 15:
Commands and parameters can be shortened so long as it is not ambiguous. {{code|query volume}} can therefore be shortened to {{code|q vol}}, for example.
Commands and parameters can be shortened so long as it is not ambiguous. {{code|query volume}} can therefore be shortened to {{code|q vol}}, for example.


=== Query ===
==== Tapes ====
To show all tapes in use, their capacity and usage, run {{code|query volume}}.
To show all tapes in use, their capacity and usage, run {{code|query volume}}.
{{highlight|lang=terminal|code=
{{highlight|lang=terminal|code=
Line 25: Line 27:
}}
}}


 
To show contents of a particular tape, run {{code|query content tapeid}}.
To show tape contents, run {{code|query content tapeid}}.
{{highlight|lang=terminal|code=
{{highlight|lang=terminal|code=
tsm: CHGI_TSM01> query content A00091L7
tsm: CHGI_TSM01> query content A00091L7
Line 43: Line 44:
}}
}}


==== Schedules ====
To show all configured backup schedules, run {{code|query schedules}}.
To show all configured backup schedules, run {{code|query schedules}}.
{{highlight|lang=terminal|code=
{{highlight|lang=terminal|code=
tsm: CHGI_TSM01> query schedules
tsm: CHGI_TSM01> query schedules
Domain          *    Schedule Name        Action    Start Date/Time          Duration    Period    Day
------------    -    ----------------    ------    --------------------    --------    ------    ---
SERVERS                DAILY_INCR          Inc Bk    07/04/2017 18:00:00          1 H        1 D      Any
SERVERS                MMBACKUP            CMD        07/04/2017 02:10:00          1 H        1 D      Any
STANDARD              DAILY_INCR          Inc Bk    07/04/2017 18:00:00          1 H        1 D      Any
}}
}}


To show all partitions that are backed up, run {{code|query filespace}}.
==== Backup Filespace ====
To show all partitions that are made available to be backed up, run {{code|query filespace}}. These are partitions that have the potential of being backed up based on schedules and policies but aren't necessarily backed up.
 
{{highlight|lang=terminal|code=
{{highlight|lang=terminal|code=
tsm: CHGI_TSM01> query filespace
tsm: CHGI_TSM01> query filespace
Node Name          Filespace N    FSID    Platform    Filespace    Is Filespa        Capacity    Pct U
                    ame                                    Type        ce Unicode                      til
                                                                            ?                         
---------------    -----------    ----    --------    ---------    ----------    -----------    -----
CRICK.CHGI.UCAL    /                  1    LinuxPPC    EXT4              No              879 GB      24.9
GARY.CA                                      64LE                                                         
TSM                /tsminst1          1    LinuxPPC    EXT4              No          30,109 MB      52.9
                                              64                                                           
TSM                /                  2    LinuxPPC    EXT4              No          50,268 MB      74.6
                                              64                                                           
TSM                /boot              3    LinuxPPC    EXT4              No              468 MB      68.6
                                              64                                                           
TSM                /tsmdb0            4    LinuxPPC    EXT4              No              196 GB      45.1
                                              64                                                           
TSM                /tsmdb1            5    LinuxPPC    EXT4              No              196 GB      45.1
                                              64                                                           
TSM                /tsmdb2            6    LinuxPPC    EXT4              No              196 GB      45.1
                                              64                                                           
TSM                /tsmdb3            7    LinuxPPC    EXT4              No              196 GB      45.1
                                              64                                                           
TSM                /tsmlog            8    LinuxPPC    EXT4              No              245 GB      57.0
                                              64                                                           
TSM                /tsmarchlog        9    LinuxPPC    EXT4              No              492 GB      5.0
                                              64                                                           
TSM                /gpfs            10    LinuxPPC    GPFS              No            1,292 TB      77.9
                                              64                                                           
TSM                /tiered          14    LinuxPPC    GPFS              No            1,400 TB      92.8
                                              64                                                           
}}
}}



Revision as of 19:08, 4 February 2020

Tivoli Storage Manager

TSM Commandline Usage

The TSM command line can be entered either from the web GUI via the 'Command Builder' or by running dsmadmc utility. In both cases, you must provide the TSM credentials.

You will be greeted with a prompt similar to the one below.

Session established with server CHGI_TSM01: Linux/ppc64
  Server Version 7, Release 1, Level 7.200
  Server date/time: 11/19/2019 14:18:43  Last access: 11/12/2019 17:15:04
  
tsm: CHGI_TSM01>

Commands and parameters can be shortened so long as it is not ambiguous. query volume can therefore be shortened to q vol, for example.

Query

Tapes

To show all tapes in use, their capacity and usage, run query volume.

tsm: CHGI_TSM01> query volume
Volume Name	Storage Pool Name	Device Class Name	Estimated Capacity	Pct Util	Volume Status
A00091L7	BACKUPTAPE	LTO	127.339 G	98.291	Full
A00105L7	BACKUPTAPE	LTO	13.642 T	1.331	Filling
A00106L7	BACKUPTAPE	LTO	167.739 G	83.773	Full
A00107L7	BACKUPTAPE	LTO	203.538 G	97.105	Full

To show contents of a particular tape, run query content tapeid.

tsm: CHGI_TSM01> query content A00091L7

Node Name           Type     Filespace      FSID     Client's Name for File                
                             Name                    
---------------     ----     ----------     ----     --------------------------------------
TSM                 Bkup     /gpfs            10     /home/atyndall/.cache/mozilla/firefox/
                                                      td76tbw4.default/cache2/entries/929BC
                                                      F811537CE5A1B05BC367E7D5FCD9D1512C2  
TSM                 Bkup     /gpfs            10     /home/atyndall/.mozilla/firefox/td76tb
                                                      w4.default/.parentlock               
TSM                 Bkup     /gpfs            10     /home/atyndall/.mozilla/firefox/td76tb
                                                      w4.default/SiteSecurityServiceState.t
                                                      xt

Schedules

To show all configured backup schedules, run query schedules.

tsm: CHGI_TSM01> query schedules

Domain           *     Schedule Name        Action     Start Date/Time          Duration     Period     Day
------------     -     ----------------     ------     --------------------     --------     ------     ---
SERVERS                DAILY_INCR           Inc Bk     07/04/2017 18:00:00          1 H        1 D      Any
SERVERS                MMBACKUP             CMD        07/04/2017 02:10:00          1 H        1 D      Any
STANDARD               DAILY_INCR           Inc Bk     07/04/2017 18:00:00          1 H        1 D      Any

Backup Filespace

To show all partitions that are made available to be backed up, run query filespace. These are partitions that have the potential of being backed up based on schedules and policies but aren't necessarily backed up.

tsm: CHGI_TSM01> query filespace

Node Name           Filespace N     FSID     Platform     Filespace     Is Filespa        Capacity     Pct U
                    ame                                    Type         ce Unicode                       til
                                                                            ?                          
---------------     -----------     ----     --------     ---------     ----------     -----------     -----
CRICK.CHGI.UCAL     /                  1     LinuxPPC     EXT4              No              879 GB      24.9
 GARY.CA                                      64LE                                                          
TSM                 /tsminst1          1     LinuxPPC     EXT4              No           30,109 MB      52.9
                                              64                                                            
TSM                 /                  2     LinuxPPC     EXT4              No           50,268 MB      74.6
                                              64                                                            
TSM                 /boot              3     LinuxPPC     EXT4              No              468 MB      68.6
                                              64                                                            
TSM                 /tsmdb0            4     LinuxPPC     EXT4              No              196 GB      45.1
                                              64                                                            
TSM                 /tsmdb1            5     LinuxPPC     EXT4              No              196 GB      45.1
                                              64                                                            
TSM                 /tsmdb2            6     LinuxPPC     EXT4              No              196 GB      45.1
                                              64                                                            
TSM                 /tsmdb3            7     LinuxPPC     EXT4              No              196 GB      45.1
                                              64                                                            
TSM                 /tsmlog            8     LinuxPPC     EXT4              No              245 GB      57.0
                                              64                                                            
TSM                 /tsmarchlog        9     LinuxPPC     EXT4              No              492 GB       5.0
                                              64                                                            
TSM                 /gpfs             10     LinuxPPC     GPFS              No            1,292 TB      77.9
                                              64                                                            
TSM                 /tiered           14     LinuxPPC     GPFS              No            1,400 TB      92.8
                                              64


Snapshots

Snapshot management is done using the following utilities:

Command Description
mmlssnapshot gpfs0 Lists all snapshots in the gpfs0 device
mmdelsnapshot gpfs0 snapshot_name -j fileset Deletes a snapshot in the gpfs0 device on a particular fileset by name.
mmcrsnapshot gpfs0 snapshot_name -j fileset Create a snapshot in the gpfs0 device for a particular fileset with the provided snapshot name.

Snapshot Options

Snapshots can be configured with interesting behaviors with Option Sets including what files to include or exclude when creating a snapshot.

Options can be configured in the TSM Command Line by defining a new Option Set (define cloptset) and providing a list of options associated with the Option Set. For example, the INCLEXCL directive defines what files to include or exclude.

An example Option Set and its list of options.

tsm: CHGI_TSM01>query cloptset

Optionset                     Description                   Last Update by      Managing profile         Replica Option 
                                                            (administrator)                              Set            
-------------------------     -------------------------     ---------------     --------------------     ---------------
CRICK                                                       JOERG                                        No             

Option                        Sequence     Use Option     Option Value                                                
                                number      Set Value     
                                              (FORCE)     
-------------------------     --------     ----------     ------------------------------------------------------------
DOMAIN                               0             No     all-local -/gpfs                                            
INCLEXCL                             0             No     Exclude /unix/                                              
INCLEXCL                             1             No     Exclude /.../core                                           
INCLEXCL                             2             No     Exclude.dir /unix/                                          
INCLEXCL                             3             No     Include /gpfs/forever/.../* INDEFINITE                      
RESOURCEUTILIZATION                  0             No     5                                                           
SCHEDMODE                            0             No     prompted                                                    
TXNBYTELIMIT                         0             No     2G


Automated Snapshots

In CHGI, these commands are wrapped up in a custom perl script and configured with a configuration file. This script is then invoked daily with a root-user cronjob:

5 23 * * * /usr/local/bin/admSnapshots.plx /usr/local/etc/admSnapshots.conf

Where the configuration file defines the fileset and number of snapshots to keep:

ebg_gmb            3
ebg_web            3
qlong              3
snyder_irida       3