Showing posts with label Backup. Show all posts
Showing posts with label Backup. Show all posts

Saturday, May 14, 2011

TSM Disaster Recovery

TSM Disaster Recovery

http://www.urz.uni-heidelberg.de/ADSM/ibmdoc.tsm51/win/html/guide/anrwg241.htm
http://webdocs.caspur.it/ibm_doc/tsm/5.1.5/doc/win/html/qstart/anrwqs33.htm
http://www.urz.uni-heidelberg.de/ADSM/ibmdoc.tsm51/win/html/guide/anrwg241.htm
http://www.urz.uni-heidelberg.de/ADSM/ibmdoc.tsm51/win/html/guide/anrwg244.htm#HDRDRSCRIPT
http://www.urz.uni-heidelberg.de/ADSM/ibmdoc.tsm51/mvs/html/qstart/anrmqs15.htm
http://ezaix.blogspot.com/2008/01/complete-tsm-disaster-recovery.html

Thursday, May 5, 2011

Complete TSM Disaster Recovery

Link : http://ezaix.blogspot.com/2008/01/complete-tsm-disaster-recovery.html
Complete TSM Disaster Recovery
These are my notes from the Mercedes Benz DR Test .
To restore the TSM we must have at least the DB backup and storage pool backups. These are two most essential things, rest all can be recreated. It helps if you have the volume history and device configuration file as well, although most of the time if TSM is being restored on a different server you will end up recreating the device config. If you have DR plan that would be the best.

Now to begin with, the original environment was TSM as a partition on p595 with a 3584 partitioned Library with 5 drives. The restoration environment was a similar partition on p570, 3584 with 10 drives. The test was done at vendor location who provided hardware with partitions and vanilla AIX installation.


Make sure you have CDROM drivers installed or at least have CDROM properly configured on one of the partitions from where you can NFS mount it to TSM partition. We ended up spending half hour in searching and installing drivers from AIX OS CDs by FTPing the bff files from a PC to TSM partition.
Install TSM software. Match the version and fix level of source server. Do not forget to run lppchk and comment out the automatic start script in /etc/inittab before you reboot the server.
Check the size of DB and log files from DR plan and create them with dsmfmt.
Initialize the logs and db files with dsmserv format. This would put in the entries for these files in dsmserv.dsk file in TSM installation directory.
Set your ulimits to unlimited, export LANG=en_US and run dsmserv. It will start TSM server and would give you TSM prompt. Here set the server name, then create device configurations in following order:
define library
define path for library
define drive
define path for drives
define devclass
Make sure the device names used while defining path to drives have the same serial number as the serial number of physical drive in the element used in defining the drive. The AIX device numbers (rmt0, rmt1 etc.) are not necessarily in order. Use lscfg -vl and lsattr -El for this. To speed up the restoration, just define one drive and start, rest can be done once TSM is restored and clients have started restoring their files. We do not need disk storage pool as no client is going to backup their data here and all restores will happen from tapes only.
Halt the TSM server. Restore the original dsmserv.opt from DR plan or any other location and run backup devconfig. This will write the newly created devconfig to files specified in dsmserv.opt. Copy this devconfig, we will need it again and it gets overwritten when we restore DB.
Copy the original volume history file to the place pointed by dsmserv.opt.
Put in the tapes in library.

While using the 3584 library, TSM puts in the location of volumes as a line in device config file, I don't remember seeing this in 3590s, may be because that was an intelligent library. Get the location of DB backup tape from 3584 web interface and write a single line in device config with the location of DB backup volume. (Spent another half hour figuring this out). The line would look like this: /* LIBRARYINVENTORY SCSI 3584_LIB 000002 1605 101*/
Where first column indicates its library inventory, second column states the type of library it is, third column library name, fourth column volume name/serial no, fifth column is the element address and the sixth and last column is logical library number.
Run dsmserv restore db with todate option. TSM checks the volhist file for latest DB backup and then checks device config for its location. The volume is mounted, DB restored and the log files are formatted again. The progress of log format and DB restore is mixed together in console so you have to look hard to monitor the DB restoration progress.
Once the DB is restored, the TSM dismounts the volume and halts. The device config is now overwritten with original TSM's device config, so copy it and overwrite it with the one we created for this environment.
Start TSM by issuing dsmserv. Once you get the prompt, checkin the volumes with search=yes and status=private.
Mark all primary storage pool volumes' access as destroyed.
Update all copy storage pool volumes' access as readonly.
Disable all admin schedules for backup storage pool, expiration or reclamation.
Halt the server.
Start the server normally. You should be good to restore the data from TSM now.

