You can make an offline backup of an entire TREX installation, and restore the TREX installation using the backup version if problems occur.
During a complete data backup and restore (offline), the system saves the entire TREX installation complete with all its data. You must note that the restore process overwrites the TREX directory <TREX_DIR> and all index and queue information.
- Always use the TREX version used by the application that uses TREX (for example, Content Management in SAP Enterprise Portal) when restoring your data.
- Make sure that a backup directory at <backup_path> is available for the data backup. We recommend that you use another hard disk or breakdown-proof host for the backup directory. If necessary, create a new directory for this purpose (for example, N:\Backup)
Backing Up the Data
You must perform data backup for every TREX host (that is, for every TREX installation). TREX is not available during the data backup procedure. Make sure that no new documents need to be indexed (for example, by a crawler) at the time of the backup.
- Set all queues in the TREX installation to the status suspended.
- Wait until none of the documents in the queues have the following status:
- to be preprocessed
- to be transmitted
- to be synchronized
- Stop all TREX servers on all hosts (including the TREX Web server) using the TREX daemon. If you have a distributed system, stop all TREX servers that link to the TREX installation you are backing up.
- Copy the entire TREX installation directory, including the TREX index and queue directories, to the backup directory at <backup_path>.
We recommend that you use another hard disk or host for the backup directory. Use a copy program with a compression function to copy the installation.
Before copying the files, make sure that the files were copied from the temporary store of your operating system to the hard disk (Flush) in order to ensure that the data remains consistent.
- Start all TREX servers on all hosts (including the TREX Web server).
- Activate all suspended queues.
- Start your crawlers if necessary. For example, start delta crawling for indexes in this TREX installation in SAP NetWeaver Enterprise Portal.
This step must be carried out for the master indexes in a load-balancing scenario, but not for replicated search indexes.
- Stop all TREX servers on all hosts (in a distributed scenario, on all other hosts that use these servers).
- Delete all directories and files in the TREX installation directory <TREX_DIR>.
- Copy the relevant TREX backup data to the TREX installation directory.
- Start all TREX servers on the host. In a distributed scenario, start all other hosts that you stopped previously.