How to manually remove a tape completely from NetBackup/Media Manager.
First, if there are images on the tape, they need to be expired. This can be done by: bpexpdate -ev <mediaid> -d 0 This will not completely free up the tape if the tape is frozen or suspended, so the command(s): bpmedia -unfreeze -ev <mediaid> or bpmedia -unsuspend -ev <mediaid> may be needed. At this point there will be no image database entries for that tape and the media database should show the tape as not assigned therefore allowing the tape to be reused. However sometimes the image database and the media manager database can be out of sync, and the tape may show as still assigned, or if the tape has a NetBackup database backup on it, there would be no image entry to begin with. When a tape shows an assigned date, but no images are related to that tape, it will show up in the available_media report as dbbackup. To tell if a tape actually has a dbbackup on it, the command: vmquery -m mediaid will show a status, where 0x0 means normal backups, 0x1 means NetBackup database backup and 0x2 means Storage Migrator. If it is 0x1, be certain this is not a database backup which will ever be needed. If it is 0x2, it is in use by Storage Migrator and understanding of the use of the tape by Storage Migrator (not covered here) is required. To free up the tape, when it has an assigned date but no images in the database, the command: vmquery -deassignbyid <mediaid> <poolnumber> <status> must be run, but the status will be displayed as 0x0, 0x1 or 0x2 and needs to be just 0, 1 or 2 in the vmquery -deassignbyid. At this point the tape is available to be used for backups. If the tape was bad or destroyed and that is why it is being removed, the command: vmdelete -m <mediaid> will remove the last remnants of information about it from media manager.
There are other options which may be specified for the above commands. Some are to specify server names, volume database host names, etc. If the NetBackup/Media Manager setup is complex, those options may be needed. The full paths to the commands mentioned are: /usr/openv/netbackup/bin/admincmd/bpexpdate /usr/openv/netbackup/bin/admincmd/bpmedia /usr/openv/netbackup/bin/goodies/available_media /usr/openv/volmgr/bin/vmquery usr/openv/volmgr/bin/vmdelete All but available_media have man pages.
BPLABEL command When using bplabel, insure the syntax is correct. Example: \install_path\veritas\netbackup\bin\admincmd\bplabel -ev evsn -d 4mm -o This example will overwrite a 4mm tape. The "evsn" would be your tape id Bplabel will fail with an "Invalid density Drive Type" message if the density is entered with capital letters. Example: \install_path\veritas\netbackup\bin\admincmd\bplabel -ev evsn -d 4MM -o The correct density syntax for bplabel is as follows: 4mm (4-mm cartridge) 8mm (8-mm cartridge) dlt (dlt cartridge) dlt2 (dlt cartridge alternate) qscsi (1/4 in cartridge) For a full description of bplabel please refer to pg. 590 in the NetBackup System Administrator's Guide for NetBackup 4.5.
Symptom: When running the bplabel command, the following error occurs: "requested number of drives are not configured".
Exact Error Message:
requested number of drives are not configured
Solution: A reason for this error is that the specified density of the media is inaccurate. Here is an example of the bplabel command: bplabel -ev A00001 -d dlt -p netbackup If the density of the tape that is being relabeled isn't dlt, you will see this error: "requested number of drives are not configured". Some possible methods of figuring out the media density are listed below: In the media and device management GUI, there will be a media type column. Locate the tape that is being relabeled and see what this column states as the media density. Run the available_media command from the <install_path>\netbackup\bin\goodies directory. There will be a media type column that will report the density there as well. Run the vmquery -m <media_id> command from the <install_path>\volmgr\bin directory. This will show the media type of the volume that was specified in the command. A common mistake is to use "dlt" when the tapes are in fact "dlt 2" or "dlt 3." If the media type is anything other than "dlt," such as "dlt 3", then "dlt 3" must be used instead of dlt in the bplabel command.
Examples of bpclntcmd on bomber: /usr/openv/netbackup/bin/bpclntcmd -self current domain = .min.ov.com NIS is running. cannot determine NIS master (group) no such map in server's domain (4) gethostname() returned: bomber host bomber: bomber at 188.8.131.52 (0xa6621c74) checkhname: aliases: /usr/openv/netbackup/bin/bpclntcmd -ip <ip address from previous command> checkhaddr: host : bomber: bomber at 184.108.40.206 (0xa6621c74) checkhaddr: aliases: loghost
/usr/openv/netbackup/bin/bpclntcmd -pn expecting response from server bomber bomber bomber 220.127.116.11 63558 /usr/openv/netbackup/bin/bpclntcmd -hn bomber host bomber: bomber at 18.104.22.168 (0xa6621c74) checkhname: aliases: From the client: nslookup ip_address_of _master nslookup Name_master nslookup ip_address_of _media_server nslookup Name_media_server nslookup ip_address_of _client nslookup Name_client from the master: nslookup ip_address_of _master nslookup Name_master nslookup ip_address_of _media_server nslookup Name_media_server nslookup ip_address_of _client nslookup Name_client From the media server: nslookup ip_address_of _master nslookup Name_master nslookup ip_address_of _media_server nslookup Name_media_server nslookup ip_address_of _client nslookup Name_client
exclude and include lists Using exclude_list and include_list for managing files to be excluded and included in a backup. Solution: This is additional information which should be used in conjunction with the exclude_list/include_list information in the Netbackup System Administrator's Guide for UNIX.
1. An include_list can contain only directories and files that are a subset of the class files include list. For example: If class files include list definition is /etc/* you can not have an include_list specify anything outside of the above criteria. Therefore you could not, in this case, have and include_list with the entry /var/*. (If the above entry was in the include_list - Netbackup would just ignore it) This then leads to bullet 2 below. 2. An include_list requires a corresponding exclude_list, for example: If class files include list definition is /etc/* The exclude_list entry is /etc/* and the include_list entry is /etc/*.conf This will result in backing up only the *.conf files in the /etc directory. 3. When using the exclude_list and the include_list, one should give significant thought and planning to the process. Because of the way that Netbackup processes the information it can add significant processing overhead to the backup. The first thing that Netbackup does on an automatic backup is to build the backup file list, using the Class include files. So if you have specified the root directory (/) with the cross mount points attribute set it will build a file list of all mounted file systems. The next thing that Netbackup does, is check for the exclude_list, and if your exclude_list is /* - Netbackup will throw away the backup list it has just made. Netbackup then reads the include_list and in this case builds a new backup list of directories and files to include in the backup. (See technote 230638 for additional info).
CLI for NetBackup Reports
Backup Status /usr/openv/netbackup/bin/admincmd/bperror -U -backstat -s info -d mo/da/yr hr:mn:sc -e mo/da/yr hr:mn:sc Client Backups /usr/openv/netbackup/bin/admincmd/bpimagelist [-A|-client name] -d mo/da/yr hr:mn:sc -e mo/da/yr hr:mn:sc
Problems Report /usr/openv/netbackup/bin/admincmd/bperror -U -problems -d mo/da/yr hr:mn:sc -e mo/da/yr hr:mn:sc All Log Entries /usr/openv/netbackup/bin/admincmd/bperror -U -all -d mo/da/yr hr:mn:sc -e mo/da/yr hr:mn:sc Media List /usr/openv/netbackup/bin/admincmd/bpmedialist -U -mlist [-ev media ID] Media Contents /usr/openv/netbackup/bin/admincmd/bpmedialist -U -mcontents [-ev media ID] Images on Media /usr/openv/netbackup/bin/admincmd/bpmedialist -U -mcontents [-ev media ID] Media Log Entries /usr/openv/netbackup/bin/admincmd/bperror -U -media -d mo/da/yr hr:mn:sc -e mo/da/yr hr:mn:sc Media Summary /usr/openv/netbackup/bin/admincmd/bpmedialist -summary Media Written /usr/openv/netbackup/bin/admincmd/bpimagelist -A media -d mo/da/yr hr:mn:sc -e mo/da/yr hr:mn:sc Volume detail /usr/openv/volmgr//bin/vmquery -a