cancel
Showing results for 
Search instead for 
Did you mean: 

command line help please

Glen_Harrison
Level 4
Hi All

new to netbackup we are running 6.0MP4 on an HP-UX master.

We have a policy called HP_820_catalog_files

is it possible from the command line to find out what tape was used the last time this job completed?

Also can you configure a volume pool/policy to use a new tape each time a policy is run?

I want to run the above policy but I want it to use a new tape each time.
4 REPLIES 4

Stumpr2
Level 6
DOCUMENTATION: The command line equivalents for running the NetBackup reports available in the NetBackup user interface
http://support.veritas.com/docs/247902


> is it possible from the command line to find out what tape was used the last time this job completed?

yes, from the commands listed in the document link I provided


> Also can you configure a volume pool/policy to use a new tape each time a policy is run?

yes, simply suspend the tape that was usedMessage was edited by:
Bob Stump

Glen_Harrison
Level 4
Thanks Bob

what command would I use to find out what tape was used the last time this job completed

Stumpr2
Level 6
USAGE: bpimagelist









There are man pages available in Netbackup. Add them to your $MANPATH.
echo $MANPATH
/usr/share/man:/usr/openwin/share/man:/usr/dt/man:/opt/openv/man:/opt/openv/netbackup/bin/goodies/man:/opt/openv/java/jre/man



# man bpimagelist
Reformatting page. Please Wait... done

Maintenance Commands bpimagelist(1M)

NAME
bpimagelist - Queries the NetBackup catalog and produces a
report on the status of the NetBackup images.

SYNOPSIS
/usr/openv/netbackup/bin/admincmd/bpimagelist -l | -L | -U |
-idonly
]


/usr/openv/netbackup/bin/admincmd/bpimagelist

]

DESCRIPTION
bpimagelist uses a specified format to report the images
that match the attributes that are sent from the commands
options. bpimagelist lists NetBackup catalog image informa-
tion. The bpimagelist command writes its debug log informa-
tion to the /usr/openv/netbackup/logs/admin directory. You
can use the information in this directory for troubleshoot-
ing.

The output of bpimagelist goes to standard output.

This command can be executed by authorized users. For more
information about NetBackup authorization, refer to the Net-
Backup System Administrator's Guide.

OPTIONS
Report-type options

-media Specifies that the listing reports on removable
media satisfying a set of criteria. If -media is
not present, the report is on images, not media,
satisfying a set of criteria.

Report-format options:

-U Report in User mode. The report is formatted, it
includes a banner listing the column titles, and
the status is a descriptive term instead of a
number.

-L Report in Long mode. For instance, for the Media

SunOS 5.9 Last change: 18 Jul 2003 1

Maintenance Commands bpimagelist(1M)

List report, the report lists the information for
each media ID as a series of attribute = value
pairs, and the density value is provided as both a
descriptive term and a number.

-l Report in Short mode. This produces a terse list-
ing. This option is useful for scripts or programs
that rework the listing contents into a customized
report format.

-idonly Produce an abbreviated listing. For an image list-
ing, the listing contains the creation time,
backup ID, and schedule type of each image. For
instance, if the listing criterion is a window of
time image listing contains, for each image
created in this window, only the creation time,
backup ID, and schedule type of the image. For a
media listing, the listing contains only the
applicable media IDs. For instance, if the list-
ing criterion is a window of time, the listing
contains only the media IDs written in this win-
dow.

The following options represent the criteria that determine
which images or media are selected for the report. Where
images are discussed in these options, media can be substi-
tuted if this is a media report.

-hoursago hours
Include images written up to this many hours ago.
This is equivalent to specifying a start time (-d)
of the current time minus hours. hours must be 1
or greater.

-option option_name
Specifies a criterion for finding images to list.
option_name is one of the following character
strings, in either upper-or lower-case:

INCLUDE_PRE_IMPORT - Include images that have com-
pleted phase one of an import. Refer to the
bpimport(1M) command description or the NetBackup
System Administrator's Guide for more information.

ONLY_PRE_IMPORT - Include only images that have
completed phase one of an import.

INCLUDE_TIR - Include images that were created by
true-image-recovery backups. Refer to the
bpcpinfo(1M) command description or the NetBackup
System Administrator's Guide for more information
on this topic.

SunOS 5.9 Last change: 18 Jul 2003 2

Maintenance Commands bpimagelist(1M)

ONLY_TIR - Include only images that were created
by true-image-recovery backups.

The default is that there are no restrictions on
the images selected.

-backupid backup_id
Specifies a backup ID to use for finding applica-
ble images (applies only to image listing).

-client client_name
Specifies a client name to use for finding backups
or archives to list. This name must be as it
appears in the NetBackup catalog. By default,
bpimagelist searches for all clients.

-server server_name
Specifies the name of a NetBackup server or ALL.
This option applies to the media report (-media).
If -server specifies a server name, the media in
the report are only the media which reside on that
server and which also satisfy the other criteria
specified by bpimagelist. For instance, if -hour-
sago 2 is specified, the media must contain an
image created in the past two hours.

The query goes to the image catalog residing on
the local master server. The master server must
allow access by the system running bpimagelist.

The default is to report all media in the image
catalog on the local master server. This is
equivalent to specifying -server ALL.

-M master_server,...
A list of alternative master servers. This is a
comma-delimited list of hostnames. If this option
is present, each master server in the list runs
the bpimagelist command. If an error occurs for
any master server, processing stops at that point.

The report is the composite of the information
returned by all the master servers in this list.
bpimagelist queries each of these master servers.
The master server returns image or media informa-
tion from the image catalogs. Each master server
must allow access by the system issuing the bpi-
magelist command.