TSM cheat sheet

TSM cheat sheet

The syntax for TSM commands is a verb followed by an object, which is then usually followed by flags and conditions (both required and optional). The commands do not have to be typed out completely; if you type the capitalized portions of the commands listed below, that is sufficient to run the command. For example, the
Query STGpool
command can be typed as
q stg

[from a system prompt] dsmadmc
This opens the administrative command line interface to the TSM server. It can be run from any computer that has the administrative client loaded and has a configuration file (dsm.opt or dsm.sys) that contains pointers to a TSM server. On UNIX computers, the TSM client installation process paths the directory that contains dsmadmc; on Windows computers, you must cd to the proper directory (default: c:\program files\tivoli\tsm\baclient) before running this command. In order to view a ‘live’ window of the TSM activity log, use dsmadmc with this flag:
dsmadmc -console
Note that the directory that dsmadmc resides in is pathed for UNIX boxes, but it is not for Windows machines.

[from a web browser session] http://:1580
This opens the web-based administrative interface to the TSM server. It can be run from any computer that has a sufficiently recent version of a web browser. 1580 is the default TCP port used by TSM for web communication; it can be configured to any desired, non-reserved TCP port in the TSM server’s configuration file:
dsmserv.opt


Help
When you prefix 'help' to the beginning of any command, TSM will display the help file for that command. The help file contains an explanation of the command, its syntax, examples of the command, and related commands.


Help
When you type 'help' followed by a message ID found at the beginning of each activity log entry, you get an explanation of what the message ID refers, and other related information.


Query STGpool
This command will show a detailed list of all storage pools in the following format:

Storage Pool Name Device Class Name Est. capacity Pct Util Pct Migr High Mig Low Mig Next Pool
AOFFSITE2 IBM3590 1,220,636.0 0.5
ARCHPOOL2 IBM3590 1,220,636.0 0.5 1.0 85 70
ARDISK2 DISK 808.0 98.9 6.3 35 0 ARCHPOOL2
BUPOOL1 DISK 69,530.0 9.2 9.2 40 0 TAPEPOOL1
BUPOOL2 DISK 108,385.0 1.3 1.3 40 0 TAPEPOOL2
BUPOOL3 DISK 85,890.0 2.7 0.0 40 0 TAPEPOOL3
OFFSITE1 IBM3590 4,326,864.0 12.4


Query EVent
This command will list information concerning the results of scheduled events for both clients and administration. The syntax of the command for examining client backups for the current 24-hour time slice is

Query EVent * *

For examining the outcome of scheduled client events for other days is

Query EVent * * BEGINDate=MM/DD/YYYY

The output of the command appears in the following format:

Scheduled Start Actual Start Schedule Name Node Name Status
07/19/2001 00:00:00 07/19/2001 00:25:44 AM000 LAWSONP1 Completed
07/19/2001 00:00:00 07/19/2001 00:03:07 AM000 DOMINO1 Completed
07/19/2001 00:00:00 07/19/2001 00:47:31 AM000 LAWSOND1 Failed
07/19/2001 00:00:00 07/19/2001 00:11:45 AM000 BINC_MSN Completed
07/19/2001 00:00:00 07/19/2001 00:05:17 AM000 BINCDOM_BDC Missed
07/19/2001 00:00:00 07/19/2001 00:12:10 AM000 MSNLS8B Completed

Similarly, the command to show the success or failure of scheduled administrative events is

Query EVent * type=admin

'Missed' events never commenced. 'Failed' events began, but for some reason had a non-zero status returned at completion. 'Future' events have yet to occur in the time slice requested.


