bpmedialist

bpmedialist — display NetBackup tape media status

SYNOPSIS

<admin_dir_path>bpmedialist [-mlist] [-U | -l | -L] [-m media_id] [-rl ret_level] [-d density] [-p pool_name] [-h host_name | -M master_server,...] [-owner host_name | group_name] [-v]

<admin_dir_path>bpmedialist -summary [-U | -L] [-brief] [-p pool_name] [-h host_name | -M master_server,...] [-owner host_name | group_name] [-v]

<admin_dir_path>bpmedialist -mcontents -m media_id [-U | -l | -L] [-d density] [-h host_name | -M master_server,...] [-owner host_name | group_name] [-v] [-priority number]

<admin_dir_path>bpmedialist -count -rt robot_type -rn robot_number [-d density] [-U | -l] [-h host_name | -M master_server] [-v]

On Windows systems, <admin_dir_path> is <install_path>\NetBackup\bin\admincmd\

DESCRIPTION

bpmedialist queries one or more NetBackup media catalogs and produces a report on the status of the NetBackup media. Authorized users can run this command.

For more information about NetBackup authorization, refer to the NetBackup Security and Encryption Guide.

bpmedialist produces one of four reports: Media List Report, Media Summary Report, Media Contents Report, Media Count Report.

Media List Report

Media List (-mlist) report, provides information on either a single volume or all volumes in the NetBackup media catalog. This report does not apply to disk storage units. The report lists, for each volume in the report, the volume's media ID, media server, and other attributes, which is the default report type.

If the -U option is used, the status field appears as English text. Otherwise, the status appears as a hexadecimal integer. The interpretation of the digits is given here. Any or all of these flags can be set. Settings other than those listed here correspond to unreported states.

>= 0x2000 Media contains some encrypted images.

>= 0x1000 Media is used by Backup Exec.

>= 0x800 This tape is WORM (write once, read many).

>= 0x400 Used for alternate server restores.

>= 0x200 Multiplexing is TRUE.

>= 0x080 Imported is TRUE.

>= 0x040 Multiple retention levels is TRUE.

To determine the interpretation for the low-order status digit, compare the digit to the following values in order.

>= 0x008 The status is Full.

>= 0x004 This is an unreported state.

>= 0x002 The status is Suspended.

== 0x001 The status is Frozen.

== 0x000 The status is Active.

The reported status is the status for the low-order digit that is combined with the status for the upper-order digits. For instance, for a status value of 0x040, the media ID is active, and multiple retention levels are in effect.

The -l option produces a report in Short mode. Each media ID occupies one line of the report. The fields on this line are listed later in this description.

Any of the following fields that are not documented in that section are reserved for NetBackup internal use:

  • media id

  • partner id

  • version

  • density

  • time allocated

  • time last written

  • time of expiration

  • time last read

  • Kbytes

  • nimages

  • vimages (unexpired images)

  • retention level

  • volume pool

  • number of restores

  • status (described previously)

  • hsize

  • ssize

  • l_offset

  • reserved

  • psize

  • reserved

  • four reserved fields

Media Summary Report

The Media Summary report lists (by server) summary statistics for active and inactive media, which is grouped according to expiration date. The report shows the expiration date for the media and the number of media at each retention level, and the status of each media ID.

Media Contents Report

The Media Contents report lists the contents of media as read directly from the media. It lists the backup IDs that are on a single media ID. It does not list each individual file. This report does not apply to disk storage units. Note that the storage unit may stay in use for some time after the break if the following occurs: You try to abort the command by entering ctl-c and the requested media are not mounted or positioned. Each entry in the report appears as that area of the storage unit is read.

The -l format for the Media Contents report produces one line for each backup ID and contains the following fields.

For more detail, see the Media Contents Report section in the NetBackup Administrator's Guide.

