cancel
Showing results for 
Search instead for 
Did you mean: 

delete a image

Andrew_J_
Level 3
Is there a command line for netbackup MP5 (for windows) for delete a specific image from my catalog?

thank's a lot
2 REPLIES 2

Stumpr2
Level 6
What a strange name you post with...

oh.
Yes the command bpexpdate works just fine.
To expire the entire media:
bpexpdate -m -d 0

To expire a single image on a media
bpexpdate -backupid -d 0
There are other options available and I suggest you read the man page available on this command

# man bpexpdate

bpexpdate(1M) bpexpdate(1M)
18 Jul 2003

NAME
bpexpdate - Change the expiration date of backups in the image catalog
and media in the media catalog.

SYNOPSIS
/usr/openv/netbackup/bin/admincmd/bpexpdate -m media_id -d date ]

/usr/openv/netbackup/bin/admincmd/bpexpdate -deassignempty ]

/usr/openv/netbackup/bin/admincmd/bpexpdate -backupid backup_id -d date
|0|infinity ]

/usr/openv/netbackup/bin/admincmd/bpexpdate -recalculate -d date |0|infinity] ]

DESCRIPTION
NetBackup maintains internal databases with backup image and media
information. These internal databases are called catalogs. Both an
image record in the image catalog and a media ID in the media catalog
contain an expiration date. The expiration date is the date and time
when NetBackup removes the record for a backup or media ID from the
corresponding catalog.

The bpexpdate command allows the expiration date and time of backups
to be changed in the NetBackup image catalog. It is also used to
change the expiration of removable media in the NetBackup media
catalog. If the date is set to zero, bpexpdate immediately expires
backups from the image catalog or media from the media catalog. When a
media ID is removed from the NetBackup media catalog, it is also
deassigned in the Media Manager volume database, regardless of the
media's prior state (FROZEN, SUSPENDED, and so on).

Changing the expiration can be done on a media ID basis or on an
individual backup ID basis. Changing the expiration date of a media ID
also causes the expiration date of all backups on the media to be
changed. bpexpdate also provides options to deassign media from the
media catalog if they no longer contain valid backups and to
recalculate the expiration date based on the configured or a supplied
retention level.

The different formats of the command are described below.

+ -m

Changes the expiration date or removes the media ID from the
media catalog and associated backups from the NetBackup catalog.

- 1 - Formatted: December 6, 2004

bpexpdate(1M) bpexpdate(1M)
18 Jul 2003

A separate expiration date is maintained in the image catalog for
each copy of a backup. When this format is used, only the
expiration of the copy on the media is affected. If the media ID
is removed from the media catalog by specifying a zero date, the
media ID is also deassigned in the Media Manager volume database.

+ -deassignempty

Searches the catalog for removable media that no longer contain
valid backups, removes it from the media catalog, and deassigns
the media IDs in the Media Manager catalog. The media is then
available to be used again. You can use the NetBackup Images on
Media report to determine if there are assigned media that no
longer contain valid backups.

+ -backupid

Changes the expiration of a single backup. If the date is zero,
the backup is removed from the image catalog. If the backup is on
removable media and the expiration date given by the -d option is
greater than the current expiration of the media ID, the
expiration date of the media ID in the media catalog is also
changed. The change affects all copies of a backup, unless the
-copy option is used. The -copy option causes only the specified
copy to be affected.

+ -recalculate

Allows the expiration date of backups to be changed based on the
specified retention level or you can specify a new expiration
date. When the expiration is changed according to retention
level, the new date is calculated based on the creation date of
the backup plus the value of the retention level. The expiration
can be changed for a single backup, or for all backups for a
particular client, policy, or schedule type.

If the backup is on removable media, the expiration date of the
media ID in the media catalog is changed, providing the
expiration date on this command is greater than the current
expiration of the media ID.

This command can be executed by any authorized users. For more
information about NetBackup authorization, refer to "Enhanced
Authorization and Authentication" in the NetBackup System
Administrator's Guide.

OPTIONS
-client name
Specifies the client name for the -backupid and -recalculate
operations.

- 2 - Formatted: December 6, 2004

bpexpdate(1M) bpexpdate(1M)
18 Jul 2003

For the backupid operation, this option causes NetBackup to
first search for the backup ID for the specified client,
which is useful if the client name has changed.

For the recalculate operation, this option causes NetBackup
to recalculate the expiration date based on the retention
level for all the specified client backups.

-copy number
Expires or changes the expiration date of the specified copy
number and is valid only with the -backupid and -recalculate
options. Valid values are 1 through 10.

If the primary copy is expired, the other copy becomes the
primary copy. If this option is not specified, the
expiration affects both copies of the backup.

-d date Specifies the expiration date and time. date can be any one
of the following:

mm/dd/yy hh:mm:ss

or

0

or

infinity

If 0 is specified, the backup or media is expired
immediately. If infinity is specified the backup is never
expired.

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