Query DB
This command will show the current state of the TSM internal database. The output shows:

Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
28,616 26,572 2,044 8,296 4,096 6,802,432 4,171,891 61.3 61.8


Query PRocess
This command will show currently running processes, such inventory expiration, library audits, data migration, etc.


Query SEssion
This command will show all currently connected clients. The output looks like this:

Sess Comm. Sess Wait Bytes Bytes Sess Platform Client Name
Number Method State Time Sent Recvd Type
48,449 Tcp/Ip Run 0 S 262.3 K 735 Admin WinNT ADMIN
48,535 Tcp/Ip MediaW 59 S 1.3 G 2.0 K Node Linux86 SWISSWEB


Query ACTlog
This command will show a listing of the TSM activity log. The default command will show the previous hour's worth of log entries. The syntax for specific blocks of time is

Query ACTlog BEGINDate=mm/dd/yyyy BEGINtime=hh:mm ENDDate=mm/dd/yyyy ENDTime=hh:mm


Query DRive
This command will show the existence and state of all tape drives defined within TSM. The output looks like this:

Library Name Drive Name Device Type Device On Line
IBM3494 DRIVE1 3590 /dev/rmt1 Yes
IBM3494 DRIVE2 3590 /dev/rmt2 Yes
IBM3494 DRIVE3 3590 /dev/rmt3 Yes
IBM3494 DRIVE4 3590 /dev/rmt4 Yes
IBM3494 DRIVE5 3590 /dev/rmt5 Yes
IBM3494 DRIVE6 3590 /dev/rmt6 Yes
MANUAL4MM IBM1 4MM /dev/mt7 Yes


Query LIBRary
This command will show the existence and state of all tape libraries defined within TSM. The output looks like this:

Library Name: IBM3494
Library Type: 349X
Device: /dev/alcatraz
Private Category: 300
Scratch Category: 301
External Manager:
Shared: No

Library Name: MANUAL4MM
Library Type: MANUAL
Device:
Private Category:
Scratch Category:
External Manager:
Shared: No


Query LIBVolume
This command will list the tape volumes currently contained in all tape libraries and recognized by TSM as either scratch or private tapes. The output looks like this:

Library Name Volume Name Status Owner Last Use Home Element
IBM3494 016001 Scratch
IBM3494 016002 Scratch
IBM3494 016003 Scratch
IBM3494 016004 Private Data
IBM3494 016005 Scratch
IBM3494 016006 Scratch
IBM3494 016007 Private Data
IBM3494 016008 Private Data
IBM3494 016009 Private Data
IBM3494 016011 Private Data
IBM3494 016013 Private DbBackup
IBM3494 016015 Private DbBackup


Query SYStem
This command will echo all server settings. This command generates quite a bit of information about the settings and configuration of the TSM server.


Query NODe
This command will echo back the names and other information concerning the clients that have been registered with the TSM server.


EXPIre Inventory
This command will purge the TSM database of all entries that have been deleted due to retention rule enforcement or manual deletion. This should be run on a daily basis, preferably scheduled as an administrative event.


BAckup DB
This command will backup the internal TSM database to the designated device class (tape, file, etc.). This command should be run on a daily basis, preferably scheduled as an administrative event.


Many of the Query commands have counterparts to define new entities or update existing ones. To define most new entities, substitute

DEFine

for Query. To update existing entities, substitute

UPDate

for Query. For instance, to update an existing storage pool, the command syntax is

UPDate STGpool ...

Use the Help prefix to obtain complete information about such commands, or refer to the TSM Administrator's Reference.

Many of the Query commands allow for an optional flag Format=Detailed. This gives more detailed information in the query results.

Monday, April 25, 2011

Backup and Restore With AIX

Backup and Restore With AIX
1- http://www.ibmsystemsmag.com/aix/administrator/backuprecovery/Backup-and-Restore-With-AIX/

Gotchas of Backup and Recovery

1- http://www.ibmsystemsmag.com/aix/administrator/backuprecovery/The--Gotchas--of-Backup-and-Recovery/