Execute the following scripts to set the environment variables required by TREX and the Python scripts:
UNIX:
Bourne shell sh, Bourne-again shell bash, Korn shell ksh:
. /usr/sap/<SAPSID>/TRX<instance_number>/TREXSettings.sh
C shell csh:
source /usr/sap/<SAPSID>/TRX<instance_number>/TREXSettings.csh
Windows: c:\usr\sap\<SAPSID>\TRX<instance_number>\TREXSettings.bat
Navigate to the TREX directory that the Python script for exporting indexes ( exportManager.py) is located in: / usr/sap/<SAPSID>/TRX<instance_number>/exe/python_support.
Execute the Python script for exporting indexes with the following parameters:
python exportManager.py
--indexId=<my_index_id> (mandatory)
--excludeIndexId=<my_index_id> (optional)
--exportPath=<path_to_backup_directory> (optional)
--useQueueServer=<0|1> (optional)
--force=<0|1> (optional)
--verbose=<0|1> (optional)
--testOnly=<0|1> (optional)
--schemaOnly=<0|1> (optional; nur BIA)
Note that the --schemaOnly=<0|1> parameter is only significant for using the importManager.py and exportManager.py Python scripts for the data backup and restore of OLAP and join indexes in the BI Accelerator (BIA). For more information, see Backing Up and Restoring BIA Data.
Explanations for the exportManager.py Python Script
Command |
Explanation |
---|---|
--indexId=<my_index_Id> (mandatory) |
You can specify that one or more indexes are to be backed up. As <my_index_Id>, you must specify the index name, for example, first_index_name. To specify two or more indexes to be backed up, use the following syntax: --indexId=index_1 --indexId=index_2 (and so on). If you want to back up all indexes, use the following syntax: --indexId=* |
--excludeIndexId= <my_index_Id> (optional) |
You can specify that certain indexes are not to be backed up. If you enter the following, all indexes are backed up apart from index_1 and index_2. --indexId=* --excludeIndexId=index_1 --excludeIndexId=index_2 |
--exportPath= <path_to_backup_directory> (optional) |
You can use the exportPath parameter to define the directory for the backup indexes. If you do not specify this value, the system places the index in the default backup directory / usr/sap/<SAPSID>/TRX<instance_number>/backup/index. Note that you enter the path to the directory for the indexes to be backed up ( <path_to_backup_directory>) without entering the directory name \index, because the exportManager.py Python script creates the \index subdirectory manually. The --exportPath parameter can contain the following special characters:
|
--useQueueServer=<0|1> (optional) |
|
--force=<0|1> (optional) |
|
--verbose=<0|1> (optional) |
|
--testOnly=<0|1> (optional) |
|
--schemaOnly=<0|1> (optional; nur BIA) |
This parameter only affects logical indexes such as join indexes and OLAP indexes when using TREX as the BI Accelerator (BIA) in BI.
|
-- help |
You can use the commend python --exportManager.py --help to display more information on the script. |
The specified index, <my_index_Id>, was backed up to the directory that you specified in --exportPath=<path_to_backup_directory>. If you did not specify a value for the backup directory, the TREX indexes were backed up in the default backup directory, /usr/sap/<SAPSID>/TRX<instance_number>/backup/index.