bpimport

bpimport — import NetBackup and Backup Exec backups that are expired or are from another NetBackup or Backup Exec Server

SYNOPSIS

<admin_dir_path>bpimport -create_db_info -id media_id or path | -stype server_type [-dp disk_pool_name [-dv disk_volume]] [-server name] [-L output_file [-en]] [-passwd] [-local] [-nh ndmp_host [-mst media_subtype]]

<admin_dir_path>bpimport [-l] [-p] [-pb] [-PD] [-PM] [-v] [-local] [-client name] [-M master_server] [-Bidfile file_name] [-st sched_type] [-sl sched_label] [-L output_file [-en]] [-policy name] [-s startdate] [-e enddate] [-pt policy_type] [-hoursago hours] [-cn copy_number] [-backupid backup_id] [[-id media_id | path] | -stype server_type]] [-dp disk_pool_name [-dv disk_volume]] [-priority number]

On Windows systems, <admin_dir_path> is <install_path>\NetBackup\bin\admincmd\

DESCRIPTION

The bpimport command allows backups to be imported. This command is useful for importing expired backups or the backups from another NetBackup server.

The import operation consists of the following two steps:

  • Step 1 is performed with the first form of the command that appears in the Synopsis (-create_db_info option). This step recreates catalog entries for the backups that are on the specified media.

  • Step 2 is performed with the second form of the command that appears in the Synopsis. This step imports the backups from the media.

The expiration date for imported backups is the current date plus the retention period. For example, if a backup is imported on 14 November 2006 and its retention level is one week, its new expiration date is 21 November 2006.

You can import a backup only if all copies of it are expired.

For more information on how to import backups, see the NetBackup Administrator's Guide.

OPTIONS

-backupid backup_id

Specifies the backup ID of a single backup to import.

-Bidfile file_name

file_name specifies a file that contains a list of backup IDs to import. List one backup ID per line in the file. If this option is included, other selection criteria are ignored.

In addition, NetBackup removes the file that is specified with the -Bidfile parameter during the activation of that command line interface (CLI). It is removed because the NetBackup GUIs commonly use this parameter. The GUIs expect the command-line interface to remove the temporary file that was used for the -Bidfile option upon completion. Direct command-line interface users can also use the option, however it removes the file.

-client name

The host name of the client for which the backups were performed. The default is all clients.

-cn copy_number

Specifies the source copy number of the backups to import. Valid values are 1 through 10. The default is all copies.

-create_db_info

This option recreates catalog entries for the backups that are on the specified media. It skips the backups that are already in the catalog. This option only creates information about the backups that are candidates for import, and does not perform the import operation. The bpimport command must be run with this option before you import any backups.

-dp disk_pool_name [-dv disk_volume]

Imports images on the specified disk pool only. Optionally, the import can be restricted to the images that reside on the specified disk volume only. The disk_volume argument is the volume path for NearStore, the path for BasicDisk, and the volume name for SharedDisk (NetBackup 6.5 media servers only).

Option -stype is required with this option.

-e enddate, -s startdate

Specifies the start date and end date range for all backups to import.

-s specifies a start date and time for the listing. The output list shows only images in backups or the archives that occurred at or after the specified date and time. The default for the start date is 24 hours before the current date and time.

-e specifies an end date and time for the listing. The output list shows only files from backups or the archives that occurred at or before the specified date and time. Use the same format as for the start date. The default is the current date and time.

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.

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.

The following is part of the -help USAGE statement for -bpimagelist that shows the -s and -e options:

-s mm/dd/yy [hh[:mm[:ss]]] -e mm/dd/yy [hh[:mm[:ss]]]

-hoursago hours

Specifies the number of hours to search before the current time for backups. Do not use with the -s option. The default is the previous midnight.

-id media_id | path

Disk media:

Specifies the path to the storage directory that contains the backup to be imported.

Tape media:

For step 1 (-create_db_info), this option specifies the media ID that has the backups you plan to import. This option is required with -create_db_info.

For step 2, this option designates a specific media ID from which to import backups. The default is all media IDs that were processed in step 1 of the import operation.

