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.
Parent topic: Backing up the Search index
Restoring the Search index
Backing up the Search index manually
- Start the wsadmin client from the following directory of the system on which you installed the Deployment Manager:
is the WebSphere
Application Server installation directory and <dm_profile_root>
is the Deployment Manager profile directory, typically dmgr01.
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:
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, you must pick the node where the file is stored.
- 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.
SearchService.addBackupIndexTask("WeeklyIndexBackup","0 0 2 ? * SAT","0 10 2 ? * SAT")
Backs up the index to the location specified by the IBM WebSphere Application Server variable, SEARCH_INDEX_BACKUP_DIR. There might be a delay before the backup occurs if there are indexing tasks in progress.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.