-deassignempty
Expires removable media from the media catalog when that
media no longer contains valid backups and also deassigns
the media ID in the Media Manager catalog.

-force Prior to running the specified operation, bpexpdate queries
before starting the operation. This option forces bpexpdate
to carry out the operation without querying the user.

-host name

- 3 - Formatted: December 6, 2004

bpexpdate(1M) bpexpdate(1M)
18 Jul 2003

Note: For NetBackup Server this option is not required because
there is only one server (the master), so if you do use the
option specify the host name of that server.

Specifies the host name of the server where the media
catalog resides. This option is required only if the master
has remote media servers and the volume was not written on
the server where you run the bpexpdate command. In this
case, the media ID is in the NetBackup media catalog on the
server where the media was written and you must specify the
name of that server on the bpexpdate command.

For example, assume you have a master server named whale and
a media server named eel. You run the following bpexpdate
command on whale in order to manually remove media ID BU0001
from the media catalog , and all corresponding backups from
the image catalog:

bpexpdate -m BU0001 -d 0 -host eel

You can use the NetBackup Media List report to determine
which server's media catalog has the volume.

-m media_id
Specifies the media ID that is affected by the expiration
date change. The expiration dates of the backups on the
media ID are also changed. The -d option must be included
with this option.

This option can also be used when the -deassignempty option
is specified to check if valid backups exist on this
particular media ID. In this case, do not include the -d
option.

The media ID must be six or less characters and must be in
the NetBackup media catalog.

-M master_server,...,master_server
Specifies the master server that manages the media catalog
that has the media ID. If this option is not specified, the
default is one of the following:

For NetBackup Server:

NetBackup Server supports only one server (the master) with
no remote media servers. Therefore, the default in this case
is always the master server where you run the command.

For NetBackup Enterprise Server:

- 4 - Formatted: December 6, 2004

bpexpdate(1M) bpexpdate(1M)
18 Jul 2003

If the command is run on a master server, then that server
is the default.

If the command is run on a media server that is not the
master, then the master for that media server is the
default.

-policy name
Specifies the policy name and is valid with the -recalculate
option. When specified, the expiration is recalculated
based on the retention level for all backups created in this
policy.

-recalculate
Recalculates the expiration of backups based on the
retention level or you can specify a new expiration date.
Other options can be included in order to change the
expiration for a single backup, or for all backups for a
specific client name, policy name, or schedule type. Either
the -d or -ret option must be specified with this option.

-ret retention_level
Specifies the retention level to use when recalculating
expiration dates and is valid with the -recalculate option.
Levels range from 0 to 24. The new expiration date is
determined by adding the configured retention level value to
the backup's creation date. Either the -backupid or -policy
option must be specified with this option.

-sched type
Specifies the schedule type and is valid with the
-recalculate option. When specified, the expiration is
recalculated based on the retention level for all backups
created with this schedule type. Enter a numeric value for
type as follows:

0 = Full

1 = Differential Incremental

2 = User Backup

3 = User Archive

4 = Cumulative Incremental

The -policy option must be specified with -sched.

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

- 5 - Formatted: December 6, 2004

bpexpdate(1M) bpexpdate(1M)
18 Jul 2003

If you are uncertain of the NetBackup command requirements for your
locale, enter the command with the -help option and check the USAGE.
For example, the following is the output for the -d option:

-d

Notice the month/day/year and hours:minutes:seconds requirements.
These are for a locale setting of C and can be different for other
locales. See the locale(1) man page for detailed information.

Some options in large environments can take a significant amount of
time to complete. Changes that cause backups or media to expire are
irrevocable; importing backups and (or) recovering previous versions
of the catalogs can be required if mistakes are made using this
command.

EXAMPLES
Example 1

The following command, run on the master server, removes media ID
BU0002 from the media catalog, and deassigns the media ID in the Media
Manager catalog. It also expires associated image records in the image
catalog.

bpexpdate -m BU0002 -d 0

Example 2

The following command changes the expiration of copy 2 of backupid
eel_0904219764. The expiration of copy 1 of the backup is not
affected.

bpexpdate -backupid eel_0904219764 -d 12/20/2003 08:00:00 -copy 2

Example 3

The following command removes the backup from the image catalog. Since
the -copy option is not specified, all copies are removed.

bpexpdate -backupid eel_0904219764 -d 0

Example 4

The following command checks for all media in host cat's media catalog
that are still assigned but no longer contain valid backups. If any
such media are found, the command removes them from the media catalog
and deassigns them in the Media Manager catalog.

bpexpdate -deassignempty -host cat

- 6 - Formatted: December 6, 2004

bpexpdate(1M) bpexpdate(1M)
18 Jul 2003

FILES
/usr/openv/netbackup/logs/admin/*

/usr/openv/netbackup/db/media/*

/usr/openv/netbackup/db/images/*

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

- 7 - Formatted: December 6, 2004

Andrew_J_
Level 3
Thank's Bob
I have wrong to register my name...