Backing up and restoring DCA Index Server data
DCA Index Servers store all data used in Threat Director and Vulnerability Manager. Backing up data in DCA Index Servers should be part of the regular maintenance of a portal deployment.
An automatic backup procedure is described below. In the procedure, you must configure some values that specify where data is stored and how often a backup should occur.
In rare situations you may need to restore DCA Index Server data that was previously archived. A restore procedure is described below.
This topic contains the following sections:
To back up DCA Index Server data
This backup capability can store a snapshot of the data in the DCA Index Server to a local or remote repository.
This procedure requires you to modify two configuration files.
If you have installed multiple instances of the BladeLogic Portal server, you must ensure that each instance has an identical backup configuration.
- Configure the bmc-config.json file
- Open bmc-config.json for editing.
Typically, this file resides at <install_location>/portal/configuration/bmc-config.json. In the file, search for the term ElasticSearchConfigManager. The section that includes that term appears as follows
"com.bmc.dcaportal.index.service.core.ElasticSearchConfigManager" : {
"indexsearch.enabled" : "true",
"cluster.name" : "dca-index",
"loader.maxBSAPageSize" : 1000,
"aggregation.precision.count" : 500,
"vulnerability.management.circuit.breaker" : 1500000,
"circuit.breaker.threshold" : 95,
"loader.threadPoolSize" : 5,
"purge.interval" : 10,
"index.backup.path" : "",
"index.backup.timeinterval" : 1440
},Provide the following values, as necessary:
Option
Explanation
index.backup.path
Provides the path to local or remote location where data should be stored. Be sure you have correct permissions for the location you specify.
For example, you might enter:"index.backup.path" : "C:\\INDEX_BACKUP",
index.backup.timeinterval
Specifies how often a backup of the DCA Index Server data should occur. The value you enter is in minutes. By default, a backup occurs every 24 hours.
- Save bmc-config.json.
- Open bmc-config.json for editing.
- Configure the elasticsearch.yml file.
- Open elasticsearch.yml for editing.
Typically, this file resides at <install_location>/portal/DCAIndexService/config/elasticsearch.yml. Insert the following entry anywhere in the file:
path.repo: <Path_to_backup_directory>For example, you might enter:
path.repo: C:\\INDEX_BACKUP
The value you enter must match the value of index.backup.path that you specified in the bmc-config.json file.- Save elasticsearch.yml.
- Open elasticsearch.yml for editing.
- Restart the BladeLogic Portal and BMC DCA Index services.
- (Windows):
- From the Windows Control Panel, select Administrative Tools > Services.
- Start the BMC DCA Index Service 1.7.3 (DCAIndexService) service.
Be sure to start this service first. - Start the BladeLogic Portal service.
- (Linux):
- Enter the command: /etc/init.d/DCAIndexService start
Be sure to enter this command first. - Enter the command: /etc/init.d/BladeLogic_Portal start
- Enter the command: /etc/init.d/DCAIndexService start
- (Windows):
- Repeat this procedure for each instance of the BladeLogic Portal server.
To restore DCA Index Server data
Restoring DCA Index Server data requires you to install a plug-in that provides a web-based front end to the DCA Index Server. After the plug-in is installed, there are two possible restore procedures:
- Restoring the most recent snapshot of DCA Index Server data
- Restoring the most recent snapshot of DCA Index Server data to a corrupted data folder
Installing the plug-in for the web-based front end
- If your installation of BladeLogic Portal does not have Internet access, perform these preliminary steps. If your site does have Internet access, skip to step 2.
- Using a host that does have Internet access, visit https://github.com/mobz and download elasticsearch-head.zip.
- Move the downloaded file to a directory within your installation.
- Stop the BladeLogic Portal service.
- (Windows):
- From the Windows Control Panel, select Administrative Tools > Services.
- Stop the BladeLogic Portal service.
- (Linux): Enter the command: /etc/init.d/BladeLogic_Portal stop
- (Windows):
- Make sure the DCA Index Server service is running.
- (Windows): From the Windows Control Panel, select Administrative Tools > Services, and check the status of the BMC DCA Index Service 1.7.3 (DCAIndexService) service.
- (Linux): Enter the command: /etc/init.d/DCAIndexService status
- Connect to one of the following locations:
- (Windows): <INSTALL_DIR>\BladeLogicPortal\portal\DCAIndexService\bin
- (Linux): /<INSTALL_DIR>/BladeLogicPortal/portal/DCAIndexService/bin
- Enter one of the following commands:
- If you have Internet access:
plugin -install mobz/elasticsearch-head - If you do not have Internet access:
plugin --url file:<local_directory>/elasticsearch-head.zip --install mobz/elasticsearch-head
where <local_directory> is the location where you placed the downloaded ZIP file in step 1.
- If you have Internet access:
- Restart the BladeLogic Portal service.
- (Windows):
- From the Windows Control Panel, select Administrative Tools > Services.
- Start the BladeLogic Portal service.
- (Linux): Enter the command: /etc/init.d/BladeLogic_Portal start
- (Windows):
Restoring the most recent snapshot
- Stop the BladeLogic Portal service.
- (Windows):
- From the Windows Control Panel, select Administrative Tools > Services.
- Stop the BladeLogic Portal service.
- (Linux): Enter the command: /etc/init.d/BladeLogic_Portal stop
- (Windows):
- Make sure the DCA Index Server service is running.
- (Windows): From the Windows Control Panel, select Administrative Tools > Services, and check the status of the BMC DCA Index Service 1.7.3 (DCAIndexService) service.
- (Linux): Enter the command: /etc/init.d/DCAIndexService status
- Start the web-based front end for the DCA Index Server:
- If you have Internet access, use the following URL: <host_name_for_DCA_Index_Server>:<http_port>/_plugin/head
For example, enter portalserver.mycompany.com:9200/_plugin/head If you do not have Internet access, use the following URL: http://localhost:9200/_plugin/head/
- If you have Internet access, use the following URL: <host_name_for_DCA_Index_Server>:<http_port>/_plugin/head
- If it is not already selected, click the Any Request tab.
- Stop all indices in the DCA Index Server.
- In the Query section, enter _all/_close.
- From the drop-down menu at right, select POST.
- Click Request.
- Restore the latest snapshot.
- In the Query section, enter _snapshot/dca-index-repository/dca-index-snapshot/_restore.
- From the drop-down menu at right, select POST.
- Click Request.
- Restart the BladeLogic Portal and BMC DCA Index services.
- (Windows):
- From the Windows Control Panel, select Administrative Tools > Services.
- Start the BMC DCA Index Service 1.7.3 (DCAIndexService) service.
Be sure to start this service first. - Start the BladeLogic Portal service.
- (Linux):
- Enter the command: /etc/init.d/DCAIndexService start
Be sure to enter this command first. - Enter the command: /etc/init.d/BladeLogic_Portal start
- Enter the command: /etc/init.d/DCAIndexService start
- (Windows):
- Confirm that all vulnerability management asset and vulnerability data is available.
Restoring the most recent snapshot to a corrupted data folder
In situations where the DCA Index Server's data folder (<INSTALL_DIR>/BladeLogicPortal/portal/DCAIndexService) has become corrupted, you must perform a restore procedure like the one described above but you must also run a command to manually create a repository for metadata.
- Stop the BladeLogic Portal service.
- (Windows):
- From the Windows Control Panel, select Administrative Tools > Services.
- Stop the BladeLogic Portal service.
- (Linux): Enter the command: /etc/init.d/BladeLogic_Portal stop
- (Windows):
- Make sure the DCA Index Server service is running.
- (Windows): From the Windows Control Panel, select Administrative Tools > Services, and check the status of the BMC DCA Index Service 1.7.3 (DCAIndexService) service.
- (Linux): Enter the command: /etc/init.d/DCAIndexService status
- Start the web-based front end for the DCA Index Server:
- If you have Internet access, use the following URL: <host_name_for_DCA_Index_Server>:<http_port>/_plugin/head
For example, enter portalserver.mycompany.com:9200/_plugin/head If you do not have Internet access, use the following URL: http://localhost:9200/_plugin/head/
- If you have Internet access, use the following URL: <host_name_for_DCA_Index_Server>:<http_port>/_plugin/head
- If it is not already selected, click the Any Request tab.
- Stop all indices in the DCA Index Server.
- In the Query section, enter _all/_close.
- From the drop-down menu at right, select POST.
- Click Request.
- Create a repository for metadata to replace the corrupted repository.
In the Query section, enter the following:
_snapshot/dca-index-repository
{
"type": "fs",
"settings": {
"location": "<Snapshot location>"
}
}- From the drop-down menu at right, select PUT.
For example, the web-based front end would look something like this: - Click Request.
- Restore the latest snapshot.
- In the Query section, enter _snapshot/dca-index-repository/dca-index-snapshot/_restore.
- From the drop-down menu at right, select POST.
- Click Request.
- Restart the BladeLogic Portal and BMC DCA Index services.
- (Windows):
- From the Windows Control Panel, select Administrative Tools > Services.
- Start the BMC DCA Index Service 1.7.3 (DCAIndexService) service.
Be sure to start this service first. - Start the BladeLogic Portal service.
- (Linux):
- Enter the command: /etc/init.d/DCAIndexService start
Be sure to enter this command first. - Enter the command: /etc/init.d/BladeLogic_Portal start
- Enter the command: /etc/init.d/DCAIndexService start
- (Windows):
- Confirm that all vulnerability management asset and vulnerability data is available.