|Article:HOWTO43656|||||Created: 2011-03-07|||||Updated: 2011-03-07|||||Article URL http://www.symantec.com/docs/HOWTO43656|
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:
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.
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.
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.
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.
- -stype server_type
- -client name
- -copy number
- -d date
Specifies the expiration date and time. date can be any one of the following:
The required date and time values format in NetBackup commands varies according to your locale. The
/user/openv/msg/.conffile (UNIX and Linux) and the
install_path\VERITAS\msg\LC.CONFfile (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.
- -dp disk_pool_name -dv disk_volume
- -host name
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
- -m media_id
- -M master_server [,...]
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.
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.
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:
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.
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
# bpexpdate -backupid eel_0904219764 -d 12/20/2010 08:00:00 -copy 2
# 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
# 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
Article URL http://www.symantec.com/docs/HOWTO43656