netbackup tips

23

Click here to load reader

Upload: godwinjva

Post on 23-Nov-2014

152 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Netbackup Tips

Netbackup Tips

Glossary

Term Definition

CLI Command Line Interface

GUI Graphical User Interface

Media Server

Master Server

Starting and Stopping Netbackup

Stopping Netbackup /usr/openv/netbackup/bin/K77netbackup    --> graceful shutdown /usr/openv/netbackup/bin/bpps -a   --> check for any remaining processes /usr/openv/netbackup/bin/goodies/bp.kill_all   --->  kills all remaining netbackup processes, not

necessarily graceful /usr/openv/netbackup/bin/bpps -a   --> check for any remaining processes kill -9 <pid>  for any remaining.   NOTE:  unkillable processes may require a reboot

Starting Netbackup /usr/openv/netbackup/bin/S77netbackup  --> after bp.kill_all, to restart

Common Tasks

Starting the Administration GUI java from the windows client  x-windows from the server - /usr/openv/netbackup/bin/xnb &

Checking Backup Status Activity Monitor or /usr/openv/netbackup/bin/admincmd/bpdbjobs -report

Cleaning a tape manually Identify the drive name to be cleaned

o tpclean -L Manually clean the drive:

o tpclean -C <drive name>

Determining what tapes were used for a backup GUI

o Backup and Restore --> Find the file system --> Preview Media Button CLI

o Find the correct backup images bpimagelist -U -client <CLIENT> -d <STARTDATE> -e <ENDDATE>

o Find the media used for those images bpimagelist -U -client <CLIENT> -d <STARTDATE> -e <ENDDATE> -media

Listing the files in a backup

Find the tape(s) used (above procedure using bpimagelist)cd /usr/openv/netbackup/db/jobs/doneRun the following script and redirect it's output to a text file:        for file in `grep MOUNTING *|grep <MEDIA_ID>|awk '{print $1}'|sed 's/:MOUNTING//'`        do        echo $file         grep PATH_WRITTEN $file|awk '{print $3}'

Page 2: Netbackup Tips

        echo " "        echo "==========================================End of Image======================================"        echo " "        done

This process works for NBU V3.4: cd /usr/openv/netbackup/db/images/<CLIENT> ls -ltr  -->  this will identify the directory with the proper date verify directory with "bpdbm -ctime <Unixtime> cd <Unixtime> ls -ltr --> lists all of the backups for this client on this date cat <POLICY>_<Unixtime>_<BU Type>.f | awk '{print $10}'  --> this prints out the files in the backup

For NBU > V3.4 bpflist  --help   --> undocumented netbackup command to list files from a binary .f file

Inventory the Robot Inventory Robot  -->  /opt/openv/volmgr/bin/vmcheckxxx -rt robot_type -rn robot_number -list  (where

robot_type is tld, acs, . . .) Inventory Robot and Update Configuration -->  /opt/openv/volmgr/bin/vmupdate -rt robot_type -rn

robot_number -list  (where robot_type is tld, acs, . . .)

Listing Properties of the Volume Pools vmpool -listall

Scratch Tapes Count scratch tapes:  /usr/openv/volmgr/bin/vmquery -pn Scratch | grep -c "robot slot" Moving tapes to the scratch pool

o If Needed - Expire the tape bpexpdate -ev <TAPE ID> -d 0 -force -host <Media Manager>

o Move the tape vmchange -p 2 -m <TAPE ID>

Checking Drive Usage /usr/openv/volmgr/bin/vmoprcmd

Taking a drive down or up /usr/openv/volmgr/vmoprcmd -down <drive index> /usr/openv/volmgr/vmoprcmd -up <drive index> /usr/openv/volmgr/vmoprcmd –d (to see the status)

Performing a Restore From the GUI

o user backup & restore --> configuration --> client o user backup & restore --> configuration --> client to restore o directory to search o directory depth o date range o file --> browse backups for restore

Adding New Tapes to the Library Using the GUI

o Media Management --> Actions --> New --> Single Volume . .  --> o Media Type (ie DLT) o Robot Type (ie TLD) o Media ID (from Inventory)

Page 3: Netbackup Tips

o Slot Number (from Inventory) o Robot Number (ie 0) o Volume Group o Volume Pool (ie Scratch)

Using the CLI o vmadd -m <media id> -mt <tape type> -verbose -rt <robot type> -b <barcode> -rn <robot

number> -rc1 <slot> -p <pool number> -mm <max mounts> vmpool -listall  --> lists all pools, both name and number

o For example:  vmadd -m 000151 -mt dlt -verbose -rt tld -b 000151 -rn 0 -rc1 8 -p 2 -mm 0

Re-using Tapes from other systems or older Netbackups Expire the media

o bpexpdate -ev MEDIA_ID -d 0 -force -host HOST Deassign the media

