<admin_dir_path>bpimmedia [-disk_stu storage_unit_label | [-dt disk_type | -stype server_type [-dp disk_pool_name [-dv disk_volume]] [-legacy]]] [-l | -L] [-disk | -tape] [-policy policy_name] [-client client_name] [-d date time] [-e date time] [-mediaid media_id | path_name] [-mtype image_type] [-option option_name] [-rl retlevel] [-sl sched_label] [-t sched_type] [-M master_server...] [-verbose]
bpimmedia queries the NetBackup image catalog and produces the following two types of reports on the images:
The first form of bpimmedia in the SYNOPSIS displays a set of NetBackup images in the Images-on-Media report. This report lists the contents of media as recorded in the NetBackup image catalog.
You can generate this report for any medium including disk. Filter the report contents according to client, media ID, path, and so on.
Refer to the section on NetBackup Reports in the NetBackup Administrator's Guide for more information, including details about the fields in the Images-on-Media report.
The report does not show information for the media that is used in backups of the NetBackup catalogs.
Several options (-dt, -dp, -dv, -stype) report images present on SAN disk storage only, not on any other disk-resident images. Other options and output format continue to function as before.
The second SYNOPSIS form of bpimmedia uses -spanpools to list the disk ID pools that are related because images span from one volume to another. The output lists, for each media server in the cluster, the media IDs that have spanned images. The -spanpools form of bpimmedia must be run on the NetBackup master server that administers the volumes.
For more information on spanned images, see the Spanning Media topic in the NetBackup Administrator's Guide.
Only removable media types are processed.
bpimmedia sends its error messages to stderr
. bpimmedia
sends a log of its activity to the NetBackup admin log file for the
current day.
Authorized users can run this command.
For more information about NetBackup authorization, refer to the NetBackup Security and Encryption Guide.
Client name. This name must be as it appears in the NetBackup catalog. By default, bpimmedia searches for all clients.
Copy number (1 or 2) of a backup ID. The default is copy 1. This option is used only in combination with -spanpools.
Specifies the start date and end date range for the listing.
-d specifies a start date and time for the listing. The output list shows only images in backups or the archives that occurred at or after the specified date and time.
-e specifies an end date and time for the listing. The output list shows only files from backups or the archives that occurred at or before the specified date and time. Use the same format as for the start date. The default is the current date and time.
The valid range of dates is from 01/01/1970 00:00:00 to 01/19/2038 03:14:07. The default is the previous midnight.
The required date and
time values format in NetBackup commands varies according to your
locale. The /user/openv/msg/.conf
file (UNIX and Linux) and the install_path\VERITAS\msg\LC.CONF
file
(Windows) contain information such as the date-time formats for
each supported locale. The files contain specific instructions on
how to add or modify the list of supported locales and formats.
More information is available about the locale of your system.
See the "Specifying the locale of the NetBackup installation" topic in the NetBackup Administrator's Guide, Volume II.
The following is part of the -help USAGE statement for -bpimagelist that shows the -d and -e options:
Specifies the type of disk storage. The following are valid options:
Displays the images that reside on the specified disk volume only. The input value is the volume path for NearStore, the path for BasicDisk, and the volume name for SharedDisk (NetBackup 6.5 media servers only).
The list type is short. This setting is the default if the command line has no list-type option (for example, if you enter bpimmedia and a carriage return).
A list of alternative master servers. This list is a comma-separated list of hostnames. If this option is present, the command is run on each of the master servers in this list. The master servers must allow access by the system that issues the command. If an error occurs for any master server, the process stops at that point in the list. The default is the master server for the system where the command is entered.
This ID is either a VSN or an absolute pathname. If the media ID is a VSN, it is a one- to six-character string. If the media ID is a pathname, it is the absolute pathname of the file system for a disk storage unit.
When -mediaid is specified, the Images-on-Media report displays only the images that are stored on this VSN or pathname. By default, the report displays the images that are stored on all media IDs and pathnames.
For the Spanpools report (-spanpools), only a VSN can follow -mediaid. If -mediaid is omitted when -spanpools is present, bpimmedia displays all media in all spanning pools.
Searches for images with the specified policy name. By default, bpimmedia searches for images for all policies.
Specifies the retention_level. The retention_level is an integer between 0 and 24. By default, bpimmedia searches for all retention levels.
Searches for images with the specified schedule label. By default, bpimmedia searches for images for all schedule labels.
Specifies that bpimmedia should create a Spanpools report. The default (-spanpools not present on the command line) is to create an Images-on-Media report.
Specifies a string that identifies the storage server type. Possible values are AdvancedDisk, OpenStorage (vendorname), PureDisk, and SharedDisk (NetBackup 6.5 media servers only).
The Images-on-Media report consists of two formats, short (-l or default) and long (-L).
To process and use the output of bpimmedia, use the -l option. The output of bpimmedia that uses the -L or -U options may be truncated for the Backup-ID, Policy, and Host columns. The -L or -U options are useful when you want to obtain a quick, more readable view of the NetBackup images on media.
The following shows the long display format (-L) and the short display format (-l) of the Images-on-Media report:
If the command line contains -L, the display format is long. It contains a multi-line entry for each backup image. The number of lines for an entry is n+1, where n is the number of fragments for the image. The fields for an entry are listed later. The first line of the entry contains the fields Backup_ID...Expires. Each fragment in the image has a line that contains the fields Copy_Media ID. The report has a two-line header. The first header line lists the field names for line 1 of each entry. The second header line lists the field names for the lines that contain fragment information.
See the bpduplicate command page for more information on the copy number and primary copy.
Fields and meanings for the -L format are as follows:
Backup-ID - Unique identifier for the backup that produced this image
Policy - Policy name (may be truncated if long)
Type - Schedule type (FULL, etc.)
Files - Number of files in the backup
R - Regular (scheduled or user-directed backup)
P - Pre-imported backup (phase 1 completed)
PC - Primary copy, 1 or 2. Designates which copy of the backup NetBackup chooses when it restores.
Expires - The expiration date of the first copy to expire, which appears in the Expires field of the fragment, which is described later.
Copy - Copy number of this fragment
Frag - Fragment number or IDX for a true-image-restore (TIR) fragment
KB - Size of the fragment, in kilobytes. This value does not include the size of tape headers between backups. A fragment size of 0 is possible for a multiplexed backup.
Type - Media type (Rmed - removable media; Disk otherwise)Density - Density of the removable media that produced the backupFnum - File number; the n-th backup on this removable media Host - Server whose catalog contains this imageDWO - Device Written On; device where the backup was written. The DWO matches the drive index as configured in Media Manager (applies only to removable media).
MPX - Flag that indicates whether this copy is multiplexed: Y or N (applies only when fragment number is 1)
Expires - The expiration date of this copy (applies only when fragment number is 1)
MediaID - Media ID or absolute path where the image is stored
Example of Long display format:
bpimmedia -L -policy regr1_gava -t FULL Backup-ID Policy Type RL Files C E T PC Expires Copy Frag KB Type Density FNum Host DWO MPX Expires MediaID ---------------------------------------------------------------- gava_0949949902 r1_guav FULL 3 25 N N R 1 12:58 03/09/2007 1 1 256 RMed dlt 13 0 plim 0 Y 12:58 03/09/2007 A00002
If the bpconfig command line contains -l or contains no list-format option, the display format is short, which produces a terse listing. This option can be useful for scripts or the programs that rework the listing into a customized report format. The -l display format contains a multi-line entry for each backup image. The number of lines per entry is n+1, where n is the number of fragments for the image. The layout of an entry is a first line that contains information about the image. A second line follows that contains information about each fragment of the image. The attributes appear in the following order (separated by blanks).
Fields for the -l format are as follows:
IMAGE - Identifies the start of an image entry
Client - Client for the backup that produced this image
Backup-ID - Unique identifier for the backup that produced this image
Policy type - 0 denotes Standard, etc. Run bpimmedia -L or refer to bpbackup to interpret the policy-type value as a policy-type name.
Type - Schedule type (full, etc.)
Expiration date or time - The expiration date of the first copy to expire. It appears in the Expires field of the fragment, which is described later (system time). A value of zero (0) denotes an image in progress or failed.
C - Compression; 1 (yes) or 0 (no)
E - Encryption; 1 (yes) or 0 (no)
FRAG - Identifies a fragment line in an image entry
Copy - Copy number of this fragment
Frag - Fragment number, or -1 for a TIR fragment
KB - Size of the fragment in kilobytes
MPX - Flag that indicates whether this copy is multiplexed, 1(yes) or 0(no) (applies only when fragment number is 1)
Expires - The expiration date of this copy in system time (applies only when fragment number is 1)
Disk type - BasicDisk (1), NearStore (2), SAN Disk (4)
Disk pool name - Only applies to SAN Disk. All other disk types show *NULL*.
Media ID - volume path if NearStore, path if BasicDisk, or volume name if SAN Disk
Density - Density value (applies only to removable media). Run bpimmedia -L or bpmedialist -mlist -L -m mediaid to interpret the density value as a density label
Fnum - File number; the n-th backup on this removable media
MediaID - Media ID or absolute path where the image is stored
Host - Server whose catalog contains this image
Block size - Number of kilobytes per block for this medium
Media date - Time this medium was allocated (system time)
DWO - Device Written On (applies only to removable media)
Example of the short display format:
# bpimmedia -l -policy regr1_gava -t FULL IMAGE gava 3 gava_0949949902 regr1_gava 0 full 0 3 25 952628302 0 0 FRAG 1 1 10256 512 2 13 13 A00002 plim 65536 0 949616279 0 0 *NULL* 952628302 1
The Spanpools report has two formats: user (-U option) and short (the default). Both formats list the server name and the pool data for each server. It lists the media IDs for each pool of media that share spanned backup images. When -mediaid appears on the command line, only the server pool and the disk pool that are related to that media ID appear.
If you want to process and use the output of bpimmedia, we recommend that you use the -l option. The output of bpimmedia that uses the -U or -L options may be truncated for the Backup-ID, Policy, and Host columns. The -U or -L options are useful when you want to obtain a quick, more readable view of the NetBackup images on media.
The user (-U) display format looks like the following:
# bpimmedia -spanpools -U Related media pools containing spanned backup images, server plim: Pool: A00002 A00003 Pool: 400032
The short display format looks like the following
bpimmedia -spanpools SERVER plim POOL A00002 A00003 POOL 400032
List the images for policy c_NDMP. This request runs on a NetBackup media server. The report is based on the image catalog on the media server's master server, almond.
# bpimmedia -L -policy c_NDMP Backup-ID Policy Type RL Files C E T PC Expires Copy Frag KB Type Density FNum Off Host DWO MPX Expires MediaID -------------------------------------------------------------------------------------- t_0929653085 c_NDMP FULL 3 5909 N N R 1 15:58 07/18/2007 1 IDX 844 RMed dlt 2 0 almond 3 CB7514 1 1 9136 RMed dlt 1 0 almond 3 N 15:58 07/18/2007 CB7514
The following example displays the tapes that are required to restore a particular file. If the bpimmedia command line provides the criteria to identify an individual backup, the output shows the media that was used for the backup.
In this case, the command
line provides the client, the date of the backup and the schedule
type. The output shows that tape A00002 on the server plim
contains the backup.
# bpimmedia -L -client gava -d 2/7/2007 -t UBAK Backup-ID Policy Type RL Files C E T PC Expires Copy Frag KB Type Density FNum Off Host DWO MPX Expires MediaID --------------------------------------------------------------------------------------- ------ gava_0949949686 regr1_guav UBAK 3 25 N N R 1 12:54 03/09/2007 1 1 10256 RMed dlt 11 0 plim 0 Y 12:54 03/09/2007 A00002
List in long format all
the backups in the image catalog on master server gava
.
# bpimmedia -L -M gava Backup-ID Policy Type RL Files C E T PC Expires Copy Frag KB Type Density FNum Off Host DWO MPX Expires MediaID -------------------------------------------------------------------------------------- gava_0949599942 test-policy FULL 1 15 N N R 1 11:45 02/17/2007 1 1 224 Disk - - - gava - N 11:45 02/17/20 /var/qatest/storage_unit//gava_0949599942_C1_F1
List in long format the backups on media ID CB7514.
# bpimmedia -L -mediaid CB7514 Backup-ID Policy Type RL Files C E T PC Expires Copy Frag KB Type Density FNum Off Host DWO MPX Expires MediaID -------------------------------------------------------------------------------------- toaster1_0929679294 tort_policy FULL 3 5898 N N R 1 23:14 07/18/2007 1 IDX 839 RMed dlt 4 0 almond 6 CB7514 1 1 27154 RMed dlt 3 0 almond 6 N 23:14 07/18/2007 CB7514 toaster1_0929653085 NDMP_policy FULL 3 5909 N N R 1 15:58 07/18/2007 1 IDX 844 RMed dlt 2 0 almond 3 CB7514 1 1 9136 RMed dlt 1 0 almond 3 N 15:58 07/18/2007 CB7514
An exit status of zero (0) means that the command ran successfully.
Any exit status other than zero (0) means that an error occurred.
If the administrative log function is enabled, the exit status is logged in the administrative daily log under the log directory:
Windows systems: install_path\NetBackup\logs\admin
bpimmedia: EXIT status = exit status