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
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; only 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, seeBacking 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 saved, 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:
This means that a valid export path looks like this: --exportPath=/usr/sap/%SID/TRX00/backup/%Y%m%d This is useful if you want to schedule the export using a CRON mechanism. |
--useQueueServer=<0|1> (optional) |
|
--force=<0|1> (optional) |
|
--verbose=<0|1> (optional) |
|
--testOnly=<0|1> (optional) |
|
--schemaOnly=<0|1> (optional; only 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 python exportManager.py --help command to display more information about the script. |
Result
The specified index, <my_index_Id> was backed up in 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.