Backing up the Search index using wsadmin commands 

Use SearchService administrative commands to define scheduled backup tasks for the Search index.

Before you begin

To use SearchService administrative commands, use the wsadmin client. See Starting the wsadmin client for information about how to start the wsadmin command-line tool.

Backups are written to the location specified in the IBM WAS environment variable, SEARCH_INDEX_BACKUP_DIR.


To back up the Search index, complete the following tasks.

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./ -jython

      If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  2. Use the following commands.

      SearchService.addBackupIndexTask(String taskName, String schedule, String startbySchedule)

        Defines a new scheduled index backup task.

        This command takes the following arguments:

        • taskName. The name of the task to be added.

        • schedule. The time at which the scheduled task starts. This argument is a string value that must be specified in Cron format.

        • startbySchedule. The time given for the task to run before it is automatically canceled. This argument is a string value that must be specified in Cron format.

        For example:

        SearchService.addBackupIndexTask("WeeklyIndexBackup","0 0 2 ? * SAT","0 10 2 ? * SAT")


        Backs up the index to the location specified by the IBM WAS variable, SEARCH_INDEX_BACKUP_DIR. There might be a delay before the backup occurs if there are indexing tasks in progress.

        This command does not take any arguments.

        After backing up the Search index using wsadmin commands, consider performing a full backup of the HOMEPAGE database. Note that the Search index has a dependency on data in the HOMEPAGE database.

      SearchService.deleteTask(String taskName)

        Deletes the specified backup task.

        This command takes a single argument:

        • taskName. The name of the task to be deleted.

        For example:



        Brings the database to a consistent state so that crawlers start from the point that the backup was made from.

        The notifyRestore command updates index management tables in the HOMEPAGE database so that crawling resume points are reloaded from a restored index, thereby ensuring that all future crawls start from the correct point. This command also purges cached content in the HOMEPAGE database.

Parent topic

Backing up the Search index

Related concepts
Scheduling tasks

Related tasks

Restore the Search index
Backing up the Search index manually

Related reference
SearchService commands

December 21, 2011 11:24:03 AM


Dec 21, 2011 11:24:03 AM 2 Dec 20, 2011 10:56:13 AM 1