Wednesday, January 30, 2008

How to check backup and to restore on HP OpenView Omniback

(From SuhailaAbdGhani SITI)

# /usr/omni/bin/omnistat <--Check for stats

Check detail reports for current running session
# /usr/omni/bin/omnidb -ses 2007/05/28-2 -rep|more

Check session details :(Backup contain; Object Name,Size, Device name, etc)
omnidb -session -detail
# /usr/omni/bin/omnidb -sess 2008/01/17-4 -det

omnidownload -list_devices
# /usr/omni/bin/omnidownload -list_devices

To Restore filesystem
-------------------------
omnir -filesystem object name -session sessionID session-id-tree mountpoint -into restore target -no_monitor/session-id
# /usr/omni/bin/omnir -filesystem mlbs0048_cs1:/local/apps/ctm '/local/apps/ctm' -session 2008/01/17-4 -tree /local/apps/ctm -into /local/apps/ctm -no_monitor


To handle mount request:
Check session report, look for media label,device,slot, etc eg:
# /usr/omni/bin/omnidb -sess 2008/01/26-12 -rep|more

Command to confirm mount request.
omnimnt -dev -session
# /usr/omni/bin/omnimnt -dev LTO_2_mlbsv146 -ses 2008/01/26-12

Monday, January 28, 2008

Jérôme Kerviel

Is he 'better' than Yasuo Hamanaka and Nick Leeson or a merely made a scapegoat of Société Générale's bad investment decision?

Monday, January 21, 2008

To Configure Solaris OS to Generate Core Files

#mkdir -p /var/cores
#coreadm -g /var/cores/%f.%n.%p.%t.core -e global -e global-setid -e log -d process -d proc-setid

# coreadm <---Display the core configuration.
global core file pattern: /var/cores/%f.%n.%p.%t.core
init core file pattern: core
global core dumps: enabled
per-process core dumps: disabled
global setid core dumps: enabled
per-process setid core dumps: disabled
global core dump logging: enabled

#man coreadm <---for further details
# ulimit -c unlimited <--- Set the size of the core dumps to unlimited.
# ulimit -a <----Verify coredump size
coredump(blocks) unlimited

Test/Verify core file creation.
# cd /var/cores
# sleep 100000 &
[1] PID
# kill -8 PID; # ls

Friday, January 18, 2008

Backup/Restore (Solaris) - ufsdump/ufsrestore, cpio, tar

#dmesg | grep st <---- CHecking tape device
#mt -f /dev/rmt/0 status <---- Checking tape drive status

UFSDUMP (Backup file system)
#ufsdump 0cvf /dev/rmt/0 /dev/rdsk/c0t0d0s0 <-- using raw devices
#ufsdump 0cvf /dev/rmt/0 /usr <--- using mounted fs
Disk to disk copy
#ufsdump 0f - /dev/rdsk/c0t0d0s7 |(cd /mnt/backup ;ufsrestore xf -)

UFSRESTORE (restore fs)
#ufsrestore rvf /dev/rmt/0 <---- restore a dump to a current dir
# ufsrestore -i /dev/rmt/0 <--- in interactive mode, on the selected tape drive

TAR
#tar cvf /dev/rmt/0 * <---- Backup all (*) using tar for the current dir
#tar tvf /dev/rmt/0 <---- listing a tar backup on a tape
#tar xvf /dev/rmt/0 <---- Extracting tar backup from tape to a current dir

CPIO
#find . -depth -print | cpio -ovcB > /dev/rmt/0 <---- Backup using cpio
#cpio -ivtB < /dev/rmt/0 <---- Viewing cpio files on a tape
#cpio -ivcB < /dev/rmt/0 <---- Restoring a cpio backup

Compress/uncompress
#compress -v or #gzip
#uncompress .Z or #gunzip .gz

Thursday, January 17, 2008

OS Backup/Restore using ufsdump in Solaris

