Netbackup Tips
Netbackup Tips
Glossary
Term Definition
CLI Command Line Interface
GUI Graphical User Interface
Media Server
Master Server
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
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>
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
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
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
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.
Processes
ltid
acsd
vmd
Useful Commands
Troubleshooting
Device Actions
Media Actions
Netbackup Client
/usr/openv/netbackup/bin/bpclntcmd -pn
/usr/openv/netbackup/bin/bpclntcmd ip "ip_address"
One of these usually fails and your able to fix it right off
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.
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
888888888888888888888888888888888888888888888888888888888888888888888888888
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 }'
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 }'
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.
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
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
Phase 2
Example :
lbssocserv # bpimport -st FULL -policy CareStore_Unix -pt Standard -client lbssocserv -id
A00012
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
**********************************************************************************************
#!/bin/ksh
************************************************************************************************
*
ROBTEST
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
# 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
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
(now try each drive until you get the following output:)
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):
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
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...
/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
# /usr/openv/netbackup/bin/goodies//available_media|grep –I frozen
Unfreeze a media
Bpmedia –unfreeze –ev <media_id> -h <media_server>
Relabel a Tape
Bperror –statuscode
Robtest
L – to select TLD0
S d –to look at the contents of the drive – identifies the drive number that has tape
Tpclean –C <drive_name>
/apps/openv/logs
# 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:
To determine what commands can be echoed in this way, enter "?" under
robtest for a command usage explanation.
/usr/openv/volmgr/bin/robtest
USEFUL LINKS
http://www.netbackupcommands.com/