Thursday, October 18, 2007

Netbackup Tips

Netbackup Tips

Stopping Netbackup
· /etc/init.d/netbackup stop --> 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 for any remaining. NOTE: unkillable processes may require a reboot
Starting Netbackup
· /etc/init.d/netbackup start --> after bp.kill_all, to restart

Common Tasks
Starting the Administration GUI
· java from the windows client
· java from the server - /usr/openv/java/jnbSA &
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
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 -d -e
o Find the media used for those images
§ bpimagelist -U -client -d -e -media

Listing the files in a backup

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


Inventory the Robot
· Inventory Robot --> /opt/openv/volmgr/bin/vmcheckxxx -rt tld -rn -list
· Inventory Robot and Update Configuration --> /opt/openv/volmgr/bin/vmupdate -rt tld -rn -list

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 -d 0 -force -host
o Move the tape
§ vmchange -p 2 -m

Checking Drive Usage
· /usr/openv/volmgr/bin/vmoprcmd -d

Taking a drive down or up
· /usr/openv/volmgr/vmoprcmd -down
· /usr/openv/volmgr/vmoprcmd -up

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 -mt -verbose -rt tld -b -rn -rc1 -p -mm
§ vmpool -listall --> lists all pools, both name and number
o For example: vmadd -m Q100L1 -mt hcart -verbose -rt tld -b ECQ100L1 -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 EVA019 -d 8mm -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 -d 0 -force -host

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 -h

To relabel a tape
· bplabel -ev -d -p
· bplabel -ev 000687 -d hcart -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
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 --> 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
· 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 -L --> displays info about a class
vmpool - volume pools
vmpool -listall
vmpool -listscratch
bplabel -ev -d hcart
bpbackup db --> backs up the catalog
bpclclients --> 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 -d
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 –d 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 --> from both client and server
· bpclntcmd -hn --> from both client and server
· bpclntcmd -pn --> from client only

Increse retention time in activity monitor
For unix you can edit the bp.conf file with the following entry:KEEP_JOBS_HOURS = Ours is set at:KEEP_JOBS_HOURS = 192For windows from the netbackup documentation ( NetBackup_AdminGuideI_WinServer): Retaining Job Information in the Database

There may be times when it is desirable to keep jobs in the jobs database longer than three days. The default can be changed on a more permanent basis, or temporarily, lasting only until the next reboot or cycling of NetBackup services.

Changing the Default on a Permanent BasisSince the bpdbjobs database resets to default conditions upon reboot or cycling NetBackup Services, you may want a more permanent means of indicating how long to keep jobs in the Activity Monitor.Use the following method to add new registry key(s) to HKEY_LOCAL_MACHINE\SOFTWARE\VERITAS\NetBackup\CurrentVersion\ConfigTo do so safely, from a command window, run:install_path\VERITAS\NetBackup\bin\admincmd\echo KEEP_JOBS_HOURS = 192 | bpsetconfig

Where 192 is the number of hours that all jobs (both successful and unsuccessful) will be kept in the jobs database (or Activity Monitor display).To retain only successful jobs, enter:echo KEEP_JOBS_SUCCESSFUL_HOURS = 192 | bpsetconfig

This is a list of the command line tools that run the same reports as the NetBackup (tm) GUI.

Command Line Interface for NetBackup Reports
Note:
and syntax: MM/DD/YY
and syntax: hh:mm:ss
is the six-character media identification number

Backup Status Report
The Backup Status report shows status and error information on jobs completed within the specified time period. If an error has occurred, a short explanation of the error is included.
# cd /usr/openv/netbackup/bin/admincmd
# ./bperror -U -backstat -s info [-d -e ]

Client Backups Report
The Client Backups report shows detailed information on backups completed within the specified time period.
# cd /usr/openv/netbackup/bin/admincmd
# ./bpimagelist -U [-A|-client name] [-d -e ]

Problems Report
The Problems report lists the problems that the server has logged during the specified time period. This information is a subset of the information you get from the All Log Entries report.
# cd /usr/openv/netbackup/bin/admincmd
# ./bperror -U -problems [-d -e ]

All Log Entries Report
The All Log Entries report lists all log entries for the specified time period. This report includes the information from the Problems report and Media Log Entries report. This report also shows the transfer rate, which is useful in determining and predicting rates and backup times for future backups (the transfer rate does not appear for multiplexed backups).
# cd /usr/openv/netbackup/bin/admincmd
# ./bperror -U -all [-d -e ]

Media List Report
The Media Lists report shows information for volumes that have been allocated for backups. This report does not show media for Disk type storage units or for backups of the NetBackup catalogs.
# cd /usr/openv/netbackup/bin/admincmd
# ./bpmedialist -U -mlist [-m

Media Contents Report
The Media Contents report shows the contents of a volume as read directly from the media header and backup headers. This report lists the backup IDs (not each individual file) that are on a single volume. If a tape has to be mounted, there will be a longer delay before the report appears.
# cd /usr/openv/netbackup/bin/admincmd
# ./bpmedialist -U -mcontents [-m ]

Images on Media Report
The Images on Media report lists the contents of the media as recorded in the NetBackup image catalog. You can generate this report for any type of media (including disk) and filter it according to client, media ID, or path.
# cd /usr/openv/netbackup/bin/admincmd
# ./bpimmedia -U [-client ] [-mediaid ]

Media Log Entries Report
The Media Logs report shows media errors or informational messages that are recorded in the NetBackup error catalog. This information also appears in the All Log Entries report.
# cd /usr/openv/netbackup/bin/admincmd
# ./bperror -U -media [-d -e ]

Media Summary Report
The Media Summary report summarizes active and non-active volumes for the specified server according to expiration date. It also shows how many volumes are at each retention level. In verbose mode, the report shows each media ID and its expiration date.
# cd /usr/openv/netbackup/bin/admincmd
# ./bpmedialist -summary

Media Written Report
The Media Written report identifies volumes that were used for backups within the specified time period.
# cd /usr/openv/netbackup/bin/admincmd
# ./bpimagelist -A -media [-d -e ]

Volume detail (vmquery)
There is no NetBackup GUI equivalent for the Volume detail report. This is a command line method to get details for all tapes or a specific tape. This can be used as a complement to other Media reports.
# cd /usr/openv/volmgr/bin
# ./vmquery -a
or
# ./vmquery -m