A backup ID that begins on a media ID that step 1 does not process, does not import (the backup is incomplete).

-L output_file [-en]

Specifies the name of a file in which to write progress information. The default is not to use a progress file.

Include the -en option to generate a log that is in English. The name of the log contains the string _en. This option is useful to support the personnel that assist in a distributed environment where different locales may create logs of various languages.

-l

Produces the output in the progress log that lists each imported file.

-local

When a host other than master server initiates bpimport and -local is not used (default), the following occurs: bpimport starts a remote copy of the command on the master server.

The remote copy allows the command to be terminated from the Activity Monitor.

Use -local to prevent the creation of a remote copy on the master server. You also can use it to run the bpimport only from the host where it was initiated.

If the -local option is used, bpimport cannot be canceled from the Activity Monitor.

-M master_server

Note:

This option is not required for NetBackup server because it has only one server, the master. If you do use this option in this case, specify the NetBackup master where you run the command.

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:

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.

-p

Previews backups to import according to the option settings, but does not perform the import. Displays the media IDs, server name, and information about the backups to import.

-passwd

Catalogs the password-protected Backup Exec media when used with the Backup Exec tape reader option. bpimport prompts the user for the password and compares it with the password on the media. If the passwords match, the job proceeds. If the passwords do not match, the job fails.

Use -passwd only when Backup Exec media are imported and password protected. This media can be imported only on a Windows media server.

-pb

Previews the backups to import but does not perform the import. Similar to the -p option, but does not display the backups.

-PD

Same as the -PM option, except the backups sort by date and time (newest to oldest).

-PM

Displays the information on the backups to be imported according to the option settings, but does not perform the import. It displays the date and time of the backup, and the policy, schedule, backup ID, host, and media ID.

-policy name

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

-priority number

Specifies a new priority for the import job that overrides the default job priority.

-pt policy_type

Searches for the backups that the specified policy type created. The default is any policy type.

Valid values are:

Informix-On-BAR
MS-Exchange-Server
MS-SharePoint
MS-SQL-Server
MS-Windows-NT
NDMP
NetWare
Oracle
OS/2
Standard
Sybase

The following policy types apply only to NetBackup Enterprise Server:

AFS
DataTools-SQL-BackTrack
DB2
Enterprise-Vault
FlashBackup
SAP
Split-Mirror
-server name

Specifies the name of the media server. The volume database for this server must have a record of the media ID that contains the backups to import. The default is the media server where the command is run.

Note:

The NetBackup server has only one server (the master). When you use NetBackup server, specify the name of that server.

-sl sched_label

Search for backups to import that the specified schedule created. The default is all schedules.

-st sched_type

Search for backups to import that the specified schedule type created. The default is any schedule type.

Valid values are as follows:

FULL (full backup)

INCR (differential-incremental backup)

CINC (cumulative-incremental backup)

UBAK (user backup)

UARC (user archive)

NOT_ARCHIVE (all backups except user archive)

-stype server_type

A string that identifies the storage server type. Possible values are AdvancedDisk, OpenStorage (vendorname), PureDisk, and SharedDisk (NetBackup 6.5 media servers only).

-v

Displays more information in the debug logs and progress logs.

EXAMPLES

EXAMPLE 1

The following command (all on one line) creates catalog information for backups on media ID A0000. The media host hostname is cat. The progress file is bpimport.ls, which is located in the tmp directory.

Windows systems: # bpimport -create_db_info -id A0000 -server cat -L \tmp\bpimport.ls

EXAMPLE 2

The following command (all on one line) displays information about the backups that are candidates for import. The backups that appear were created between 11/01/2006 and 11/10/2006. The bpimport command with the -create_db_info option must be run before this command.

# bpimport -PM -s 11/01/2006 -e 11/10/2006

EXAMPLE 3

The following command imports the backups that were specified in the images file. The progress is entered in the bpimport.ls file.

Windows systems: # bpimport -Bidfile \tmp\import\image -L \tmp\bpimport.ls

FILES

Windows systems:

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