Backing Up and Restoring the Solaris OS With "ufsdump"
(http://www.sun.com/bigadmin/content/submitted/backup_restore_ufsdump.html)

Yazid Mohamed, August 2006

This Tech Tip describes a backup and restore procedure for the Solaris 8 or 9 Operating System using the ufsdump command.

Backing Up the OS

1. For this example, we are using c0t0d0s0 as a root partition. Bring the system into single-user mode (recommended).
# init -s

2. Check the partition consistency.
# fsck -m /dev/rdsk/c0t0d0s0

3. Verify the tape device status:
# mt status

Or use this command when you want to specify the raw tape device, where x is the interface:
# mt -f /dev/rmt/x status

4. Back up the system:
a) When the tape drive is attached to your local system, use this:
# ufsdump 0uf /dev/rmt/0n /

b) When you want to back up from disk to disk, for example, if you want to back up c0t0d0s0 to c0t1d0s0:
# mkdir /tmp/backup
# mount /dev/dsk/c0t1d0s0 /tmp/backup
# ufsdump 0f - / | (cd /tmp/backup;ufsrestore xvf -)

c) When you want to back up to a remote tape, use this. On a system that has a tape drive, add the following line to its /.rhosts file:

hostname root

where hostname is the name or IP of the system that will run ufsdump to perform the backup. Then run the following command:
# ufsdump 0uf remote_hostname:/dev/rmt/0n /

Restoring the OS

1. For this example, your OS disk is totally corrupted and replaced with a new disk. Go to the ok prompt and boot in single-user mode from the Solaris CD.
ok> boot cdrom -s

2. Partition your new disk in the same way as your original disk.

3. Format all slices using the newfs command. For example:
# newfs /dev/rdsk/c0t0d0s0

4. Make a new directory in /tmp:
# mkdir /tmp/slice0

5. Mount c0t0d0s0 into /tmp/slice0:
# mount /dev/dsk/c0t0d0s0 /tmp/slice0

6. Verify the status of the tape drive:
# mt status

If the tape drive is not detected, issue the following command:
# devfsadm -c tape
or
# drvconfig
# tapes
# devlinks

Verify the status of tape drive again and make sure the backup tape is in the first block or file number is zero. Use the following command to rewind the backup tape:
# mt rewind

7. Go into the /tmp/slice0 directory and you can start restoring the OS.
# cd /tmp/slice0
# ufsrestore rvf /dev/rmt/0n

If you want to restore from another disk (such as c0t1d0s0), use the following command:
# mkdir /tmp/backup
# mount /dev/dsk/c0t1d0s0 /tmp/backup
# ufsdump 0f - /tmp/backup | (cd /tmp/slice0;ufsrestore xvf -)

8. After restoring all the partitions successfully, install bootblock to make the disk bootable. This example assumes your /usr is located inside the "/" partition:
# cd /tmp/slice0/usr/platform/'uname -m'/lib/fs/ufs
# installboot bootblk /dev/rdsk/c0t0d0s0

9. To finish restoring your OS, reboot the system.

Example:
To create full dump of a root fs on c0t3d0, on 150MB tape unit 0, use:
example# ufsdump 0cfu /dev/rmt/0 /dev/rdsk/c0t3d0s0

To make and verify an incremental dump at level 5 of the usr partition of c0t3d0, on a tape unit 1,
example# ufsdump 5fuv /dev/rmt/1 /dev/rdsk/c0t3d0s6

Solaris NIC type

The types of Device and Network Interfaces

hme - SUNW,hme Fast-Ethernet device
driverbge - SUNW,bge Gigabit Ethernet driver for Broadcom
BCM5704ce - Cassini Gigabit-Ethernet device driver
dmfe - Davicom Fast Ethernet driver for Davicom
DM9102Adnet - Ethernet driver for DEC 21040, 21041, 21140 Ethernet
cardselx - 3COM EtherLink III Ethernet device
driverelxl - 3Com Ethernet device driver
eri - eri Fast-Ethernet device
driverge - GEM Gigabit-Ethernet device driver
ieef - Intel Ethernet device
driverle - Am7990 (LANCE) Ethernet device driver
pcelx - 3COM EtherLink III PCMCIA Ethernet
Adapterpcn - AMD PCnet Ethernet controller device
driverqfe - SUNW,qfe Quad Fast-Ethernet device driver
sk98sol - SysKonnect Gigabit Ethernet SK-98xx device
driverspwr - SMC EtherPower II 10/100 (9432) Ethernet device driver

