Backing up and restoring data
As an administrator, you might need to implement a backup and restore strategy to help protect against disasters that might result in data loss.
This topic aims to provide you guidelines for backing up data and instructions on running backup and restore scripts available for performing the following actions:
- Backing up the Configuration Database.
- Backing up the configuration files.
Typically, backup administration tasks include the following:
Choosing your backup strategy
Before you decide to perform backup activities, you need to first decide a backup strategy that suits your business needs. For more information about guidelines and recommendations for deciding a backup strategy, see
Planning your backup strategy
Restoration sequence
You need to restore the components in the following order of priority. This order is the same as the order in which you need to upgrade the components.
- Configuration Database
Indexer
- Restore the following components (order is not important):
- Collection Station
- Console Server
- Search
Backing up and restoring Configuration Database
The Configuration Database stores information about all user configurations performed from the UI and related default settings. For example, information about data collectors, data patterns, notifications, default data retention period, tags, and polling status.
This data must be backed up because all components depend on it. You must store the backup copy of the Configuration Database on a separate server. This step alone is sufficient to recover from a disaster. After the backup, search and notification alerts can work on the new data that is available on the new setup.
You can perform a backup and restore of the Configuration Database by running a script command that is available with the product. This script performs a complete backup of the data stored by the Configuration Database.
Note
Each time you run the backup command, a new backup file is created.
While running the backup command, if a previous copy already exists, the following scenarios apply:
- The next time you perform a backup, the script deletes the old backup data and creates a new backup copy. The new file can be identified by the name which contains the latest timestamp.
- If an error occurs while running the script command, the script retains the earlier backed-up data.
Use the following procedures for backing up and restoring the Configuration Database:
To backup Configuration Database
- Ensure that the Configuration Database is up and running.
Navigate to the following directory depending on your operating system to locate the backup script:
Windows location Linux location %BMC_ITDA_HOME%\utilities $BMC_ITDA_HOME/utilities Locate and unzip the backup.zip file to an appropriate location.
- (Linux only) Open the command prompt and provide execute permissions to the preceding directory that contains the script.
Run the following command depending on your operating system:
Windows script Linux script dbdata_backup.bat
dbdata_backup.sh
After the command is successfully run, a backup file starting with the name, "ITDADB" is created in the backup directory at the following location:
Windows location Linux location %BMC_ITDA_HOME%\itda-backup $BMC_ITDA_HOME/itda-backup
To restore Configuration Database
- Ensure that you stop the services for all the product components.
For more information, see Starting or stopping product services. Navigate to the following directory depending on your operating system to locate the restore script:
Windows location Linux location %BMC_ITDA_HOME%\utilities $BMC_ITDA_HOME/utilities Locate and unzip the backup.zip file to an appropriate location.
- (Linux only) Open the command prompt and provide execute permissions to the preceding directory that contains the script.
Run the following command depending on your operating system:
Note
While running the restore script command, ensure that you provide the full path of the backed-up file to be recovered within double quotes. Also, ensure that you point to a valid backed-up file.
Windows script Linux script dbdata_recovery.bat
dbdata_recovery.sh
Examples: dbdata_
recovery
.bat "C:\ITDA Backup\dbdata_recovery.
zip"d
bdata_recovery.sh "/opt/ITDA Backup/dbdata_recovery.zip"
The restore script replaces all the relevant files related to the Configuration Database present at the location where the product is installed, with contents of the backed-up file.
- Start the services for all the product components.
For more information, see Starting or stopping product services.
Backing up and restoring the configuration files
All the system configuration information is stored in the configuration files that are located at different locations for different components. When you customize default settings, you make changes in the custom configuration files. For more information, see Modifying the configuration files.
After a disaster occurs, when you reinstall the product components, the reinstallation works with default properties, and the custom changes are not captured. To capture all the custom changes, you must backup the custom configuration files.
You can perform a backup and restore of the configuration files by running a script command that is available with the product. This script performs a complete backup of the data stored in the configuration files.
Note
Each time you run the backup command, a new backup file is created.
Use the following procedures for backing up and restoring all the configuration files:
To backup all the configuration files
Navigate to the following directory depending on your operating system to locate the restore script:
Windows location Linux location %BMC_ITDA_HOME%\utilities $BMC_ITDA_HOME/utilities Locate and unzip the backup.zip file to an appropriate location.
- (Linux only) Open the command prompt and provide execute permissions to the preceding directory that contains the script.
Run the following command depending on your operating system:
Windows script Linux script conf_backup.bat
conf_backup.sh
After the command is successfully run, a backup file, conf-backup.zip is automatically created in the backup directory at the following location:
Windows location Linux location %BMC_ITDA_HOME%\itda-backup $BMC_ITDA_HOME/itda-backup - This step is applicable only if you have configured the access URLs. Create a copy of the web.xml file from the following locations.
- %BMC_ITDA_HOME%\tomcat\webapps\olaengine\WEB-INF\web.xml
- %BMC_ITDA_HOME%\tomcat\webapps\searchengine\WEB-INF\web.xml
- Create a copy of the scripts used while creating data collectors and notifications.
To restore all the configuration files
- Ensure that you stop the services for all the product components.
For more information, see Starting or stopping product services. Navigate to the following directory depending on your operating system to locate the restore script:
Windows location Linux location %BMC_ITDA_HOME%\utilities $BMC_ITDA_HOME/utilities
Locate and unzip the backup.zip file to an appropriate location.
- (Linux only) Open the command prompt and provide execute permissions to the preceding directory that contains the script.
Run the following command depending on your operating system:
Note
While running the restore script command, ensure that you provide the full path of the backed-up file (conf-backup.zip) to be recovered within double quotes.
Windows script Linux script conf_recovery.bat
conf_recovery.sh
Examples: conf_
recovery
.bat "C:\ITDA Backup\conf_recovery.
zip"conf
_recovery.sh "/opt/ITDA Backup/conf_recovery.zip"
The restore script replaces all the relevant configuration files present at the location where the product is installed, with the contents of the conf-backup.zip file.
This step is applicable only if you restore the files on a computer other than the one from which you backed-up the data. Add the following properties if they are not already present and change the host name in the property values.
The host name must point to the computer on which the particular components are installed. For more information, see the property definitions.
Configuration property and location Example Console Server %BMC_ITDA_HOME%\custom\conf\server\olaengineCustomConfig.properties
jdbc.jdbcUrl
indexing.unicast.
hostsconsoleserver.host
searchservice.host
sso.host
sso.port
jdbc.jdbcUrl=jdbc:hsqldb:hsql://dbHost.bmc.com
indexing.unicast.hosts=
indexerHost
.bmc.com:9300consoleserver.host=
consoleServerHost
.bmc.comsearchservice.host=
searchHost
.bmc.comsso.host=
ssoHost
.bmc.comsso.port=8443
Configuration Database %BMC_ITDA_HOME%\custom\conf\services\configdb.conf wrapper.app.parameter.11
wrapper.app.parameter.11=dbHost.bmc.com
Search %BMC_ITDA_HOME%\custom\conf\server\searchserviceCustomConfig.properties jdbc.jdbcUrl
searchservice.host
indexing.unicast.
hosts
jdbc.jdbcUrl=jdbc:hsqldb:hsql://dbHost.bmc.com
searchservice.host=searchHost.bmc.com:9300
indexing.unicast.hosts=indexerHost.bmc.com:9300
Indexer %BMC_ITDA_HOME%\conf\indexer\esmonitor.properties indexing.host
indexing.host=indexerHost.bmc.com
%BMC_ITDA_HOME%\conf\indexer\elasticsearch.yml network.bind_host
network.publish_host
discovery.zen.ping.
unicast.hosts
network.bind_host:indexerNode.bmc.com
network.publish_host:indexerNode.bmc.com
discovery.zen.ping.unicast.hosts:indexerHost.bmc.com:9300
Collection Station %BMC_ITDA_HOME%\station\collection\custom\conf\agent.properties jdbc.jdbcUrl
host.name
indexing.unicast.
hostsagent.name
agent.id
jdbc.jdbcUrl=jdbc:hsqldb:hsql://dbHost.bmc.com
host.name=stationHost.bmc.com
indexing.unicast.hosts=indexerHost.bmc.com:9300
agent.name=collection-station_stationHost.bmc.com
agent.id=collection-station_stationHost.bmc.com
In the preceding table, the following definitions apply:
dbHost.bmc.com
refers to host name of the Configuration Database.stationHost.bmc.com
refers to host name of the Collection Station.indexerHost.bmc.com
refers to host name of the Indexer.searchHost.bmc.com
refers to host name of the Search component.
refers to host name of the Console Server.consoleServerHost
.bmc.comsso.host
refers to host name of the Remedy Single Sign-On server.indexerNode.bmc.com
refers to the host name of the individual Indexer nodes on which you are modifying the property.
- This step is applicable only if you have configured the access URLs. Copy the backed-up copy of the web.xml file to the following locations:
- %BMC_ITDA_HOME%\tomcat\webapps\olaengine\WEB-INF\web.xml
- %BMC_ITDA_HOME%\tomcat\webapps\searchengine\WEB-INF\web.xml
- Copy the backed-up copy of the scripts (used while creating data collectors and notifications).
Start the services for all the product components.
For more information, see Starting or stopping product services.
Backing up and restoring indexed data
All indexed data is stored by the Indexer. You need to backup data from each individual Indexer node present in your environment. For more information about how Indexers function in a multiple-server deployment, see
Indexer redundancy
Recommendation
BMC recommends you to backup all the indexed data before upgrading the Indexer.
Before you perform the backup, you must stop the Collection Station. This is useful to avoid the following scenarios:
- Losing data that is still being sent by the Collection Station to the Indexer.
- Backing up corrupt or incomplete data that might occur because of concurrent writes when the data is still being indexed.
Use the following procedures for backing up and restoring the indexed data:
To backup the indexed data
- Stop the Collection Station.
For more information, see Starting or stopping product services. Copy the indexed data located at %BMC_ITDA_HOME%\data\indexer on a separate server (separate disk).
Note
If you are operating in a multiple-server deployment, ensure that you copy the data indexed from each of the existing Indexers.
- Restart the Collection Station and the Indexer.
For more information, see Starting or stopping product services.
To restore the indexed data
- Stop the Indexer for which you want to restore the historical indexed data.
For more information, see Starting or stopping product services. - Copy the backed-up data to the new Indexer location at %BMC_ITDA_HOME%\data\indexer.
- Start the Indexer.
For more information, see Starting or stopping product services.
Post-restoration tasks
After you restore the backed up data, the following tasks might be required for the product to function properly.
Scenario | Task |
---|---|
When you reinstall the product on another server, the host name (or IP address) of the new server will not match the host name (or IP address) of the first server, from where you performed the backup. | The following tasks are required, to replace the old host name instances with the new host name instances, in the restored data:
|
Sometimes when you reinstall the product on another server, you continue to see old component names on the Administration > Components tab. | Use the deletecomponents CLI command CLI command to delete unwanted components names that appear on the Administration > Components tab. |
After reinstalling the product, you might want to move the data collectors from one Collection Agent (or Collection Station) to another. | Use the movecollectors CLI command CLI command to move data collectors from one or more hosts (where the Collection Stations or Collection Agents are installed) to the target host. |
Comments