cancel
Showing results for 
Search instead for 
Did you mean: 

How to automate TREX Index backup

Former Member
0 Kudos

Dear forum

I have difficulties finding other post regarding my problem. How do you all solve the backup of TREX Indexes? I am trying to use Windows Task Scheduler, but my script works ONLY from command prompt, not from task scheduler. I find this very very odd. Im running windows server 2008 SP2.

Any input on how to automate TREX Index backup please let me know.

Thanks in advance,

Soren

Accepted Solutions (1)

Accepted Solutions (1)

Sriram2009
Active Contributor
0 Kudos

Hi

Using python script you do the automatic online backup the indexes, as per the sap note Note 975965 - TREX 7.0/7.1: Data backup (online) and recovery,

For Example currently we are also using the same script to take online backup, and off time restore.

Steps u2013 Using the Python Exportmanage.py

1. Windows:

<Drive letter where the Trex usr folder location>:\usr\sap\TREX_< instance number>\TREXSettings.bat

2. Edit the Trex settings.bat, in that bottom line you can add the Python script , Example u2013 we are using the script u2013

python D:\usr\sap\PRX\TRX00\exe\python_support\exportManager.py * --exportPath=D:\backup\%Y%m%d --force=1

and then save the in different name. like either Trexbkp.cmd or Trexbkp.bat.

3. Then u can using the windows Task Scheduler

In case of any query pl let me know

Regards

Sriram

Former Member
0 Kudos

Hi Sriram,

How do you control indexes meanwhile backup is taking place? I mean if you backup same time as someone is making a index/search you will most likely corrupt indexes. Do you close the TREX Windows service with Task Scheduler while you take the backup?

Thanks,

Soren

Answers (4)

Answers (4)

Former Member
0 Kudos

Controlled indexing and export. Automated through Task Scheduler on win server 2008. have been running test for 2 months and it seems stable.

Kind Regards,

Soren

Sriram2009
Active Contributor
0 Kudos

Hi Soren

Otherwise you can try in off business time. or any week ends.

Regards

Sriram

Sriram2009
Active Contributor
0 Kudos

Hi Soren

Thanks for your reply.

In your environment in the Main Sap system COM_SE_DISPATCHER background job at what frequency its running?

Are your enable the delta index?

During the backup time its not lock the index database, just export the indexes thru python script. because in my environment we are doing the backup online.

Regards

Sriram

Former Member
0 Kudos

Hi Sriram,

Thanks.

So if i schedule our indexing in the morning ex it shouldnt be a problem to export indexes with python script in the evening? I mean if i run a index once pr 24 hours.

I guess its only if you start indexing while you also export indexes you can run into problems?

Thank you!

Kind Regards,

Soren

Sriram2009
Active Contributor
0 Kudos

Hi

During the Backup time indexes will be on( Mean every one can be using the Trex Search), its mean online backup. As per the SAP Notes 975965 ,during the backup time index will not corrupt. it not require to stop the any trex server during the backup time.

My Questions.

1. How many business objects are there in your trex and for what purpose u r using the Trex Search engine?

2. Why every day u r having problem in the Trex index or your are trying to restore the same index in some other server?

In My setup we are using the SAP DBM modules in that we are using the Two business objects are indexed. every day @ 6 Pm our backup scheduled will start automatically and at same time it will be restored in the different server which is connected in the private network ( Which not connected in the Live networtk) in case of any problem in the Live one we are manually switch over the standby server which is connected in the Private network. this backup and restore automatically competed with an hour time.

Regards

Sriram

Former Member
0 Kudos

Hi Sriram,

Thank you for your answer!

We are using the TREX server in a E-Recruitment and Talent Management environment.

The Index is likely to corrupt when you take backup if someone meanwhile does a indexing.

http://help.sap.com/saphelp_nw04s/helpdata/EN/44/9bc1d6fe682aabe10000000a1553f7/frameset.htm

Quote:


We recommend that you make sure that no write accesses of the following types take place during the backup procedure:

u25CB       Creation, deletion, or resetting

u25CB       Changing attributes

u25CB       Indexing

u25CB       Changing taxonomies

You cannot automatically suppress all write access to TREX from within TREX. You can only take administrative action (manual monitoring) to check that no write access of these types takes place. 

This is what I want to ensure - how do you ensure nothing takes place during backup? Or are you just hoping noone will do a indexing?

Thanks Sriram, I hope I made myself more clear now

Kind Regards,

Soren