The default is the master server for the system
running bpimagelist.

SunOS 5.9 Last change: 18 Jul 2003 3

Maintenance Commands bpimagelist(1M)

-pt policy_type
Specifies a policy type. By default, bpimagelist
searches for all policy types. policy_type is one
of the following character strings:

Informix-On-BAR

MS-Exchange-Server

MS-SQL-Server

MS-Windows-NT

NetWare

Oracle

OS/2

Standard

Sybase

NDMP

Note: The following policy types apply only to NetBackup
Enterprise Server.

AFS

DataTools-SQL-BackTrack

DB2

FlashBackup

SAP

Split-Mirror

-rl retention_level
Specifies the retention_level. The retention_level
is an integer between 0 and 24. By default, bpi-
magelist searches for all retention levels.

-d date

-e date Specifies the start and end date range for the
listing.

-d specifies a start date and time for the list-
ing. The resulting list shows only images in

SunOS 5.9 Last change: 18 Jul 2003 4

Maintenance Commands bpimagelist(1M)

backups or archives that occurred at or after the
specified date and time. The format of date
depends on the user's locale setting. See the
NOTES section for more information. For the C
locale, the date syntax is as follows:

mm/dd/yy ]]

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.

-e specifies an end date and time for the listing.

The resulting list shows only files from backups
or archives that occurred at or before the speci-
fied date and time. Use the same format as for the
start date. The default is the current date and
time.

-keyword "keyword_phrase"
Specifies a keyword phrase for NetBackup to use
when searching. The phrase must match the one
that has been previously associated with the
image. For instance, the -k option of the
bpbackup(1) or bparchive(1) command associates a
keyword with the image when the image is created.

-sl sched_label
Specifies a schedule label for the image selec-
tion. The default is all schedules.

-st sched_type
Specifies a schedule type for the image selection.
The default is any schedule type. Valid values
are:

FULL (full backup)

INCR (differential-incremental backup)

CINC (cumulative-incremental backup)

UBAK (user backup)

UARC (user archive)

NOT_ARCHIVE (all backups except user archive)

-policy name Searches for backups to import in the specified
policy. The default is all policies.

SunOS 5.9 Last change: 18 Jul 2003 5

Maintenance Commands bpimagelist(1M)

Other options:

-help Prints a command line usage message when it is the
only option on the command line.

-v Selects verbose mode. This option causes bpi-
magelist to log additional information for debug-
ging purposes. The information goes into the Net-
Backup administration daily debug log. This
option is meaningful only when NetBackup has debug
logging enabled (/usr/openv/netbackup/logs/admin
directory defined).

NOTES
The format that you must use for date and time values in
NetBackup commands varies according to the locale setting.

If you are uncertain of the NetBackup command requirements
for your locale, enter the command with the -help option and
check the USAGE. The following is part of the usage state-
ment for bpimagelist that shows the -d and -e options:



Notice the month/day/year and hours:minutes:seconds require-
ments for the -d and -e options. These are for a locale set-
ting of C and can be different for other locales.

For more information on locale, see the locale(1) man page
for your system.

EXAMPLES
Example 1

The first example shows the last time each media ID avail-
able to a server had a backup image written today:

bpimagelist -media -U

Media ID Last Written Server
-------- -------------- ----------
IBM000 01/06/2003 01:06 hat
AEK800 01/06/2003 03:01 hat
C0015 01/06/2003 02:01 hat

Example 2

The following example shows the last time the media IDs
available to the server had a backup image written during
the specified time:

SunOS 5.9 Last change: 18 Jul 2003 6

Maintenance Commands bpimagelist(1M)

bpimagelist -media -d 01/05/2003 18:00:46 -e 01/06/2003
23:59:59 -U

Media ID Last Written Server
-------- -------------- ----------
IBM000 01/06/2003 01:06 hat
AEK800 01/06/2003 03:01 hat
C0015 01/06/2003 02:01 hat
143191 01/05/2003 23:00 hat

The following example lists all images written today:

bpimagelist -U
Backed Up Expires Files KB C Sched Type Policy
-------------- -------- -------- -------- - ------------ ------------
01/27/2003 01:08 02/03/2003 1122 202624 N Full Backup 3590Grau
01/27/2003 01:01 02/03/2003 1122 202624 N Full Backup IBM3590policy
01/27/2003 03:01 02/03/2003 531 1055104 N Full Backup DELLpolicy
01/27/2003 02:01 02/03/2003 961 31776 N Full Backup QUALpolicy
01/27/2003 01:08 02/03/2003 2063 603328 N Full Backup IBM3590policy
01/27/2003 01:01 02/03/2003 2063 603328 N Full Backup 3590Grau

Example 3

The following example lists media written information for
01/05/2003:

bpimagelist -media -d 01/05/2003 -e 01/05/2003 -U
Media ID Last Written Server
-------- -------------- ----------
IBM000 01/05/2003 01:13 hat
143191 01/05/2003 23:00 hat
AEK800 01/05/2003 03:07 hat
C0015 01/05/2003 02:06 hat

FILES
/usr/openv/netbackup/logs/admin/log.mmddyy

/usr/openv/netbackup/db/images

SEE ALSO
bp(1), bparchive(1), bpbackup(1), bprestore(1)

COPYRIGHT
Copyright 2002-2004 VERITAS Software Corporation. All rights
reserved.

SunOS 5.9 Last change: 18 Jul 2003 7

Dennis_Strom
Level 6
bpimagelist -media -L -hoursago 15

How to use the "bpimagelist" utility to browse for images
and media_id where they are written to
http://support.veritas.com/docs/258813

another technote

What do the different entries in the "bpimagelist -l" output mean?
http://support.veritas.com/docs/193085