Veritas NetBackup™ Commands Reference Guide
- Introduction
- Appendix A. NetBackup Commands
Name
bpimport — import NetBackup backups that are expired or are from another NetBackup Server
SYNOPSIS
-create_db_info -id media_id or path | -stype server_type [-dp disk_pool_name [-dv disk_volume]] [-server name] [-L output_file [-en]] [-local] [-nh ndmp_host [-mst media_subtype]]
-drfile -id media_id or path | -stype server_type [-dp disk_pool_name [-dv disk_volume]] -drfile_dest dir_name_on_master [-client name] [-server name] [-L output_file [-en]] [-priority number]
[-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] [-from_replica]
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\
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 phases:
Phase 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.
Phase 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 2012 and its retention level is one week, its new expiration date is 21 November 2012.
You can import a backup only if all copies of it are expired.
For more about how to import backups, see the NetBackup Administrator's Guide, Volume I.
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 path for BasicDisk.
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.
-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
/usr/openv/msg/.conf
file (UNIX) and theinstall_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.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.
The following is part of the -help USAGE statement for -bpimport that shows the -s and -e options:
-s mm/dd/yy [hh[:mm[:ss]]] -e mm/dd/yy [hh[:mm[:ss]]]
- -from_replica
Scans for images only that are capable of automatic import and places them in the Storage Lifecycle Policy automatic import worklist. This option is part of Phase 1 of the import.
- -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.
Example for UNIX systems,
/usr/openv/netbackup/logs/user_ops
Example for Windows systems,
c:\Program Files\Veritas\NetBackup\logs\user_ops
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.
Only default paths are allowed for this option and Veritas recommends to use the default paths. If you cannot use the NetBackup default path in your setup, you should add custom paths to the NetBackup configuration.
For more information on how to add a custom path, see the "BPCD_WHITELIST_PATH option for NetBackup servers and clients" topic in the NetBackup Administrator's Guide, Volume I.
- -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.
- -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.
The policy_type is one of the following character strings:
Auspex-FastBackup DataStore DataTools-SQL-BackTrack DB2 Enterprise-Vault FlashBackup FlashBackup-Windows Informix-On-BAR LotusNotes MS-Exchange-Server MS-Hyper-V MS-SharePoint MS-SQL-Server MS-Windows NDMP Oracle PureDisk-Export SAP Split-Mirror Standard Sybase Vault VMware
- -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
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. Use the csconfig cldprovider -l command to determine the possible stype values. The cloud stype values reflect the cloud storage provider. Cloud storage stype values can also 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 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.
- -v
Displays more information in the debug logs and progress logs.
EXAMPLES
Example 1 - Create all on one line 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.
UNIX systems: # bpimport -create_db_info -id A0000 -server cat -L /usr/openv/netbackup/logs/user_ops/bpimport.ls
Windows systems: # bpimport -create_db_info -id A0000 -server cat -L c:\Program Files\Veritas\NetBackup\logs\user_ops\bpimport.ls
Example 2 - Display all on one line information about the backups that are candidates for import. The backups that appear were created between 11/01/2012 and 11/10/2012. The bpimport command with the -create_db_info option must be run before this command.
# bpimport -PM -s 11/01/2012 -e 11/10/2012
Example 3 - Import the backups that were specified in the images
file. The progress is entered in the bpimport.ls
file.
UNIX systems: # bpimport -Bidfile /tmp/import/image -L /usr/openv/netbackup/logs/user_ops/bpimport.ls
Windows systems: # bpimport -Bidfile \tmp\import\image -L c:\Program Files\Veritas\NetBackup\logs\user_ops\bpimport.ls
FILES
UNIX systems:
/usr/openv/netbackup/logs/admin/* /usr/openv/netbackup/db/images/*
Windows systems:
install_path\NetBackup\logs\admin\* install_path\NetBackup\db\images\*