Control-M Connect:Direct

Configuration directory: /local/bin/cdunix/ndm/cfg/
Configuration Files: netmap.cfg
Userfile.cfg
Receiving server:
Sending Server:


Steps for Processing Connect: Direct Request
* Receive request to add a user mapping.

At RECEIVING SERVER
1. Login to the Receiving server
a.)Go to the connect direct configuration directory: /local/bin/cdunix/ndm/cfg/

2. Check NETMAP.CFG file – to map remote system.
a.) Is the sending server information added to the netmap.cfg?
b.) If yes then do nothing and exit
else
(Get all the info from the previous server and change the following values:
b.1.) Node name - it is the same at the server name, usually at the top of the values.
b.2.) comm.info – This is the ip address of the sending server.}

3. At USERFILE.CFG file – to map remote user to the local user
user2@:\ #Remote user @Remote system
:local.id=user2:\ #Local user
:descrip=:

Add the local users with the values
user2:\
:admin.auth=n:\
:cmd.chgproc=y:\
:cmd.delproc=y:\
:cmd.flsproc=y:\
:cmd.selproc=y:\
:cmd.submit=y:\
:cmd.selstats=y:\
:cmd.stopndm=n:\
:cmd.trace=n:\
:pstmt.copy=y:\
:pstmt.runjob=y:\
:pstmt.runtask=y:\
:pstmt.submit=y:\
:snode.ovrd=y:\
:pstmt.copy.ulimit=y:\
:pstmt.upload=y:\
:pstmt.upload_dir=:\
:pstmt.download=y:\
:pstmt.download_dir=:\
:pstmt.run_dir=:\
:pstmt.submit_dir=:\
:name=:\
:phone=:\
:descrip=:


B) SENDING SERVER
. Login to the sending server
. su – user2#local user.
. Set the connect direct environment: # . /local/etc/cdunix/cdunixenv
. Create the process file: test.cd

E.g.
user2@ $ cat test.cd
test process snode=

step01: copy from (file=/local/users/user2/whatevername.tst pnode) to (file=SNAZU1.GOOF snode disp=new)

· Run the command to start the Direct application:
user2@ $ direct

********************************************
* CONNECT:Direct for UNIX *
*-----------------------------------------------------------*
* Copyright (c) 1983, 1997 Sterling Commerce, Inc. *
* Version 3.1.00 GA *
********************************************

Enter a ';' at the end of a command to submit it. Type 'quit;' to exit CLI.

Submit the process
Direct> submit file=/local/users/user2/test.cd;
Process Submitted, Process Number = 1036

Check the status of the process
Direct> sel stat pnum=1036;
===============================================================================
SELECT STATISTICS
===============================================================================
P RECID LOG TIME PNAME PNUMBER STEPNAME CCOD FDBK MSGID
E RECID LOG TIME MESSAGE TEXT
-------------------------------------------------------------------------------
P PSTR 06/13/2005 05:05:40 test 1036 0 XSMG200I
P CTRC 06/13/2005 05:05:40 test 1036 step01 0 SCPA000I
P PRED 06/13/2005 05:05:40 test 1036 0 XSMG252I
===============================================================================
Select Statistics Completed Successfully.

Note:-if the ccod is any other number than 0{zero} then the transfer is not successful.
E.g.

