Use SearchService administrative commands to define scheduled backup tasks for the Search index.
Before you begin
To use SearchService administrative commands, you must 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® WebSphere® Application Server environment variable, SEARCH_INDEX_BACKUP_DIR.
To back up the Search index, complete the following tasks.
- Start the wsadmin client from the following directory of the system on which you installed the deployment manager:
You must start the client from this directory or subsequent commands that you enter do not execute correctly.
- After the wsadmin command environment has initialized, enter the following command to initialize the Search environment and start the Search script interpreter:
When asked to select a server, you can select any server.
- Use the following commands.
SearchService.addBackupIndexTask(String taskName, String schedule, String startbySchedule) SearchService.backupIndexNow()
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.
SearchService.addBackupIndexTask("WeeklyIndexBackup","0 0 2 ? * SAT","0 10 2 ? * SAT")
Backs up the index immediately to the location specified by the IBM WebSphere Application Server variable, SEARCH_INDEX_BACKUP_DIR.SearchService.deleteTask(String taskName)
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.
Deletes the specified backup task.
This command takes a single argument:
- taskName. The name of the task to be deleted.
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
Restoring the Search index
Backing up the Search index manually