Veritas NetBackup™ Commands Reference Guide
- Appendix A. NetBackup Commands
bpexpdate — change expiration date of backups in image catalog and media in media catalog
-m media_id -d date | 0 | infinity [-host name] [-force] [-nodelete] [-notimmediate] [-force_not_complete] [-M master_server,...]
-deassignempty [-m media_id] [-force] [-M master_server,...]
-Bidfile filename | -backupid backup_id -d date | 0 | infinity [-client name] [-copy number] [-force] [-nodelete] [-notimmediate] [-force_not_complete] [-do_not_follow_dependee] [-M master_server,...]
-servername servername -d date | 0 | infinity [-force] [-nodelete] [-notimmediate] [-force_not_complete] [-M master_server,...]
-recalculate [-backupid backupid] [-copy number] [-d date | 0 | infinity] [-client name] [-policy name] [-ret retention_level] [-sched type] [-M master_server,...]
-stype server_type [-dp disk_pool_name [-dv disk_volume]] [-nodelete] [-notimmediate] [-force_not_complete] [-M master_server,...]
On UNIX 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\
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 about NetBackup authorization, see the NetBackup Security and Encryption Guide.
The command operations are as follows:
- -backupid backup_id
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.
- -Bidfile filename
Specifies a file that contains a list of backup IDs whose expiration date you want to change. List one backup ID per line in the file.
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.
Allows the expiration date of backups to be changed based on a retention level, or a new expiration date. You can change the expiration for a single backup, or for all backups for a particular client, policy, or schedule type. One of the -bybackuptime, -d, or -ret options may be used with this option.
When the -bybackuptime option is used, the expiration date of the backup is set to the creation date plus the retention level value that was originally used for the backup. After a backup has been imported, this option can be used to reset its expiration date to the original value.
Retention level 25 has a value of expire immediately. You cannot edit this value. If you set the retention level of a backup image to 25, the backup image expires immediately.
When the -ret option is used, the expiration date of the backup is set to the creation date plus the specified retention level value.
If -bybackuptime, -d, or -ret is not used with this option, the expiration date for any non-Storage Lifecycle Policy (SLP) backups are set to the creation date plus the current retention level of the schedule that wrote the backup, if it exists and the schedule's retention level has changed since the backup creation. A backup's expiration date is not recalculated under any of the circumstances shown:
An SLP created it.
If the policy and schedule that wrote the backup no longer exist.
If the retention level of the schedule that wrote the backup has not changed since the backup was created.
If the backup is on removable media, the expiration date of the media is also changed if the new expiration date of the backup is later than the current media expiration date.
- -servername server_name
Specifies the name of a server that the expiration date change affects. The server name refers to a field of the image fragment record where the fragment resides. This server is the media server that performs the data movement. For snapshots, this server is the client where the snapshot resides.
- -stype server_type
Specifies a string that identifies the storage server type. The server_type value can originate from one of the following sources:
Veritas provided storage. Possible values are AdvancedDisk and PureDisk.
Third-party disk appliances. The vendor supplies the server_type string.
Cloud storage. The cloud stype values reflect the cloud storage provider. Determine the possible values with the csconfig command, as shown. The information in bold (bold added for emphasis) is the required information for the -stype option. Please note the output of the csconfig command can change based on the currently supported providers.
root:~# csconfig cldprovider -l amazon (Amazon - Simple Storage Service) amazongov (Amazon GovCloud - Simple Storage Service) azure (Microsoft Azure - Microsoft Azure Storage Service) cloudian (Cloudian HyperStore - Cloudian HyperStore Object Storage) google (Google Nearline - Google Cloud Storage Nearline) hitachi (Hitachi Cloud Service (HCS) - Hitachi Off Premise Public Cloud) hitachicp (Hitachi Content Platform (HCP) - Hitachi On Premise Private Cloud) swiftstack (SwiftStack - SwiftStack Object Storage) verizon (Verizon - Verizon Cloud Storage)
Cloud storage stype values must incorporate a suffix (for example,
amazon_crypt). Possible suffixes are:
_raw: The NetBackup backup image is sent to the cloud in raw format. Use this option if you do not want to compress or encrypt data before sending to cloud storage.
_rawc: Compresses the raw data before it is written to the cloud storage.
_crypt: Encrypt the data using AES-256 encryption before writing the data to cloud storage. You must have KMS configured in NetBackup to use this option.
_cryptc: Compress and encrypt the data before writing to cloud storage.
The storage server type is case sensitive.
Specifies that the expiration date is set to the backup creation date plus the retention level value that was used for the backup.
- -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:
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
/usr/openv/msg/.conffile (UNIX) 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.
For more about the locale of your system, see "About specifying the locale of the NetBackup installation" in the NetBackup Administrator's Guide, Volume II.
Searches the catalog for the removable media that no longer contain valid backups. It removes the media from the media 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.
By default, when a dependent image is expired, an eligible dependee image is also expired. The -do_not_follow_dependee option overwrites this behavior, so that the image expiration does not affect the dependee image.
- -dp disk_pool_name -dv disk_volume
Specifies the disk pool and, optionally, the disk volume for the expiration date operation to be performed.
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.
By default, an SLP-managed image or its copies cannot be expired if SLP processing is still in progress. The -force_not_complete option overrides this restriction and expires the image even if it is not SLP complete. Note that when you terminate further SLP processing of an image, other image copies may expire as well.
- -host name
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
Checks if valid backups exist on this particular media ID. This option is used only with the -deassignempty 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.
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.
Allows the expiration date of backups to be changed based on the specified retention level, or you can specify a new expiration date. You must specify either the -d or -ret option with this option. 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. You can change the expiration 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.
- -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 100. The new expiration date is the backup's creation date plus this retention level. You must specify either -backupid or -policy with this option.
If you run this command on a pre-NetBackup 8.0 media server, you can only specify a retention level between 0 and 24.
- -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.
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
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/2012 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/2012.
# bpexpdate -recalculate -backupid 1234 -d 10/31/12
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
/usr/openv/netbackup/logs/admin/* /usr/openv/netbackup/db/media/* /usr/openv/netbackup/db/images/*
install_path\NetBackup\logs\admin\* install_path\NetBackup\db\media\* nstall_path\NetBackup\db\images\*