Direct> sel stat pnum=1035;
===============================================================================
SELECT STATISTICS
===============================================================================
P RECID LOG TIME PNAME PNUMBER STEPNAME CCOD FDBK MSGID
E RECID LOG TIME MESSAGE TEXT
-------------------------------------------------------------------------------
P PSTR 06/13/2005 05:01:35 test 1035 0 XSMG200I
P CTRC 06/13/2005 05:01:35 test 1035 step01 8 XCPR014I
P PRED 06/13/2005 05:01:35 test 1035 8 XCPR014I
===============================================================================
Select Statistics Completed Successfully.
Direct>quit;
Direct> sel stat pnum=1035 detail=yes; <----For a Detailed output on the status :

# /local/bin/cdunix/work/hostname/ <-----Log files location

Wednesday, January 16, 2008

Tivoli TSM

# lslpp -l tivoli* <-- To check TSM version and installed fileset on MC TSM client
Path: /usr/lib/objrepos
tivoli.tivguid 1.1.0.0 COMMITTED IBM Tivoli GUID on AIX
tivoli.tsm.client.api.64bit 5.2.0.0 COMMITTED TSM Client - 64bit API
tivoli.tsm.client.ba.64bit.base 5.2.0.0 COMMITTED TSM Client - Backup/Archive Base
tivoli.tsm.client.ba.64bit.common 5.2.0.0 COMMITTED TSM Client-Backup/ArchiveCommon
tivoli.tsm.client.ba.64bit.web 5.2.0.0 COMMITTED TSM Client - Backup/Archive WEB
tivoli.tsm.tdpr3.ora.64bit 3.3.2.0 COMMITTED Data Protection for SAP
Path: /etc/objrepos
tivoli.tivguid 1.1.0.0 COMMITTED IBM Tivoli GUID on AIX


TSM Backup/Archive Client Config Files
* v3.x systems: /usr/lpp/adsm/bin/dsm.sys and /usr/lpp/adsm/bin/dsm.opt
* v4 system: /usr/tivoli/tsm/client/ba/bin/dsm.sys & dsm.sys

TSM Scheduler logs
· Directory: /local/etc/tsm/schedule_log
· schedlogname: /var/adm/dsmsched.log <---- EU installation
· errorlogname: /var/adm/dsmerror_log <----EU installation
· inclexcl: /usr/tivoli/tsm/client/ba/bin/inclexcl (AIX)
· inclexcl: /opt/tivoli/tsm/client/ba/bin/inclexcl (Solaris)
· dsm.sys: /usr/tivoli/tsm/client/ba/bin/dsm.sys <--Backup param
· dsm.opt: /usr/tivoli/tsm/client/ba/bin/dsm.opt

/local/etc/tsm/bin/dsm.opt <---specify client processing options


dsm.sys
· dsm.sys - Used to specify one/more servers to contact for services, and communications options for each server. This file can also include authorization options, backup and archive processing options, and scheduling options.
· Example
$more /usr/tivoli/tsm/client/ba/bin/dsm.sys
/local/etc/tsm/bin/dsm.sys <---which refer to schedule_log and inclexcl
* dsm.sys file V 1.0 01/05/2001
Servername ICB0008_TSM
TCPPort 1500
TCPServeraddress icb0008
TCPWindowsize 640
TCPBuffsize 512
TXNBytelimit 2097152
schedmode prompted
schedlogretention 5
schedlogname /local/etc/tsm/schedule_log
inclexcl /local/etc/tsm/inclexcl/inclexcl
tcpnodelay YES
passwordaccess generate
SCHEDLOGRetention 7
schedlogname /var/adm/dsmsched.log
errorlogname /var/adm/dsmerror_log
inclexcl /usr/tivoli/tsm/client/ba/bin/inclexcl (AIX)
inclexcl /opt/tivoli/tsm/client/ba/bin/inclexcl (Sol)

dsm.opt
· dsm.opt / inclexcl – – used to specify client processing options, including the TSM server to use for filesystem backups.
· Example: /usr/tivoli/tsm/client/ba/bin/dsm.opt
/local/etc/tsm/bin/dsm.opt
...
SERVERNAME icb0008_TSM
tapeprompt no
subdir yes

