cancel
Showing results for 
Search instead for 
Did you mean: 

Backing up your TREX Indexes

Former Member
0 Kudos

Dear experts,

Im trying to backup my TREX indexes, so that i in case of a crash can import them without having to do a new delta indexing. But i have some issues. I have been searching the forum but I cant find any specific details or examples about how to do it. i made a script, but it doesnt seem to work properly. I am wondering if im missing path's since nomatter how detailed I make the script (full paths etc) i cant get it to work. I want to export the indexes to a simple path where i can fetch em with our backup software.

Im trying this:


python.exe exportManager.py --indexId=* --exportPath=/path/%Y%m%d --testOnly=1

Is this syntax totally wrong, or am i missing entries in windows path? I have been detailing the paths for exportmanager.py and python.exe but I always seem to be missing a file. Last error message i got was:


ImportError: No module named NameServerPy

I can see in the python script theres a module named NameServerPy but the correct extension in the folder is NameServerPy.py

I hope someone is able to help me out on this one.

Thanks in advance,

-Soren

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I have some strange problems with my commandline now, I have been using the guide from SAP Library regarding TREX Online backup, but now it keeps telling me "cant open file exportmanager.py". If i write "exportmanager.py in the command prompt it opens the file so it works path-wise.

can anyone tell me if this is correct or not, if I want to backup all indexes and save them on my drive in the folder TREX_SID_Backup\yyyymmdd (folder named after current date)


python.exe exportManager.py --exportPath=driveletter:\TREX_SID_Backup\%Y%m%d --indexId=*

how come, if windows paths are set up so that all files are to be found, that python cant find different files?

I hope someone can give me a hint - how do you guys take backup of your TREX systems?

Thanks in advance,

Soren

Edited by: Soeren Friis Pedersen on Oct 26, 2010 2:16 PM

Former Member
0 Kudos

Hi Everyone,

As this is solved I will create the next question about my TREX environment in a new thread. Thanks!

-Soren

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

In order to take export of Indexes, first do the following:

Set the correct environment variables required by TREX and the Python scripts. On Windows

Execute the following script: c: usr\sap\<SAPSID>\TRX<instance_number>\TREXSettings.bat

or

Open a test console by choosing Start u2192 Programs or All Programs u2192 SAP TREX u2192 Instance<Instance_number> u2192 Test u2192 TREX<instance_number> Console

Then execute the command:

python.exe exportManager.py --indexId=<my_index_id> --exportPath=<path_to_backup_directory>

Then it will work.

Thanks

Sunny

Former Member
0 Kudos

Hi Sunny,

First of all thanks a lot, TREXSettings.bat solved the path issue!

It seems lige you know something about TREX backup, maybe you can also help me how I can automate this backup process? As I understand there is 2 ways of doing it, offline and online. I would like the online version, but I dont mind aslong it can be automated (I have 5 TREX servers, and I dont have time to do manual backup each day). Is there a way to automate this process?

Thanks in advance, youhave already helped me so much!

Kind Regards,

Soren

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

You can use below link to schedule an online backup of TREX:

http://help.sap.com/saphelp_nw04s/helpdata/EN/45/0561b14c09048ae10000000a155369/content.htm

you can write the command in .cmd file and schedule with the help of window task as periodic job.

Thanks

Sunny

Former Member
0 Kudos

Hi Sunny,

How do you avoid that a index is taking place when exporting (backing up) the indexes? This would corrupt the indexes as far as I was able to find out, because the index is beeing locked while backing them up, and if a user is doing a index meanwhile this would corrupt indexes.

Thanks in advance!

-Soren