Any of the following fields that are not documented in that section are reserved for NetBackup internal use.

  • Version (1 denotes a DB backup image, 2 denotes a regular backup image)

  • Backup ID

  • Creation time

  • Expiration time

  • Retention level

  • Fragment number

  • File number

  • Block size (in bytes)

  • Status

  • media_id

  • Size

  • Reserved

  • data_start

  • Reserved

  • client_type *

  • copy_num *

  • sched_type *

  • Flags *

  • opt_extra

  • mpx_headers

  • res1

  • Policy name *

  • Schedule label *

* These fields are significant only if version is 2.

Media Count Report

The Media Count report shows a count of the number of UP devices that match all the criteria that is specified. The robot type and the robot number are mandatory criteria for this report. The -U format provides a title, Number of UP devices for rt(rn) = value. The -l format provides only the value.

OPTIONS

Report-type Options

bpmedialist produces one of four types of reports. An option on the command line determines the type of report that is produced. The report-type options are as follows:

-mlist

Produces a Media List report (the default report type).

-summary

Produces a Media Summary report.

-mcontents

Produces a Media Contents report.

-count

Produces a Media Count report. This report also displays the following media attribute: ALLOW_MULT_RET_PER_MEDIA and its value, 0 (do not allow) or 1 (allow).

The bpmedialist report can appear in one of several formats. The report-format options are as follows:

-brief

Produces a brief report. This option is available for the Media Summary report only. The default is a full report, which includes a breakdown of active and non-active media that report on each media ID status within these categories.

-U

Reports in user mode (the default report mode). The report includes a banner that lists the column titles. The report style is descriptive, rather than terse.

-L

Reports in long mode. This format produces the report with the most complete information. For instance, for the Media List report, the report lists each media ID attribute as a series of keyword = value pairs, one attribute per line. A value can be expressed as both a numeric value and a descriptive value.

-l

Reports in short mode. This format produces a terse report. This option is useful for scripts or the programs that rework the listing contents into a customized report format.

The following are the remaining options used by bpmedialist:

-d density

Reports on media of this density type. If the robot type is specified on the command line, the value for density should be consistent with the robot type. Available density types are:

4mm - 4mm Cartridge

8mm - 8mm Cartridge

dlt - DLT Cartridge

qscsi - 1/4 Inch Cartridge

Note:

The following densities are supported only on NetBackup Enterprise Servers.

dlt2 - DLT Cartridge 2

dlt3 - DLT Cartridge 3

dtf - DTF Cartridge

hcart - 1/2 Inch Cartridge

hcart2 - 1/2 Inch Cartridge 2

hcart3 - 1/2 Inch Cartridge 3

-h host_name

The name of a host that contains the media to be reported. Use -h instead of -M to collect the contents list of expired media.

To extract records for media from NDMP hosts, use the NDMP hostname, not the NetBackup for NDMP server hostname. The NCMP hostname is defined in the NDMP storage unit or EMM as an NDMP server type (or an associated EMM alias name) that is associated with that master server domain.

-m media_id

Reports on this media ID only. This option is required for the Media Contents report.

For the Media List report, this option is optional, The default condition is that all media IDs are included in that report. The media ID can be provided in either uppercase or lowercase. The media ID must be six or fewer characters and must be in the NetBackup media catalog (that is, assigned from the NetBackup volume pool).

-owner host_name | group_name

Specifies the owner of the media list. The owner can be a host or a server group.

Note:

NetBackup server has only one server (the master), so use the name of that server for host_name.

host_name is either the name of a host, or the character string ALL. If host_name is the name of a host, the query goes to the media catalog that resides on the system host_name. For the -mcontents and -count options, this option can appear once. For the -mlist and -summary options, this option can appear more than once. The default is all servers in the set of storage units for removable media.

The system host_name must allow access by the system running bpmedialist. host_name can be a media server for a master server other than the local master server. The default is the master server of the local cluster.

For a media server for a master server other than the local master, if a bpmedialist query is made by using -h the_media_server. An equivalent bpmedialist query uses -M the_media_servers_master, the bpmedialist using -h may complete faster. This difference in response time can be significant in the following situation: The master server that -M addresses is located remotely and the media server that -h addresses is local.

If host_name is ALL, the query goes to the local master server and its media servers.