o  vmquery -deassignbyid MEDIA_ID 4 0 Move to the scratch pool

o  vmchange -m MEDIA_ID -p POOL# Relabel the media

o bplabel -ev CIM572 -d dlt -p Scratch

Changing the attributes of media Changing the barcode

o vmchange -barcode CYM100D -m CYM100 Changing the Volume Pool

o vmchange -m MEDIA_ID -p POOL#

To expire media bpexpdate -ev <medai id> -d 0 -force -host <media server>

To unfreeze media List the frozen media

o /usr/openv/netbackup/bin/goodies/available_media | grep -i FROZEN Unfreeze the media

o bpmedia -unfreeze -ev <media id> -h <media server>

To relabel a tape bplabel -ev <media id> -d <tape density> -p <pool name> bplabel -ev 000687 -d dlt -p TriVrgt_OFFSITE

To remove media from the Netbackup database Verify that there are no images on the tape

o bpimmedia -mediaid 000687 -L Expire the tape

o bpexpdate -ev 000687 -d 0 -host scorpius -force Get the status and pool number of the tape

o vmquery -m 000687 Deassign the tape

o vmquery -deassignbyid <media id> <pool number> <status code from vmquery -m>o vmquery -deassignbyid 000687 4 0x0

Delete the tape o vmdelete -m 000687

Installing the Netbackup Client /update_clients -ForceInstall -ClientList /tmp/clients.lst

o requires that TMPDIR and TEMPDIR be set correctly

Excludng files from backup on a client Create /usr/openv/netbackup/exclude_list Put the file specifications of the files/directories to be excluded

Page 4: Netbackup Tips

