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/done
Run 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}'
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)
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
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 sd
Looking at the contents of the library
o ss
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
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
ltid
acsd
vmd
Useful Commands
bpcllist - list classes
bpclinfo <class> -L --> displays info about a class
vmpool - volume pools
vmpool -listall
vmpool -listscratch
bplabel -ev <media id> -d hcart
bpbackup db --> backs up the catalog
bpclclients <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 management
o 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
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 tape
Create 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. On
the 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 1
9960 0 IWORLD_OS_TEST Daily lbesx3test01 / 176282816
9959 0 IWORLD_OS_APP02 Daily lbesx3app02 / 13578944
9958 0 IWORLD_OS_APP01 Daily lbesx3app01 / 16629824
9957 0 IWORLD_OS Daily lbesx3db01 / 48241344
9956 0 DB01_BOBJ_DB Daily lbesx3db01 /dpp/BOBJ 277216
9955 0 DB01_ARC_LOG Daily lbesx3db01 /arc/HOULIVE_archredo 2134592
9954 0 DB01_HOULIVE_DB Daily lbesx3db01 /dpp/HOULIVE 67130016
9953 0 lbesx3db01 1
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 -L
Client/Master = Master
NetBackup Client Platform = Solaris, Solaris10
NetBackup Client Protocol Level = 6.5.0
Product = NetBackup
Version Name = 6.5
Version Number = 650000
NetBackup Installation Path = /usr/openv/netbackup/bin
Client OS/Release = SunOS 5.10
root@lbs-soclive # bpgetconfig -g lbscf-carestore -L
Client/Master = Client of lbs-soclive
NetBackup Client Platform = PC, Windows2000
NetBackup Client Protocol Level = 6.5.0
Product = NetBackup
Version Name = 6.5
Version Number = 650000
NetBackup Installation Path = C:\Program Files\Veritas6.5\NetBackup\bin
Client OS/Release = Windows2003 5
root@lbs-soclive #
lbssocserv # bpgetconfig -g lbssocserv -L
Client/Master = Master
NetBackup Client Platform = Solaris, Solaris8
NetBackup Client Protocol Level = 6.0.0
Product = NetBackup
Version Name = 6.0
Version Number = 600000
NetBackup Installation Path = /usr/openv/netbackup/bin
Client OS/Release = SunOS 5.8
lbssocserv #
lbssocserv # bpgetconfig -g icissun -L
Client/Master = Client of lbssocserv
NetBackup Client Platform = Solaris, Solaris8
NetBackup Client Protocol Level = 6.0.0
Product = NetBackup
Version Name = 6.0
Version Number = 600000
NetBackup Installation Path = /usr/openv/netbackup/bin
Client OS/Release = SunOS 5.8
lbssocserv #
Root @ lbesx3db01 #bpgetconfig -g lbesx3db01 -L
Client/Master = Master
NetBackup Client Platform = Solaris, Solaris7
NetBackup Client Protocol Level = 5.0.0.0.2.0
Product = NetBackup
Version Name = 5.0GA
Version Number = 500000
NetBackup Installation Path = /usr/openv/netbackup/bin
Client OS/Release = SunOS 5.9
Root @ lbesx3db01 #
Root @ lbesx3db01 #bpgetconfig -g lbesx3test01 -L
Client/Master = Client of lbesx3db01
NetBackup Client Platform = Solaris, Solaris7
NetBackup Client Protocol Level = 5.1.0
Product = NetBackup
Version Name = 5.1
Version Number = 510000
NetBackup Installation Path = /usr/openv/netbackup/bin
Client OS/Release = SunOS 5.9
Root @ lbesx3db01 #
Root @ lbesx3db01 #bpgetconfig -g lbe-sp-boxi-001 -L
Client/Master = Client of lbesx3db01
NetBackup Client Platform = PC, WindowsNT
NetBackup Client Protocol Level = 5.0.0.0.2.0
Product = NetBackup
Version Name = 5.0GA
Version Number = 500000
NetBackup Installation Path = C:\Program Files\VERITAS\NetBackup\bin
Client OS/Release = WindowsNET 5
Root @ lbesx3db01 #
Root_User @ NXSS-New #bpgetconfig -g NXSS-New -L
Client/Master = Master
NetBackup Client Platform = Solaris, Solaris2.6
NetBackup Client Protocol Level = 4.5.0
Product = NetBackup
Version Name = 4.5GA
Version Number = 450000
NetBackup Installation Path = /usr/openv/netbackup/bin
Client OS/Release = SunOS 5.8
Root_User @ NXSS-New #
root@lnperpscs01 # ./bpgetconfig -g lnperpscs01 -L
Client/Master = Master
NetBackup Client Platform = Solaris, Solaris7
NetBackup Client Protocol Level = 5.0.0.0.4.1
Product = NetBackup
Version Name = 5.0GA
Version Number = 500000
NetBackup Installation Path = /usr/openv/netbackup/bin
Client OS/Release = SunOS 5.9
root@lnperpscs01 #
root@lnperpscs01 #
root@lnperpscs01 #
root@lnperpscs01 # ./bpgetconfig -g lnperpscs02 -L
Client/Master = Media Host
NetBackup Client Platform = Solaris, Solaris7
NetBackup Client Protocol Level = 5.0.0.0.4.1
Product = NetBackup
Version Name = 5.0GA
Version Number = 500000
NetBackup Installation Path = /usr/openv/netbackup/bin
Client OS/Release = SunOS 5.9
root@lnperpscs01 #
root@lnperpscs01 #
root@lnperpscs01 #
root@lnperpscs01 # ./bpgetconfig -g lnperpscd01 -L
Client/Master = Client of lnperpsvnbu
NetBackup Client Platform = Solaris, Solaris7
NetBackup Client Protocol Level = 5.0.0.0.4.1
Product = NetBackup
Version Name = 5.0GA
Version Number = 500000
NetBackup Installation Path = /usr/openv/netbackup/bin
Client OS/Release = SunOS 5.9
root@lnperpscs01 #
root@lnperpscs01 #
root@lnperpscs01 # ./bpgetconfig -g lnperpscd02 -L
Client/Master = Client of lnperpsvnbu
NetBackup Client Platform = Solaris, Solaris7
NetBackup Client Protocol Level = 5.0.0.0.4.1
Product = NetBackup
Version Name = 5.0GA
Version Number = 500000
NetBackup Installation Path = /usr/openv/netbackup/bin
Client OS/Release = SunOS 5.9
root@lnperpscs01 #
root@lnperpscs01 # ./bpgetconfig -g lnperpwag01 -L
Client/Master = Client of lnperpsvnbu
NetBackup Client Platform = PC, WindowsNT
NetBackup Client Protocol Level = 5.0.0.0.2.0
Product = NetBackup
Version Name = 5.0GA
Version Number = 500000
NetBackup Installation Path = C:\Program Files\VERITAS\NetBackup\bin
Client OS/Release = WindowsNET 5
root@lnperpscs01 #
888888888888888888888888888888888888888888888888888888888888888888888888888
Re: [Veritas-bu] Command to pull information
Heathe Kyle Yeakley
Wed, 28 Oct 2009 07:14:10 -0700
I 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:
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:55
8 nxss-new Hot_Live_ColdDbs monthly FULL Thursday 21:30:00
Root_User @ NXSS-New #bpschedreq -predict 03/21/10 23:55:55
8 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
To view the files backedup overnight
bpflist -client lbssocserv -d 04/14/2010 00:00:00 -e 04/14/2010 23:00:00
bpflist -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 CLI
bpdbjobs | more
bpdbjobs -cancel (31180)(jobid)
BPIMPORT
The 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
${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
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
/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)
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/robtest
Configured robots with local control supporting test utilities:
TLD(0) robotic path = /dev/sg/c2t0l0
Robot Selection
---------------
1) TLD 0
2) none/quit
Enter 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/c2t0l0
Enter tld commands (? returns help information)
m s4 d6
Initiating MOVE_MEDIUM from address 259 to 133
MOVE_MEDIUM complete
q
(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 status
Quantum 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
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 status
commands against each drive.
root@example:/opt/openv/volmgr/bin/robtest
Configured robots with local control supporting test utilities:
TLD(0) robotic path = /dev/sg/c7t0l0
Robot Selection
---------------
1) TLD 0
2) none/quit
Enter 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/c7t0l0
Enter tld commands (? returns help information)
sd
drive 1 (addr 128) access = 1 Contains Cartridge = no
SCSI ID from drive 1 is 1
drive 2 (addr 129) access = 1 Contains Cartridge = no
SCSI ID from drive 2 is 2
drive 3 (addr 130) access = 1 Contains Cartridge = no
SCSI ID from drive 3 is 3
drive 4 (addr 131) access = 1 Contains Cartridge = no
SCSI ID from drive 4 is 4
drive 5 (addr 132) access = 1 Contains Cartridge = yes
Barcode = WD0042
SCSI ID from drive 5 is 5
drive 6 (addr 133) access = 1 Contains Cartridge = no
SCSI ID from drive 6 is 6
drive 7 (addr 134) access = 1 Contains Cartridge = no
SCSI ID from drive 7 is 1
READ_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
/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 offline
running command: mt -f /dev/rmt/1 status
/dev/rmt/1: no tape loaded or drive offline
/dev/rmt/2: no tape loaded or drive offline
running command: mt -f /dev/rmt/2 status
/dev/rmt/2: no tape loaded or drive offline
/dev/rmt/3: no tape loaded or drive offline
running command: mt -f /dev/rmt/3 status
/dev/rmt/3: no tape loaded or drive offline
/dev/rmt/4: no tape loaded or drive offline
running command: mt -f /dev/rmt/4 status
/dev/rmt/4: no tape loaded or drive offline
/dev/rmt/5: no tape loaded or drive offline
running command: mt -f /dev/rmt/5 status
/dev/rmt/5: no tape loaded or drive offline
/dev/rmt/6: no tape loaded or drive offline
running 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 media
Bpmedia –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>
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 version
lbssocserv # more version
HARDWARE SOLARIS
VERSION NetBackup 6.0MP3
RELEASEDATE Mon Jun 26 16:12:24 CDT 2006
BUILDNUMBER 20060625
lbssocserv # pwd
/opt/openv/netbackup
# NetBackup services #
bprd 13720/tcp bprd
bpdbm 13721/tcp bpdbm
bpcd 13782/tcp bpcd
vnetd 13724/tcp vnetd
vopied 13783/tcp vopied
bpjava-msvc 13722/tcp bpjava-msvc
bpjobd 13723/tcp bpjobd
NB_dbsrv 13785/tcp NB_dbsrv
# End NetBackup services #
# Media Manager services #
vmd 13701/tcp vmd
acsd 13702/tcp acsd
tl8cd 13705/tcp tl8cd
odld 13706/tcp odld
tldcd 13711/tcp tldcd
tl4d 13713/tcp tl4d
tshd 13715/tcp tshd
tlmd 13716/tcp tlmd
tlhcd 13717/tcp tlhcd
rsmd 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 commands
bpbrm – Keeps the logs of backup and restore manager
bpcd - Keeps the logs of client daemon
bpdbjobs - Keeps the logs of database manager program process
bpdm - Keeps the logs of disk manager process
bpjava-msvc - Keeps the logs of Java application server authentication service
bprd - Keeps the logs of request daemon process
bpsched - Keeps the logs of scheduler process that runs on master servers
bptm - Keeps the logs of media management process
bparchive - Keeps the logs of archive program
bpbackup - Keeps the logs of backup program
bpbkar - Keeps the logs of program that generates golden images
bplist - Keeps the logs of program that lists backed up and archived files
user-ops - directory for use by Java programsbp – client user interface process
USEFUL LINKS
http://www.netbackupcommands.com/