group_name specifies the name of a server group or the character string ALL. If group_name is the name of a server group, the query returns the media that the server group owns. If group_name is ALL, the query returns the media that all the server groups own.

-M master_server,...

A list of alternative master servers. This list is a comma-delimited list of host names. If this option is present, each master server in the list runs the bpmedialist command. If an error occurs for any master server, the report process stops at that point.

The report is the composite of the information that all the master servers in this list return. bpmedialist queries each of these master servers. Each master server in the list must allow access by the system that issues the bpmedialist command.

For -mcontents (Media Contents report) only, the master server returns media information from the media catalogs. This media information is for both the master and its media servers (except for NetBackup server , which does not support remote media servers). For example, if a media ID exists on a media server of one of the master servers in the -M list, the following occurs: The master retrieves the media information from the media server and returns it to the system running bpmedialist. In this case, both the master server and the media server must allow access by the system that issues the bpmedialist command.

The default is the master server for the server running bpmedialist.

Note:

NetBackup server supports only one server, the master; the default in this case is always the NetBackup server master where you run bpmedialist.

-p pool_name

Reports on the media IDs that belong to this volume pool. The default is all pools.

-priority number

Specifies a new priority (number) for the media contents job (for a Media Contents report) that overrides the default job priority.

-rl retention_level

Reports on the media that use this retention level. The retention level determines how long to retain backups and archives. The retention_level is an integer between 0 and 24 (default level is 1).

Following are the retention levels with the installation values for the corresponding retention periods. Your site may have reconfigured the retention periods that correspond to the retention levels.

0

one week

1

2 weeks

2

3 weeks

3

1 month

4

2 months

5

3 months

6

6 months

7

9 months

8

1 year

9 - 24

infinite

-rn robot_number

Reports on the robot by using this robot number. This option is required when the -count option is used. The robot number can be obtained from the Media and Device Management.

For rules about the use of this number, see the NetBackup Administrator's Guide.

-rt robot_type

Reports on a robot of this type. This option is required when the -count option is used. For non-robotic (stand-alone) devices select NONE. Valid robot types include the following

TL4 - Tape Library 4MM

TL8 - Tape Library 8MM

TLD - Tape Library DLT

NONE - Not robotic

Note that the following robot types apply only to NetBackup Enterprise Server:

ACS - Automated Cartridge System

TLH - Tape Library Half-Inch

TLM - Tape Library Multimedia

-v

Selects verbose mode. This option causes bpmedialist to log additional information for debugging purposes. The information goes into the NetBackup administration daily debug log. This option is meaningful only when NetBackup has the debug logging enabled; that is, when the following directory is defined:

For Windows systems: install_path\NetBackup\logs\admin

EXAMPLES

EXAMPLE 1

The following example produces a media report for all media IDs that are defined for the master server and media servers of the local system.

Note:

For NetBackup server , the report includes only media IDs for the master server because remote media servers are not supported.

# bpmedialist
Server Host = hatt 

id	 rl  images   allocated	last updated   density   kbytes  restores 
		 vimages   expiration	 last read		<------- STATUS -------> 
--------------------------------------------------------------------------- 
143191  0	28   12/03/2007 23:02  12/22/2007 23:00	dlt	 736288	 1 
			7   12/29/2007 23:00  12/09/2007 10:59 

144280  0	 9   11/25/2007 11:06  12/01/2007 23:03	dlt	 290304	 0 
			0   12/08/2007 23:03	N/A		 EXPIRED  FROZEN 

AEK800  0	22   12/06/2007 03:05  12/23/2007 03:01	dlt	23213184	0 
			7   12/30/2007 03:01  12/09/2007 10:48 

C0015   0	28   11/26/2007 02:09  12/23/2007 02:01	dlt	 896448	 0 
			7   12/30/2007 02:01	N/A 

IBM001  0	16   12/16/2007  01:01  12/23/2007 01:07   dlt	 6447360	0 
			 14   12/30/2007 01:07	N/A 

L00103  0	20   12/07/2007 08:33   12/23/2007 01:07   dlt	 7657728	0
			9   12/30/2007 01:07	N/A

