bpexpdate

Article:HOWTO43656  |  Created: 2011-03-07  |  Updated: 2011-03-07  |  Article URL http://www.symantec.com/docs/HOWTO43656
Article Type
How To


Environment

Subject


Name

bpexpdate — change expiration date of backups in image catalog and media in media catalog

SYNOPSIS

bpexpdate -m media_id -d date | 0 | infinity [-host name] [-force] [-nodelete] [-notimmediate] [-M master_server,...]

bpexpdate -deassignempty [-m media_id] [-force] [-M master_server,...]

bpexpdate -backupid backup_id -d date | 0 | infinity [-client name] [-copy number] [-force] [-nodelete] [-notimmediate] [-M master_server,...]

bpexpdate -recalculate [-backupid backup_id] [-copy number] [-d date | 0 | infinity] [-client name] [-policy name] [-ret retention_level] [-sched type] [-M master_server,...]

bpexpdate -stype server_type [-dp disk_pool_name [-dv disk_volume]] [-nodelete] [-notimmediate] [-M master_server,...]

On UNIX and Linux systems, the directory path to this command is /usr/openv/netbackup/bin/admincmd/

On Windows systems, the directory path to this command is <install_path>\NetBackup\bin\admincmd\

DESCRIPTION

NetBackup maintains catalogs, which are internal databases with backup image and media information. The image record in the image catalog contains an expiration date. The media ID in the media catalog also contains an expiration date. The expiration date is the date and time when NetBackup removes the record for a backup or a 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. The command 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 removed from the Enterprise Media Manager Database. It is removed regardless of the media's previous state (FROZEN, SUSPENDED, and so on).

You can change the expiration on a media ID basis or on an individual backup ID basis. When you change the expiration date of a media ID, the expiration date of all backups on the media are also changed. bpexpdate also provides the following options:

  • Remove media from the media catalog if they no longer contain valid backups.

  • Recalculate the expiration date to base it on the configured or a supplied retention level.

Any authorized user can run this command.

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

OPTIONS

The different formats of the command are as follows:

-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 -d expiration is greater than the current media ID expiration, the media catalog expiration also changes. 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.

-deassignempty

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

-m

Changes the expiration date or removes the media ID from the media catalog and associated backups from the NetBackup catalog. 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 you remove the media ID from the media catalog by specifying a zero date, you also remove it in the Enterprise Media Manager Database.

-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 changes according to retention level, the new date is based on the creation date of the backup plus the retention level value. 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 in the media catalog changes if the command expiration is greater than the current expiration.

-stype server_type

A string that identifies the storage server type. Possible values are AdvancedDisk, OpenStorage (vendorname), and PureDisk.

OPTIONS

-client name

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

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

For recalculate, this option causes NetBackup to recalculate the expiration date to be 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

  • 0 - the backup or media expires immediately

  • infinity - the backup never expires

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.

-deassignempty

Expires the removable media from the media catalog when that media no longer contain valid backups. It also deassigns the media ID in the Media Manager catalog.

-dp disk_pool_name -dv disk_volume

Specifies the disk pool and, optionally, the disk volume for the expiration date operation to be performed.

-force

Before you run the specified operation, bpexpdate queries before it starts the operation. This option forces the bpexpdate command to carry out the operation without querying the user.

-host name

Note:

For the NetBackup server, this option is not required because only one server (the master) exists. If you do use the option, specify the host name of that server.

Specifies the host name of the server to which the media is assigned. This option should be used only with the -m media_id option, and then only if the following is true: The master has remote media servers and the volume was not written on the server where you run bpexpdate.

For example, assume that you have a master server named whale and a media server named eel. You run the following command on whale to remove media ID BU0001 manually 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 the expiration date change affects. The expiration dates of the backups on the media ID also change. 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 fewer characters and must be in the NetBackup media catalog.

-M 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:

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.

-nodelete

Deletes the backup from the image catalog but does not delete it from the disk storage. Use this option when you unimport a disk group from one master server and import the disk group to a different master server.

-notimmediate

Inhibits the call that bpexpdate makes to the nbdelete command after it expires an image on disk. If you intend to delete many images at the same time, use -notimmediate to avoid the overhead of multiple job creation for nbdelete to process. You can then run the nbdelete command later.

-policy name

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

-recalculate

Recalculates the expiration of backups that are based on the retention level or you can specify a new expiration date. You can include other options to change the expiration for a single backup, or for the following: 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 you recalculate expiration dates and is valid with the -recalculate option. Levels range from 0 to 24. The new expiration date is the backup's creation date plus this retention level. You must specify either -backupid or -policy with this option.

-sched type

Specifies the schedule type and is valid with the -recalculate option. When the type is specified, the expiration is recalculated based on the retention level for all backups that are 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

Some options in large environments can take a significant amount of time to complete. Changes that cause backups or media to expire are irrevocable. You may be required to import backups or recover previous versions of the catalogs if you make mistakes by using this command.

EXAMPLES

Example 1 - The following command runs on the master server and removes media ID BU0002 from the media catalog. It 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 - Change the expiration of copy 2 of backupid eel_0904219764. It does not affect the expiration of copy 1 of the backup.

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

Example 3 - Remove 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 - Check for media in the media catalog of host cat that is still assigned, but no longer contain valid backups. The command removes any such media from the catalog and deassigns them in the media manager catalog.

# bpexpdate -deassignempty -host cat

Example 5 - Recalculate the expiration date of backup ID 1234 to the date 10/31/2010.

# bpexpdate -recalculate -backupid 1234 -d 10/31/10

Example 6 - Recalculate the expiration date of backup ID 1234 based on a retention level. The new retention level is 4 which is two months (default value). Backup ID 1234 is now scheduled to expire in 2 months.

# bpexpdate -recalculate -backupid 1234 -ret 4 

FILES

UNIX and Linux systems:

/usr/openv/netbackup/logs/admin/*
/usr/openv/netbackup/db/media/*
/usr/openv/netbackup/db/images/*

Windows systems:

install_path\NetBackup\logs\admin\*
install_path\NetBackup\db\media\*
nstall_path\NetBackup\db\images\*

Legacy ID



v14661605_v55366869


Article URL http://www.symantec.com/docs/HOWTO43656


Terms of use for this information are found in Legal Notices