inclexcl
· to include/exclude a specific file or groups of files from backup services, and to assign specific management classes to files. Tivoli Storage Manager backs up any file that is not explicitly excluded. Because Tivoli Storage Manager processes your include-exclude list from the bottom of the list up, it is important to enter all your include-exclude statements in the proper order. You can use the query inclexcl command to display a list of include and exclude statements in the order they are examined
· /local/etc/tsm/inclexcl/inclexcl
By default, all data is backed up to the default management class. The inclexcl file can be used to:
1.Exclude files from backup.
2.Backup files to a different management class
· Example:
root@icb0044 # dsmc q inclexcl
*** FILE INCLUDE/EXCLUDE ***
Mode Function Pattern (match from top down) Source File
---- --------- ------------------------------ -----------------
--snip--
Excl All /usr/sap/???/.../data/ROLLFL?? /local/etc/tsm/inclexcl/inclexcl
Excl All /usr/sap/???/.../data/PAGFIL?? /local/etc/tsm/inclexcl/inclexcl
Excl All /usr/sap/tmp/.../* /local/etc/tsm/inclexcl/inclexcl
Incl All /usr/sap/trans/.../* /local/etc/tsm/inclexcl/inclexcl
Incl All /usr/sap/.../* /local/etc/tsm/inclexcl/inclexcl
Incl All /oracle/???/????log?/.../cntrl???.dbf /local/etc/tsm/inclexcl/inclexcl
Incl All /oracle/???/sapdata*/.../cntrl???.dbf /local/etc/tsm/inclexcl/inclexcl
Excl All /oracle/stage/.../* /local/etc/tsm/inclexcl/inclexcl
Excl All /oracle/???/mirrlog?/.../* /local/etc/tsm/inclexcl/inclexcl
Excl All /oracle/???/origlog?/.../* /local/etc/tsm/inclexcl/inclexcl
Excl All /oracle/???/sapdata*/.../* /local/etc/tsm/inclexcl/inclexcl
Excl All /oracle/???/saparch/*.dbf /local/etc/tsm/inclexcl/inclexcl
Incl All /sapmnt/???/???JOBLG/.../* /local/etc/tsm/inclexcl/inclexcl
Incl All /local/backup/sap/logs/* /local/etc/tsm/inclexcl/inclexcl
Excl All /unix /local/etc/tsm/inclexcl/inclexcl

TSM Scheduler logs (/local/etc/tsm/schedule_log)

· The client scheduler logs are located in /local/etc/tsm/schedule_log* or in the file specified in the schedulogname parameter in the dsm.sys file.
· The scheduler log contains the messages from all events scheduled from the TSM Server, which is generally the filesystem backups.
· For MegaCentre, the scheduler logs are rotated daily to reduce the size of the file that is appended to during filesystems backups. The scheduler log only contains information about scheduled backups. It does NOT contain information about dsmc commands entered interactively (e.g. dsmc incr). The file should be examined when working on filesystem backup failures.
11/23/03 04:18:10 ANS1312E Server media mount not possible
11/23/03 04:18:10 Retry # 2 Normal File--> --snip-- ** Unsuccessful **
11/23/03 04:18:12 --- SCHEDULEREC STATUS BEGIN
11/23/03 04:18:12 Total number of objects inspected: 70,058
11/23/03 04:18:12 Total number of objects backed up: 212
11/23/03 04:18:12 Total number of objects updated: 0
11/23/03 04:18:12 Total number of objects rebound: 6,421
11/23/03 04:18:12 Total number of objects deleted: 0
11/23/03 04:18:12 Total number of objects expired: 51
11/23/03 04:18:12 Total number of objects failed: 5
11/23/03 04:18:12 Total number of bytes transferred: 111.96 MB
11/23/03 04:18:12 Data transfer time: 85.86 sec
11/23/03 04:18:12 Network data transfer rate: 1,335.24 KB/sec
11/23/03 04:18:12 Aggregate data transfer rate: 107.61 KB/sec
11/23/03 04:18:12 Objects compressed by: 0%
11/23/03 04:18:12 Elapsed processing time: 00:17:45
11/23/03 04:18:12 --- SCHEDULEREC STATUS END
11/23/03 04:18:12 ANS1312E Server media mount not possible
11/23/03 04:18:12 --- SCHEDULEREC OBJECT END FS_BACKUP_1 11/23/03 04:00:00
11/23/03 04:18:12 ANS1512E Scheduled event 'FS_BACKUP_1' failed. Return code = 12.
11/23/03 04:18:12 Sending results for scheduled event 'FS_BACKUP_1'.
11/23/03 04:18:12 Results sent to server for scheduled event 'FS_BACKUP_1'.


TSM Inactive Files
· Uique feature of TSM when performing regular filesystem backups: active vs. inactive files.
· TSM considers the most recent backup version to be the active version. The most recent backup version is considered an inactive version if the file was deleted or excluded at the time the last incremental backup was run. Any other backup version is considered an inactive version.
· When performing restores, you must specify inactive to restore any inactive files. By default, all TSM restore and query commands assume the files are active.
· Command Line: #dsmc –ina active ...
· WEB/GUI: View ---> Select “active and inactive files”


TSM Backup/Archive Client
Sample dsmc restore/retrieve Commands
Command Remark
# dsmc restore /tmp/file.to.restore Restore the active version of an individual file to its original location
# dsmc restore -pick –ina \ /oracle/DC0/saparch/archDC0.log Use the pick option to select a particular version of an inactive file to restore
# dsmc restore “filename*” restore the latest backup version of a filename with a wildcard character
# dsmc restore filename newfilename restore the latest backup version of a file back to a renamed file or different location
# dsmc restore -ina –pick -replace=prompt - \ subdir=yes directory/ newdirectory/ restore an inactive version of a directory with a pickllist and rename (directories must end in a /)
#dsmc restore -subdir=yes -pitdate=MM/DD/YYYY \ - pittime=15:00 directory/ restore an directory to a particular point in time (directories must end in a /)
NOTEIf you need to restore a file that was backed up with the “archive” function, you would use the “dsmc retrieve” command. It has similar options to the “dsmc restore” command.
#dsmc archive directory/ -subdir=yes - \ archmc=db_online_1 -desc="save before restore“ archive a directory (e.g. before a restore)
#dsmc help Access dsmc help menus

Sample dsmc backup/query Commands


# dsmc incr <---incremental backup of the entire system
# dsmc incr /local/logs/brreports/scripts/<---incr. backup of one dir( end with /)
# dsmc selective /local/logs/brreports/scripts/ selective (full) backup of one directory (directories must end in a /)
# dsmc q fi query filesystems to see last successful backup
# dsmc q sched query to see when next scheduled backup runs
#dsmc q backup -ina \ /local/backup/image/bos.obj.icb0006 #dsmc q backup -ina \ “/local/backup*/image*/bos.obj.icb0006” query to see all versions of a backed up fileUse “ “ if there is a wild card entry in the files that we want to query.
# dsmc q inclexcl query to display the files included/excluded