L00104  0	 9   12/11/2007  01:09  12/21/2007 01:04   dlt	 5429504	0 
			5   12/28/2007 01:04	N/A

EXAMPLE 2

The following example produces a media count report for robot type TLD and robot number 0:

# bpmedialist -count -rt TLD -rn 0
		ALLOW_MULT_RET_PER_MEDIA 0
		Number of UP devices for TLD(0) = 2

EXAMPLE 3

The following example produces a media contents report for media ID AEK802. The report is partially listed as follows.

# bpmedialist -mcontents -m AEK802
media id = AEK802, allocated 01/08/2007 03:10, retention level = 0

		File number 1
		 Backup id = hat_0915786605
		 Creation date = 01/08/2007 03:10
		 Expiration date = 01/15/2007 03:10

		 Retention level = 0
		 Copy number = 1
		 Fragment number = 2
		 Block size (in bytes) = 65536

	File number 2
		 Backup id = hat_0915809009
		 Creation date = 01/08/2007 09:23
		 Expiration date = 01/15/2007 09:23
		 Retention level = 0
		 Copy number = 1
		 Fragment number = 1
	Block size (in bytes) = 65536

EXAMPLE 4

In this example, bpmedialist runs on the master server buff. bpmedialist produces a Media List report for master servers hatt and duo.

# bpmedialist -M hatt,duo
Server Host = hatt

 id	 rl  images   allocated	last updated	density  kbytes   restores
		 vimages   expiration	 last read		<------- STATUS ------->
---------------------------------------------------------------------------
143191   0	 51   12/03/2008 23:02  01/11/2009 23:04	dlt	1436686	2
				9   01/18/2009 23:04  01/08/2009 10:26

144280   0	9   11/25/2008 11:06  12/01/2008 23:03	dlt	 290304	0
				0   12/08/2008 23:03  01/12/2009 16:10  EXPIRED  FROZEN

AEK800   0	 38   12/06/2008 03:05  01/08/2009 03:10	 dlt  3922200024	0
				3   01/15/2009 03:10  12/09/2008 10:48  FULL

AEK802   0	6   01/08/2009 03:10  01/12/2009 03:05	 dlt   6140544	0
				6   01/19/2009 03:05  01/12/2009 16:12

C0015	0	 48   11/26/2008 02:09  01/12/2009 02:11	 dlt   1531968	0
				7   01/19/2009 02:11	N/A

IBM000   0	 19   01/01/2009 01:09  01/12/2009 02:05	 dlt   8284224	 0
			 13   01/19/2009 02:05  01/09/2009 05:41

Server Host = duo

 id	 rl  images   allocated	last updated	density	kbytes  restores
		 vimages   expiration	 last read		<------- STATUS ------->
---------------------------------------------------------------------------
A00004   0	0   11/16/2009 05:31	N/A			4mm		 0	 0
				0	 N/A			 N/A		 FROZEN

DLT210   1	5   12/09/2008 06:10  01/08/2009 06:04	 dlt	2560	 0
				2   01/22/2009 06:04	N/A

DLT215   0	124   12/08/2008 14:57  01/12/2009 08:07	 dlt   9788072	 4
			 28   01/19/2009 08:07  12/31/2008 15:42

EXAMPLE 5

In this example, bpmedialist reports on which of two hosts has a given media ID configured. The host hatt does not have A00004 configured in its media catalog. Therefore, it reports that the requested media ID was not found in the NetBackup media catalog or Enterprise Media Manager Database.

The host duo does have A00004 configured, so it produces a Media List report for A00004 (the command is all on one line).

# bpmedialist -mlist -h hatt -h duo -m A00004
requested media id was not found in NB media database and/or MM volume database

Server Host = duo

 id	 rl  images   allocated	last updated	density	kbytes  restores
		 vimages   expiration	 last read		<------- STATUS ------->
---------------------------------------------------------------------------
A00004   0	0   11/16/2009 05:31	N/A			4mm	 0	 0
				0	 N/A			 N/A		 FROZEN

FILES

Windows systems: install_path\NetBackup\logs\admin\*