Administration Guide > TDV Command-Line Utilities > The TDV Export and Import Utilities > Using the Backup Import Utility
 
Using the Backup Import Utility
The backup import utility imports the entire contents of an archive file created with the backup_export utility or with Studio, subject to the Rules for the Backup Import Utility. Execution of the backup import command requires administrative privileges and a full server export CAR file.
The backup import utility has the following restrictions:
The -pkgfile target file must be a CAR file exported using either the backup_export utility or the Studio facility for full server backup.
The -verbose option causes information messages to be displayed after importing. Without this option, only error messages are displayed.
The -set option lets you specify or change data source connection information from the original.
[-set <path> <attribute> <value>]
This option is typically used when deploying a CAR file to a production server. The properties most commonly changed are host, port, database, user, and password.
Users should have write access to TDV_INSTALL/conf/server directory
To use the backup import utility
1. Open a command prompt window.
2. Navigate to <TDV_install_dir>/bin.
3. Run the backup_import command:
.backup_import -server <hostname> [ -port <port> ] [ -encrypt ]
-pkgfile <filename> -user <username> -password<password>
[-domain <domain> ]
[ -sso ] [ -sspi ] [ -spn <spn> ] [ -krb5Conf <krb5Conf> ]
[ -relocate <oldPath> <newPath> ] ...
[ -optfile <filename>] ...
[ -set <path> <type> <attribute> <value>] ...
[ -encryptionPassword <encryptionPassword>]
[ -reintrospect OR -reintrospectNone ]
[ -createCacheTables ]
[ -updateCacheTables ]
[ -printinfo ]
[ -overwrite ]
[ -genopt <filename>]
[ -verbose ] [-ignoreEncryption ]
The backup_import parameters are described in the following table.
Backup Import Parameters
Optional/ Required
Comments
-server <host_name>
Required
Target TDV that the utility connects to for import of the CAR file.
-port <port_number>
Optional
Optionally specifies the Web Services base port (HTTP) used to communicate with the TDV Server. The default value is 9400.
-encrypt
Optional
Encrypts communication between the command line and TDV using SSL sent over the dedicated HTTPS port.
-pkgfile <file_name>
Required
Specifies the location and file name of the CAR file.
The -pkgfile target file must be a CAR file exported with backup_export or a full server backup from Studio.
-user <user_name>
Required
User name of TDV system administrator.
-password <password>
Required
Password of the administrative user performing the import.
-domain <domain>
Optional
User domain. The default value is composite.
-sso
Optional
Enables SSO authentication. Must be used with the -spn option. No username or password is required.
-sspi
Optional
For Windows environments configured with SSPI, you can use this parameter after -sso and -spn.
-spn <spn>
Optional
Use this parameter after specifying -sso, to indicate what the service principal name is. Use one of the following formats depending on the protocol you are using:
SSPI format is <ServiceName/Full_ComputerName@Realm>
JGSS format is <ServiceName@Full_ComputerName>
-krb5Conf <krb5Conf>
Optional
For environments configured with multiple Kerberos authentication files, you can use this parameter after -sso and -spn to specify which authentication file to use.
<krb5Conf> must specify the full path and file name to use.
If this parameter is not specified, the default Kerberos system file is used.
-relocate <old_path> <new_path>
Optional
Specifies a new resource name (path) for top-level items. Specify the old path and the new path using resource names.
You can use the -relocate option to exclude specified resources from import by setting <new_path> to NOIMPORT. If you do this, the resources designated by <old_path> are not imported.
-optfile <file_name>
Optional
Specifies a file to pass options without using the command line. The options file is useful for hiding password information. For example:
backup_import
-server localhost
-user test
-password <password>
-pkgfile sample.car
 
is the same as:
backup_import
-optfile sample.opt
 
where sample.opt contains:
-server localhost
-user test
-password <password>
-pkgfile sample.car
-set
<path>
<type>
<attribute>
<value>
Optional
Enables you to change resource attributes during import. You can repeat this option to set different attributes or multiple class paths.
The <path> is the TDV resource name.
The <type> is DATA_SOURCE when the <attribute> is classpath, host, port, database, user, or password.
The <attribute> can be (depending on source type):
user <login> or <user_name> or error
password <password> or error
user2 <app_user_name> or error if not Oracle EBS
password2 <app_password> or error if not Oracle EBS
host <url_IP> or <dsn> or <server> or <appServer> or <url> or <root> or error
port <url_port> or <port> or error
database <url_database_name> or <enterprise> or <app_server> or error
path <root> or <url> or error
annotation
Set <value> to a valid entry for the selected attribute. String values with spaces can be enclosed in double-quotes.
For Windows systems, use semicolon as delimiter:
C:\DevZone\ATeam\Jars\my.jar;
D:\Current\Ref\classes
 
For UNIX systems, use colons as delimiter:
/lib/ext/classes:/lib/src/jars
-encryptionPassword
Optional
The password used to encrypt /decrypt sensitive data in your car file, for example, data source password, etc.
You do not need to specify this parameter if you are importing a car file from a TDV version prior to 8.0.
-reIntrospect
Optional
This option is used to control if it does re-introspections for all data sources at end of the import or not
-createcachetables
Optional
If used, the cache status, tracking and target tables required by cached resources are created, if not already present in the database for your data source as it is described in the metadata of the CAR file you are importing.
The import process does not create the TDV resources for cache_status, cache_tracking, and target tables if they are not described in the CAR file metadata.
-updateCacheTables
Optional
Yes or no. Use this optional value to indicate whether you want to have the cache tables dropped and recreated with any potential changes that are included in the CAR file.
-printinfo
Optional
Disables the actual import process, and instead prints the archive file in the command window for you to view.
-overwrite
Optional
Clears all resources prior to importing the backup CAR. Ensures that the TDV resource tree matches the contents of the imported CAR file.
-genopt
Optional
By giving this option and an opt file name, the parameters will be stored in the opt file with the password encrypted. While doing an export or import operation the password saved will not be shown as a clear text.
-verbose
Optional
Generates output in the command-line window describing the export process. By default, only error messages are displayed or logged.
-ignoreEncryption
Optional
If this option is used, then all backup data will be imported regardless of whether a valid encryption key was provided. This means that the import will not fail. This option can be used to allow partially importing any backed up data. However, the import process will only import data that is not encrypted or can be decrypted using the provided encryption key. All encrypted portions of the backup data that cannot be decrypted will be imported as empty values and the import will otherwise succeed.
This affects all encrypted values in the backup data, which includes, but is not limited to data source and LDAP domain connection passwords.
Here is a sample command line to change the password property of a data source:
backup_import
-user admin -password admin mycar.car
-set /shared/myDataSource DATA_SOURCE password myNewPassword
 
In this example, -set is the option, DATA_SOURCE is the type of the resource being imported, and password is the property that is being changed.