NOTE
can also archive files with the dsmc archive command.
Archives are retention based instead of version based.to be added.


Example
====================================================================
1. 06:00 17th August Time- Restore of files from the oldest available until 31 Dec 2004
tsm> restore -inactive subdir=yes -todate=12/31/2004 -fromowner=cdusr02 "/local/data/archive/*" /restore_temp/

2. 06:00 18th August Time- Restore of files from 31st Dec 2004 until 30th June 2005
tsm> restore -inactive subdir=yes -fromdate=12/31/2004 -todate=06/30/2005 -fromowner=cdusr02 "/local/data/archive/*" /restore_temp/

3. 06:00 19th August Time- Restore of files from 30th June 2005 until 1st Jan 2006
tsm> restore -inactive subdir=yes -fromdate=06/30/2005 -todate=01/01/2006 -fromowner=cdusr02 "/local/data/archive/*" /restore_temp/
====================================================================
The destination (/restore_temp/) is created in such a way;
as it was found out from testing that TSM will create only 1 parent directory from the asterisk (*) specified in the source (/local/data/archive/*) parameter.


check for backup file (date format mm/dd/yyyy)
#dsmc query backup "/local/pbridge/data/acq_file_20" -fromdate=08/14/2005 -todate=08/14/2005 -inactive

restore file acq_file_20 with new name acq_file_20_aug14 at directory /local/pbridge/data/

#dsmc restore -fromdate=08/14/2005 -todate=08/14/2005 -inactive "/local/pbridge/data/acq_file_20" /local/pbridge/data/acq_file_20_aug14




TSM Central Scheduler
for scheduling TSM Administrative commands and for all Filesystem backups.
What can be scheduled :
• Client commands (Backup / restore)
• Administrative commands.

Sample Filesystem Backup Schedule

tsm: ICB0008_TSM>q sched
Domain * Schedule Name Action Start Date/Time Duration Period Day
------------ - ---------------- ------ -------------------- -------- ------ ---
DOM_SAP FS_BACKUP_1 Inc Bk 08/28/01 04:00:00 4 H 1 D Any
DOM_UNIX FS_BACKUP_1 Inc Bk 09/27/01 22:30:00 2 H 1 D Any

tsm: ICB0008_TSM>q assoc
Policy Domain Name: DOM_SAP
Schedule Name: FS_BACKUP_1
Associated Nodes: ICB0001 ICB0003 ICB0004 ICB0006 ICB0008 ICB0009 ICB0010 ICB0011 ICB0015 ICB0016 ICB0017 ICB0018 ICB0030 ICB0031 ICB0032 ICB0033 ICB0034 ICB0035 ICB0036 ICB0037 ICB0038 ICB0039 ICB0040 ICB0041 ICB0042 ICB0043 ICB0044 ICB0045 ICB0046 ICB0118 ICB0119

Policy Domain Name: DOM_UNIX
Schedule Name: FS_BACKUP_1
Associated Nodes: HOUICBUX1003 HOUICBUX1004 HOUICBUX1005 HOUICBUX1006 HOUICBUX1007 HOUICBUX1008 HOUICBUX1009 HOUICBUX1010 HOUICBUX1011 HOUICBUX1012 HOUICBUX1014 HOUICBUX1015 HOUICBUX1016


Support problems
“dsmc sched” not running
Restart scheduler either via host specific method (check boot method) or /local/backup/sap/tsm/scripts/TSMclient_Start
Verify that scheduler is active: ps -aef|grep sched


Correcting Filesystem Backup Failures
#su - root
#ps –ef | grep sched <--check tsm scheduler
#dsmc q fe
#dsmc q fi
#dsmc q se <--- no password prompt, then continue. ELSE please correct it
#dsmc q se
ok>



TSM Retention Periods
As per requirement of an individual clients/ default standard for the org.

TSM Client Daemon Start
AIX:Usually in /local/etc/scripts/rc.local
For example:
nohup /usr/tivoli/tsm/client/ba/bin/dsmc sched -password=`hostname` 1> /dev/null 2>&1 &
(or it may execute the TSMclient_Start script)

Solaris:
/etc/rc3.d/S30tivoli
nohup dsmc sched -optfile=dsm.opt2 1> /dev/null 2>&1 &

NIS

NIS (Network Information System)
*Provides central management of users, groups, email aliases, hostnames, MAC address mappings, RPC/port service lookups etc.
Exploring NIS Maps
#ypwhich<--- Verify domain binding

#ypwhich –m <---- Shows maps available on domain.
#ypcat <--- Show text format of map.
#ypcat –k netgroup <--- will show the key in addition to the data.

#ypcat -x >---will show aliases available for maps.

Automount Master Map
*Config file is /etc/auto.master or /etc/auto_master, used to start automount processes to monitor mount points.
Example:
# cat /etc/auto.master
/misc /etc/auto.misc

The indirect directory to watch is /misc. The details about what resources to mount under /misc is contained in /etc/auto.misc.

# /etc/init.d/autofs start
# ps -ef | grep automount
root 2050 1 0 21:22 pts/1 00:00:00 /usr/sbin/automount /misc file /etc/auto.misc


Automount


The automount process is started with a directory to watch and a map of resources to manage under the mount point (by default, mounts expire after 5 minutes of inactivity).

Indirect maps:
*Names of directories under the master mount point being watched.
*Mounting options.
*Resource to mount.
*Example: Indirect auto.misc
# cat /etc/auto.misc
cd -fstype=iso9660,ro :/dev/cdrom
emacs -r bogus.host.com:/emacs

Direct maps (not in Linux):
*Fully qualified mount points.
*Mounting options.
*Resource to mount.


NIS and automount
*automount can facilitate a common network directory through NFS.
*The NIS network directories will correspond to an indirect map and mount point.
*The Master map and associated indirect maps can be pushed through NIS


NIS auto.master


$ ypcat -k auto.master
/home auto.home

$ ypcat -k auto.home
* cg1:/home/& <--* matches any directory reference under /home (indirect dir)
<--& used to substitute the key in the target mount.

Setting Up an NIS Client
# domainname ten.nis
# vi /etc/yp.conf
ypserver 192.168.1.98
# vi /etc/nsswitch.conf
passwd: compat
group: compat

Others to look at: automount, hosts, ethers, networks, aliases. Use compat if you want simulate typical Unix behavior, mandating the inclusion of "+/-" lines to /etc/passwd, /etc/group. Use files nis to avoid having to use "+/-" lines, but lose the ability to restrict NIS authentication.
# ps -ef | grep portmap

Verify portmap is running.
# ypbind
# ypwhich
192.168.1.98
# ypcat passwd
ccox:ZBaMuOdCZStAE:500:10:Chris Cox:/home/ccox:/bin/ksh
# /etc/init.d/autofs start <--Start if not running

Common NIS Maps
You can see the maps being advertised/pushed from the Master with ypwhich -m.
$ ypwhich -m
netid.byname server1
passwd.byuid server1
services.byname server1
services.byservicename server1
auto.home server1
netgroup server1
passwd.byname server1
group.byname server1
netgroup.byuser server1
netgroup.byhost server1
group.bygid server1
ypservers server1
rpc.byname server1
auto.master server1

Note: There is no passwd map, but rather are two passwd maps, one keyed byname and one keyed byuid. The passwd map is a alias for passwd.byname.

Setting up NIS Master
# domainname ten.nis
# /usr/lib/yp/ypinit -m
# ypserv <----optionally, can join this domain as a client, use ypbind instead.
# rpc.yppasswdd -D /etc
# /usr/lib/yp/ypxfrd <----need this if you support NIS Slaves.

Note: ·-D option to yppasswdd specifies the directory containing the original source passwd for the passwd.* maps.


Updating Maps


# useradd -m newuser
# passwd newuser
# ypcat passwd | grep newuser
# cd /var/yp
# make
updated passwd
pushed passwd
# ypcat passwd | grep newuser
newuser:axPwTTAWjfk/Y:4448:4444:/home/newuser:/bin/ksh


General NIS Problems
. ypcat to view maps, can see encrypted password strings in clear text.
· rpc is insecure
· No /etc/shadow map support, so no password aging
· Clients can hang on boot if NIS Server not available.

NIS Confusion
· Originally, NIS was designed to handle host resolution, however with DNS, pushing an NIS host map is redundant and can create consistency problems. Solution: Do not push a host map, let host resolution to use DNS instead.
* May have to run ypserv with the -b option.
* Using NIS domain the same as the Internet domain name. This causes confusion, generally not recommended today.

NIS+
· Sun’s upgrade to NIS
o Secure rpc support.
o Password aging.
o Better replication support for servers.
o Very granular security features.


NIS Security - sort of

# /var/yp/securenets
#
# allow connections from local host -- necessary
host 127.0.0.1
# same as 255.255.255.255 127.0.0.1
255.255.255.0 192.168.1.0
# Allow anyone in the 192.168.1.0 net.