Show TOC

Complete Data Backup and Restore (Offline)Locate this document in the navigation structure

Use

You can make an offline backup of an entire TREX installation, and restore the TREX installation using the backup version if problems occur.

Caution

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.

Prerequisites
  • 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. SAP recommends 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)

Procedure

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.

  1. Set all queues in the TREX installation to the status suspended.

  2. Wait until none of the documents in the queues have the following status:

    • to be preprocessed

    • to be transmitted

    • to be synchronized

  3. 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.

    Note

    For more information on how to start and stop TREX, see Starting and Stopping TREX.

  4. Copy the entire TREX installation directory, including the TREX index and queue directories, to the backup directory at <backup_path>.

    Note

    SAP recommends that you use another hard disk or host for the backup directory. Use a copy program with a compression function to copy the installation.

    Caution

    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.

  5. Start all TREX servers on all hosts (including the TREX Web server).

  6. Activate all suspended queues.

  7. Start your crawlers if necessary. For example, start delta crawling for indexes in this TREX installation in SAP NetWeaver Enterprise Portal.

    Note

    This step must be carried out for the master indexes in a load-balancing scenario, but not for replicated search indexes.

Restoring Data

  1. Stop all TREX servers on all hosts (in a distributed scenario, on all other hosts that use these servers).

  2. Delete all directories and files in the TREX installation directory <TREX_DIR>.

  3. Copy the relevant TREX backup data to the TREX installation directory.

  4. Start all TREX servers on the host. In a distributed scenario, start all other hosts that you stopped previously.