o /mnt/directory/*

Displaying Information about a Tape vmquery -m <media id>   --> Displays attributes about a particular tape bpmedialist -U -mcontents -ev 000687   --> Displays media contents bpmedialist -U -mlist  --> List of all media  bpmedialist -U -mlist -ev CYM966  --> Listing of a particular media id  bpimmedia -mediaid 000687 -L   --> Listing of images on a tape

Robtest Commands

Starting robtest o robtest o 1  --> to select TLD 0

Getting help o ?

Looking at contents of the tape drives o s d

Looking at the contents of the library o s s

Moving a tape from a drive to a library slot o s d  --> to identify drive number that has tape (Contains Cartridge = yes, Barcode=XXXXXX) o s s  --> to identify an empty slot in the tape library (Netbackup will need to be re-inventoried) o m d# s#  --> from from drive # to slot # o s d  --> verify the tape drive is empty o s s --> verify the library slot has the tape

Configuration Files

/usr/openv/netbackup/bp.conf configuration file, sets backup server and backup clients force statement must be correct client to browse from client to restore to

/usr/openv/volmgr/vmconf

Logfiles

To utilize logfiles, create the corresponding directory in /usr/openv/netbackup/logs

Server Logfile directories: admin - adminstrative commands bpbrm - backup and restore manager bpcd - client daemon bpdbjobs - database manager program process bpdm - disk manager process bpjava-msvc - Java application server authentication service bpjava-usvc - process that services Java requests bprd - request daemon process bpsched - scheduler process that runs on master servers bptm - tape/optical media management process user-ops - required directory for use by Java programs xbpadm - X based administration utility xbpmon - X based job monitor process

Client Logfile directories: bp - client user interface process bparchive - archive program bpbackup - backup program

Page 5: Netbackup Tips

bpbkar - program that generates golden images bpcd - client daemon bpjava-msvc - Java application server authentication service bpjava-usvc - process that services Java requests bplist - program that lists backed up and archived files bpmount - program that determines local mountpoints  and wildcard expansion for multiple streams bphdb - Oracle database backup program start process db_log - database specific extension log tar - tar process log during restores user_ops

Media Manager logging automatically goes to the system log using syslogd logging facility

.Logging will only occur if these directories are created.  These directories will generate a lot of data and should be deleted when no longer necessary.

To increase the amount of logging information set VERBOSE=2 in /usr/open/netbackup/bp.conf  (default is VERBOSE=1)

Processes

ltidacsdvmd

Useful Commands

bpcllist - list classesbpclinfo <class> -L   --> displays info about a classvmpool - volume poolsvmpool -listallvmpool -listscratchbplabel -ev <media id> -d hcartbpbackup db  --> backs up the catalogbpclclients <policy>  --> lists the clients for a particular policy (class)

Troubleshooting

bperror -statuscode   <-- displays information about the  netbackup error.

No Backups are running: Check system log file for error messages Stop and restart all the netbackup processes Look for a downed drive

o /usr/openv/volmgr/bin/vmoprcmd o /usr/openv/volmgr/bin/vmoprcmd -up 0   --> this will bring up drive 0 if it's control shows as

down Look for pending requests

o /usr/openv/volmgr/bin/vmoprcmd or gui --> device managemento If there is a pending request either re-assign it to a drive, or deny the request

Downed drive does not come back up or does not stay up Check for a hardware problem by looking for messages on the tape library Make sure there is not a tape stuck in the drive

o Use robtest (described above) to look at the drives If there is a tape stuck in the drive, try to remove it using robtest If robtest fails, then you must manually remove it.

Verify the Client is communicating properly: bpclncmd -ip  <ip address>  --> from both client and server bpclntcmd -hn <hostname>  --> from both client and server

Page 6: Netbackup Tips

bpclntcmd -pn    -->  from client only

Device Actions

Device Management --> info about tape drives dlt hcart (ultrium)

Media Actions

Media id must agree with # of the tapeCreate a media id

actions -->new-->single volume-->dlt cart (not dlt2) put it into the "netbackup" volume pool

Netbackup Client

To check things out do this:

It could be a couple things.  Mostly DNS, bp.conf, or something stupid.  Onthe client run this command

/usr/openv/netbackup/bin/bpclntcmd -pn

/usr/openv/netbackup/bin/bpclntcmd -server "server name"

/usr/openv/netbackup/bin/bpclntcmd ip "ip_address"

One of these usually fails and your able to fix it right off

1074  ./bpclntcmd -hn corpbu1 1075  ./bpclntcmd -ip 10.194.1.129 1076  ping 10.194.1.129 1077  ./bpclntcmd -hn corpldv1 1078  ./bpclntcmd -hn corpbu1.corporate.vox.net 1079  ping corpldv1 1080  ./bpclntcmd -ip 10.194.1.120

Must be able to resolve correctly from the master server and the client or it will not work!!!

Command to obtain the output of Backup jobs in Cli similar to CLI.

/usr/openv/netbackup/bin/admincmd/bpdbjobs -all_columns -M lbesx3db01|cut -d, -f1-34 | awk -F, '{print $1, $4, $5, $6, $7, $33, $15 }'

9961 0 lbesx3db01 19960 0 IWORLD_OS_TEST Daily lbesx3test01 / 1762828169959 0 IWORLD_OS_APP02 Daily lbesx3app02 / 135789449958 0 IWORLD_OS_APP01 Daily lbesx3app01 / 166298249957 0 IWORLD_OS Daily lbesx3db01 / 482413449956 0 DB01_BOBJ_DB Daily lbesx3db01 /dpp/BOBJ 2772169955 0 DB01_ARC_LOG Daily lbesx3db01 /arc/HOULIVE_archredo 21345929954 0 DB01_HOULIVE_DB Daily lbesx3db01 /dpp/HOULIVE 671300169953 0 lbesx3db01 1

Page 7: Netbackup Tips

9952 0 IWORLD_OS_TEST Daily lbesx3test01 / 176280640

bpdbjobs -all_columns -M lbesx3db01|cut -d, -f1-50 | awk -F, '{print $1, $4, $5, $6, $7, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70 }' > /tmp/list.txt

Netbackup Version

bpgetconfig –g server_name –L

root@lbs-soclive # bpgetconfig -g lbs-soclive -LClient/Master = MasterNetBackup Client Platform = Solaris, Solaris10NetBackup Client Protocol Level = 6.5.0Product = NetBackupVersion Name = 6.5Version Number = 650000NetBackup Installation Path = /usr/openv/netbackup/binClient OS/Release = SunOS 5.10

root@lbs-soclive # bpgetconfig -g lbscf-carestore -LClient/Master = Client of lbs-socliveNetBackup Client Platform = PC, Windows2000NetBackup Client Protocol Level = 6.5.0Product = NetBackupVersion Name = 6.5Version Number = 650000NetBackup Installation Path = C:\Program Files\Veritas6.5\NetBackup\binClient OS/Release = Windows2003 5root@lbs-soclive #

lbssocserv # bpgetconfig -g lbssocserv -LClient/Master = MasterNetBackup Client Platform = Solaris, Solaris8NetBackup Client Protocol Level = 6.0.0Product = NetBackupVersion Name = 6.0Version Number = 600000NetBackup Installation Path = /usr/openv/netbackup/binClient OS/Release = SunOS 5.8lbssocserv #lbssocserv # bpgetconfig -g icissun -LClient/Master = Client of lbssocservNetBackup Client Platform = Solaris, Solaris8NetBackup Client Protocol Level = 6.0.0Product = NetBackupVersion Name = 6.0Version Number = 600000NetBackup Installation Path = /usr/openv/netbackup/binClient OS/Release = SunOS 5.8lbssocserv #

Page 8: Netbackup Tips

Root @ lbesx3db01 #bpgetconfig -g lbesx3db01 -LClient/Master = MasterNetBackup Client Platform = Solaris, Solaris7NetBackup Client Protocol Level = 5.0.0.0.2.0Product = NetBackupVersion Name = 5.0GAVersion Number = 500000NetBackup Installation Path = /usr/openv/netbackup/binClient OS/Release = SunOS 5.9Root @ lbesx3db01 #Root @ lbesx3db01 #bpgetconfig -g lbesx3test01 -LClient/Master = Client of lbesx3db01NetBackup Client Platform = Solaris, Solaris7NetBackup Client Protocol Level = 5.1.0Product = NetBackupVersion Name = 5.1Version Number = 510000NetBackup Installation Path = /usr/openv/netbackup/binClient OS/Release = SunOS 5.9Root @ lbesx3db01 #Root @ lbesx3db01 #bpgetconfig -g lbe-sp-boxi-001 -LClient/Master = Client of lbesx3db01NetBackup Client Platform = PC, WindowsNTNetBackup Client Protocol Level = 5.0.0.0.2.0Product = NetBackupVersion Name = 5.0GAVersion Number = 500000NetBackup Installation Path = C:\Program Files\VERITAS\NetBackup\binClient OS/Release = WindowsNET 5Root @ lbesx3db01 #

Root_User @ NXSS-New #bpgetconfig -g NXSS-New -LClient/Master = MasterNetBackup Client Platform = Solaris, Solaris2.6NetBackup Client Protocol Level = 4.5.0Product = NetBackupVersion Name = 4.5GAVersion Number = 450000NetBackup Installation Path = /usr/openv/netbackup/binClient OS/Release = SunOS 5.8Root_User @ NXSS-New #

root@lnperpscs01 # ./bpgetconfig -g lnperpscs01 -LClient/Master = MasterNetBackup Client Platform = Solaris, Solaris7NetBackup Client Protocol Level = 5.0.0.0.4.1Product = NetBackupVersion Name = 5.0GAVersion Number = 500000NetBackup Installation Path = /usr/openv/netbackup/binClient OS/Release = SunOS 5.9root@lnperpscs01 #root@lnperpscs01 #root@lnperpscs01 #root@lnperpscs01 # ./bpgetconfig -g lnperpscs02 -LClient/Master = Media HostNetBackup Client Platform = Solaris, Solaris7NetBackup Client Protocol Level = 5.0.0.0.4.1Product = NetBackupVersion Name = 5.0GAVersion Number = 500000NetBackup Installation Path = /usr/openv/netbackup/bin

Page 9: Netbackup Tips

Client OS/Release = SunOS 5.9root@lnperpscs01 #root@lnperpscs01 #root@lnperpscs01 #root@lnperpscs01 # ./bpgetconfig -g lnperpscd01 -LClient/Master = Client of lnperpsvnbuNetBackup Client Platform = Solaris, Solaris7NetBackup Client Protocol Level = 5.0.0.0.4.1Product = NetBackupVersion Name = 5.0GAVersion Number = 500000NetBackup Installation Path = /usr/openv/netbackup/binClient OS/Release = SunOS 5.9root@lnperpscs01 #root@lnperpscs01 #root@lnperpscs01 # ./bpgetconfig -g lnperpscd02 -LClient/Master = Client of lnperpsvnbuNetBackup Client Platform = Solaris, Solaris7NetBackup Client Protocol Level = 5.0.0.0.4.1Product = NetBackupVersion Name = 5.0GAVersion Number = 500000NetBackup Installation Path = /usr/openv/netbackup/binClient OS/Release = SunOS 5.9root@lnperpscs01 #root@lnperpscs01 # ./bpgetconfig -g lnperpwag01 -LClient/Master = Client of lnperpsvnbuNetBackup Client Platform = PC, WindowsNTNetBackup Client Protocol Level = 5.0.0.0.2.0Product = NetBackupVersion Name = 5.0GAVersion Number = 500000NetBackup Installation Path = C:\Program Files\VERITAS\NetBackup\binClient OS/Release = WindowsNET 5root@lnperpscs01 #

888888888888888888888888888888888888888888888888888888888888888888888888888

Re: [Veritas-bu] Command to pull information

Heathe Kyle YeakleyWed, 28 Oct 2009 07:14:10 -0700I recently had to crunch some numbers for upper management for similar reasons. Here's how I did it. (This will mainly answer your volume question.)

Tabulate how much data you backed up across all policies in September.bpimagelist -U -d 09/01/2009 00:00:00 -e 09/30/2009 23:59:59 | awk '{ total += $5 } END { print total }'

Field 5 in bpimagelist output is the size in Kb of a particular entries backup. If you wanted to tabulate the volume of a specific policy: bpimagelist -U -policy <policy name> | awk '{ total += $5 } END { print total }'

You can do the same thing for a particular client:bpimagelist -U -client <client name> | awk '{ total += $5 } END { print total }'

And you can use the date parameters from the first example to print the volume of a particular client or policy within a certain time frame.

Example: Total amount, in kilobytes, for client foo during entire month of September:

Page 10: Netbackup Tips

bpimagelist -U -client foo -d 09/01/2009 00:00:00 -e 09/30/2009 23:59:59 | awk '{ total += $5 } END { print total }'

Example: Total amount, in kilobytes, for policy bar during entire month of September: bpimagelist -U -policy bar -d 09/01/2009 00:00:00 -e 09/30/2009 23:59:59 | awk '{ total += $5 } END { print total }'

To get a list of all your clients:bpplclients -allunique

To get a list of all your policies:bppllist

bpimagelist -client nxss-new -d 03/08/2010 19:00:00 -e 03/08/2010 23:59:59 | grep -i A000 |awk '{print $9 }'

date +%m/%d/%y

/usr/bin/date +%d-%b-%Y

Hope this helps. If anyone has a better way, I'm always up for learning new techniques.

Thanks.

- Heathe Kyle Yeakley

For a list of scheduled backups, you can use

/usr/openv/netbackup/bin/admincmd/nbpemreq -predict -date <mm/dd/yyyy>

Root_User @ NXSS-New #bpschedreq -predict 03/18/10 23:55:558 nxss-new Hot_Live_ColdDbs monthly FULL Thursday 21:30:00Root_User @ NXSS-New #bpschedreq -predict 03/21/10 23:55:558 nxss-new Sunday_Full_New monthly FULL Sunday 23:15:00

bpmedialist -summary -U| grep -i iwd|egrep '04/08/2010|04/09/2010|04/10/2010'- list of media with expiry dates

bpimagelist -A -media -hoursago 10 - o/p of media written in bpadm

bpimmedia -mediaid IWD046| grep -i monthly - to search for monthly schedules being backed up to the mentioned media

To view the list of files and directories saved under the mentioned path during the backup------------------------------------------------------------------bplist -b -l -R -s 09/05/2009 -e 09/05/2009 /spp/spool/HOULIVE/hou_output > /var/25June2010.txt

Page 11: Netbackup Tips

To view the files backedup overnightbpflist -client lbssocserv -d 04/14/2010 00:00:00 -e 04/14/2010 23:00:00bpflist -client lbssocserv -d 04/14/2010 00:00:00 -e 04/14/2010 23:00:00 |awk {'print $10}'

To cancel a backup job from CLIbpdbjobs | morebpdbjobs -cancel (31180)(jobid)

BPIMPORTThe bpimport command allows backups to be imported. This command is useful for importing backups that have expired or are from another NetBackup server.Netbackup does a 2 phase import :-

Step 1 is performed with the first form of the command shown above (-create_db_info option) and recreates catalog entries for the backups that are on the specified media. Step 2 is performed with the second form of the command shown above and imports the backups from the media.

Phase 1

bpimport -create_db_info -id <tape> -server lbssocserv -L /tmp/bpimport_<tape>.log i.e. bpimport -create_db_info -id W1001 -server lbssocserv -L /var/tmp/bpimport_W1001.log

Phase 2

bpimport -id <tape> -L /tmp/bpimport_<tape>_phase2.log bpimport -id W1001 -L /tmp/bpimport_W1001_phase2.log

Example :

lbssocserv # bpimport -create_db_info -id A00012 -server lbssocserv –L /tmp/import.phase1.log

lbssocserv # bpimport -st FULL -policy CareStore_Unix -pt Standard -client lbssocserv -id A00012

NBU_EXTENDED Commands Collected by Explorer

ls -larTR ${OPENVDIR}${OPENVDIR}/netbackup/bin/goodies/support${OPENVDIR}/netbackup/bin/goodies/support/support${OPENVDIR}/netbackup/bin/goodies/available_media${OPENVDIR}/netbackup/bin/admincmd/get_license_key -L features${OPENVDIR}/netbackup/bin/admincmd/get_license_key -L keys${OPENVDIR}/netbackup/bin/admincmd/bpconfig -U${OPENVDIR}/netbackup/bin/admincmd/bpsyncinfo -U

Page 12: Netbackup Tips

${OPENVDIR}/netbackup/bin/admincmd/bpgetconfig${OPENVDIR}/netbackup/bin/admincmd/bperror -U -all -d 01/30/00 00:00:00${OPENVDIR}/netbackup/bin/admincmd/bperror -U -media -d 01/30/00 00:00:00${OPENVDIR}/netbackup/bin/admincmd/bpcllist -allclasses -U${OPENVDIR}/netbackup/bin/admincmd/bpclclients${OPENVDIR}/netbackup/bin/admincmd/bpmedialist -U -mlist${OPENVDIR}/netbackup/bin/admincmd/bpmedialist -summary${OPENVDIR}/netbackup/bin/admincmd/bpmedialist -summary -brief${OPENVDIR}/netbackup/bin/admincmd/bpimmedia -U${OPENVDIR}/netbackup/bin/admincmd/bpimagelist -A -d 01/30/00 00:00:00${OPENVDIR}/netbackup/bin/admincmd/bpimagelist -A -media -d 01/30/00 00:00:00${OPENVDIR}/netbackup/bin/admincmd/bpconfig -U${OPENVDIR}/netbackup/bin/admincmd/bpsyncinfo -U${OPENVDIR}/netbackup/bin/admincmd/bpgetconfig${OPENVDIR}/netbackup/bin/admincmd/bpdbjobs -report${OPENVDIR}/netbackup/bin/admincmd/bpdbjobs -summary${OPENVDIR}/netbackup/bin/admincmd/bpstulist -U -verbose${OPENVDIR}/netbackup/bin/bpps -a${OPENVDIR}/netbackup/bin/bpclimagelist${OPENVDIR}/volmgr/bin/vmquery -a${OPENVDIR}/volmgr/bin/vmquery -a -bx${OPENVDIR}/volmgr/bin/vmquery -a -w${OPENVDIR}/volmgr/bin/vmpool -listall${OPENVDIR}/volmgr/bin/vmrule -listall${OPENVDIR}/volmgr/bin/tpclean -L${OPENVDIR}/netbackup/bin/admincmd/bppllist -allpolicies -U${OPENVDIR}/netbackup/bin/admincmd/bpplclients${OPENVDIR}/netbackup/bin/admincmd/bpdbjobs -all_columns

Files Collected

$file${OPENVDIR}/netbackup/db/Class_att_defs${OPENVDIR}/netbackup/db/IDIRSTRUCT${OPENVDIR}/netbackup/db/INDEXLEVEL${OPENVDIR}/netbackup/db/bpenableLN.scr${OPENVDIR}/netbackup/db/bpenableTD.scr${OPENVDIR}/netbackup/db/images/*/INDEXLEVEL${OPENVDIR}/java/JBPSimple.properties${OPENVDIR}/java/Launch.properties${OPENVDIR}/java/Xenv${OPENVDIR}/java/*conf${OPENVDIR}/netbackup/bp.conf${OPENVDIR}/netbackup/version${OPENVDIR}/netbackup/bin/version${OPENVDIR}/netbackup/bin/*notify*${OPENVDIR}/volmgr/version${OPENVDIR}/volmgr/bin/driver/sg.conf*${OPENVDIR}/volmgr/bin/driver/sg.links*${OPENVDIR}/netbackup/nblog.conf

Page 13: Netbackup Tips

Directories Collected

{OPENVDIR}/netbackup/logs${OPENVDIR}/netbackup/db/class${OPENVDIR}/netbackup/db/class_template${OPENVDIR}/netbackup/db/client${OPENVDIR}/netbackup/db/config${OPENVDIR}/netbackup/db/error${OPENVDIR}/netbackup/db/failure_history${OPENVDIR}/netbackup/db/jobs${OPENVDIR}/netbackup/db/media${OPENVDIR}/volmgr/debug${OPENVDIR}/java/logs${OPENVDIR}/netbackup/vault/sessions${OPENVDIR}/netbackup/db/vault/usr/openv/netbackup/bin/support/output/nsbu/<hostname_timestamp>/.texttxt

**********************************************************************************************

tapeswritten.sh (unix scripts)

#!/bin/ksh

# Netbackup tape written report

/usr/openv/netbackup/bin/admincmd/bpimagelist -A -media -hoursago 20 > /opt/openv/scripts/temp/tapeswritten.out

mail -s "Tapes Written Report" [email protected] < /opt/openv/scripts/temp/tapeswritten.out

*************************************************************************************************

ROBTEST

When performing backups, after loading a tape, the drive is "downed".

A main cause of this problem is that the drives are misconfigured so that the device files are not allocated to the proper drives in the robot. A quick way to test this is to use "robtest" to load and then unload a tape. When a tape is loaded into a drive with "robtest", the robot knows the physical location of the drive. However, in order to get the "unload" command in robtest to work, the action must be sent directly to the drive by way of its device file. If the "unload" command errors out in "robtest", even though the tape is loaded in the drive, then it is because the configuration is incorrect. ( type "/usr/openv/volmgr/bin/tpconfig -d" to see the present configuration)

Page 14: Netbackup Tips

Example 1:

Drive 6 in the robot is configured as having the device file "/dev/rmt/5cbn" in tpconfig. This says that the device file "/dev/rmt/5" points to drive 6 in the robot. However, the output of "mt -f /dev/rmt/4 status" shows that the tape is really in the drive that "/dev/rmt/4" points to. And at the same time, "mt -f /dev/rmt/5 status" shows there is no tape in drive 5 in the robot

Follow this example below: (Remember that mt and robtest need to be executed on the computer that directly controls the robotics and the drives)

# cd /opt/openv/volmgr/bin/robtestConfigured robots with local control supporting test utilities: TLD(0)     robotic path = /dev/sg/c2t0l0

Robot Selection--------------- 1)  TLD 0 2)  none/quitEnter choice: 1

Robot selected: TLD(0)   robotic path = /dev/sg/c2t0l0

Invoking robotic test utility:/usr/openv/volmgr/bin/tldtest -r /dev/sg/c2t0l0 -d1 /dev/rmt/0cbn -d2 /dev/rmt/1cbn -d3 /dev/rmt/2cbn -d4 /dev/rmt/3cbn -d5 /dev/rmt/4cbn -d6 /dev/rmt/5cbn -d7 /dev/rmt/6cbn

(here, move a tape from slot 4 to drive 6)

Opening /dev/sg/c2t0l0Enter tld commands (? returns help information)m s4 d6Initiating MOVE_MEDIUM from address 259 to 133MOVE_MEDIUM completeq

(wait 90 seconds and then type:)

example$ mt -f /dev/rmt/5 status/dev/rmt/5: no tape loaded or drive offline

(now try each drive until you get the following output:)

example$ mt -f /dev/rmt/4 statusQuantum DLT7000 tape drive:  sense key(0x0)= No Additional Sense   residual= 0   retries= 0  file no= 0   block no= 0

What that means is that the device file "/dev/rmt/4" is actually the one that points to drive 6 in the robot. This means that the  configuration should have "/dev/rmt/4cbn" defined for drive 6 in the robot.

the "/usr/ openv/volmgr/bin/tpconfig -d"output for drive 6 in the robot would look like this then:

5   Drive5                 /dev/rmt/4cbn            dlt      No        UP       TLD(0) Definition       DRIVE=6

Example – 2

Page 15: Netbackup Tips

With "robtest", making sure all the drives are empty, put a tape in drive 1. Do a "s d" in robtest. Then exit out of robtest, and do a mt -f <devicefile> status on the device file. Does it say there's a tape in it? If no, then go down the line and do that for each device file until the drive with the tape in it is found.  Then open up "robtest" and do a unload d1 and see if the drive will unload properly.

This will return something like this for each drive (note, using a shell script for the mt status part might be helpful):

Place a tape in /dev/rmt/0 and run robtest and run mt statuscommands against each drive.

root@example:/opt/openv/volmgr/bin/robtestConfigured robots with local control supporting test utilities: TLD(0)     robotic path = /dev/sg/c7t0l0

Robot Selection--------------- 1)  TLD 0 2)  none/quitEnter choice: 1

Robot selected: TLD(0)   robotic path = /dev/sg/c7t0l0

Invoking robotic test utility:/usr/openv/volmgr/bin/tldtest -r /dev/sg/c7t0l0 -d1 /dev/rmt/2cbn -d2 /dev/rmt/1cbn -d3 /dev/rmt/0cbn -d4 /dev/rmt/6cbn -d5 /dev/rmt/5cbn -d6 /dev/rmt/4cbn -d7 /dev/rmt/3cbn

Opening /dev/sg/c7t0l0Enter tld commands (? returns help information)s ddrive 1 (addr 128) access = 1 Contains Cartridge = noSCSI ID from drive 1 is 1drive 2 (addr 129) access = 1 Contains Cartridge = noSCSI ID from drive 2 is 2drive 3 (addr 130) access = 1 Contains Cartridge = noSCSI ID from drive 3 is 3drive 4 (addr 131) access = 1 Contains Cartridge = noSCSI ID from drive 4 is 4drive 5 (addr 132) access = 1 Contains Cartridge = yesBarcode = WD0042                          SCSI ID from drive 5 is 5drive 6 (addr 133) access = 1 Contains Cartridge = noSCSI ID from drive 6 is 6drive 7 (addr 134) access = 1 Contains Cartridge = noSCSI ID from drive 7 is 1READ_ELEMENT_STATUS complete

See how Drive 5, and only drive 5 has a tape in it? and  the robtest command is using the configuration, which is "-d5 /dev/rmt/5cbn"

However,  look below...

running command:  mt -f /dev/rmt/0 status

Page 16: Netbackup Tips

/dev/rmt/0:Quantum DLT7000 tape drive:  sense key(0x0)= No Additional Sense   residual= 0   retries= 0  file no= 0   block no= 0/dev/rmt/1: no tape loaded or drive offlinerunning command:  mt -f /dev/rmt/1 status/dev/rmt/1: no tape loaded or drive offline/dev/rmt/2: no tape loaded or drive offlinerunning command:  mt -f /dev/rmt/2 status/dev/rmt/2: no tape loaded or drive offline/dev/rmt/3: no tape loaded or drive offlinerunning command:  mt -f /dev/rmt/3 status/dev/rmt/3: no tape loaded or drive offline/dev/rmt/4: no tape loaded or drive offlinerunning command:  mt -f /dev/rmt/4 status/dev/rmt/4: no tape loaded or drive offline/dev/rmt/5: no tape loaded or drive offlinerunning command:  mt -f /dev/rmt/5 status/dev/rmt/5: no tape loaded or drive offline/dev/rmt/6: no tape loaded or drive offlinerunning command:  mt -f /dev/rmt/6 status/dev/rmt/6: no tape loaded or drive offline

/dev/rmt/0 is actually the device file that points to Drive 5. which meant the "tldtest"c argument would be "-d5 /dev/rmt/0cbn". Do this for each drive to figure out which device files belong to which drive. Then make the necessary configuration changes.

To Expire a media

Bpexpdate –ev <media_id> -d 0

To find the list of frozen media

# /usr/openv/netbackup/bin/goodies//available_media|grep –I frozen

Unfreeze a mediaBpmedia –unfreeze –ev <media_id> -h <media_server>

Relabel a Tape

Bplabel –ev <media_id> -d <tape_density> p<pool_name>

To display info about netbackup error.

Bperror –statuscode

To change the attribute of a Tape

Vmchange –barcode <barcode_number> -m <new_barcode>--------change the barcode of a tape

To change the pool to which the tape belongs :-

Vmchange –m <media_id> -p <pool_name>

Available_media------can obtain…<media_id> <pool_name>

Page 17: Netbackup Tips

Vmquery –m <media_id> --------displays attribute of a particular media.(barcode can be obtained from this cmd)

Robtest

L – to select TLD0

S d –to look at the contents of the drive – identifies the drive number that has tape

S s – to look at the contents of the library – to identify an empty slot

M d<drive_number> s<slot_number> - moves tape from drive to slot

S d – to verify tape drive is empty

S s - to verify the tape is inserted in the appropriate slot

To display info about a tape

Vmquery –m <media_id> - displays attribute of a particular tape

Bpmedialist –U –mlist – lists all the media

Bpmedialist –U –mlist -ev <media_id> - listing of a particular media id

Bpimmedia –mediaid <media_id> -L – lists images in a tape

To clean a tape manually

Tpclean –L – to identify the drive name to be cleaned

Tpclean –C <drive_name>

/apps/openv/logs

/apps/openv/netbackup/bin/version – to check the netbackup versionlbssocserv # more versionHARDWARE SOLARISVERSION NetBackup 6.0MP3RELEASEDATE Mon Jun 26 16:12:24 CDT 2006BUILDNUMBER 20060625lbssocserv # pwd/opt/openv/netbackup

# NetBackup services #bprd 13720/tcp bprdbpdbm 13721/tcp bpdbmbpcd 13782/tcp bpcdvnetd 13724/tcp vnetdvopied 13783/tcp vopiedbpjava-msvc 13722/tcp bpjava-msvc

Page 18: Netbackup Tips

bpjobd 13723/tcp bpjobdNB_dbsrv 13785/tcp NB_dbsrv# End NetBackup services ## Media Manager services #vmd 13701/tcp vmdacsd 13702/tcp acsdtl8cd 13705/tcp tl8cdodld 13706/tcp odldtldcd 13711/tcp tldcdtl4d 13713/tcp tl4dtshd 13715/tcp tshdtlmd 13716/tcp tlmdtlhcd 13717/tcp tlhcdrsmd 13719/tcp rsmd# End Media Manager services #

ROBTEST

To check the status of the drives, the command would be run this way:

echo "s d" | /usr/openv/volmgr/bin/tldtest -r /dev/sg/c1t2l0

To determine what commands can be echoed in this way, enter "?" under robtest for a command usage explanation./usr/openv/volmgr/bin/robtest

Netbackup log directories should be created under /usr/openv/netbackup/logs directory.

admin – Keeps the logs of adminstrative commandsbpbrm – Keeps the logs of backup and restore managerbpcd - Keeps the logs of client daemonbpdbjobs - Keeps the logs of database manager program processbpdm - Keeps the logs of disk manager processbpjava-msvc - Keeps the logs of Java application server authentication servicebprd - Keeps the logs of request daemon processbpsched - Keeps the logs of scheduler process that runs on master serversbptm - Keeps the logs of media management processbparchive - Keeps the logs of archive programbpbackup - Keeps the logs of backup programbpbkar - Keeps the logs of program that generates golden imagesbplist - Keeps the logs of program that lists backed up and archived files

Page 19: Netbackup Tips

user-ops - directory for use by Java programsbp – client user interface process

USEFUL LINKS

http://www.netbackupcommands.com/