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 instructions on backing up the indexed data and for running backup and restore scripts available for backing up the Configuration Database and the configuration files.
Typically, backup administration tasks include the following:
If a problem occurs
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.
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.
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.batdbdata_backup.shAfter 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:
Windows script
Linux script
dbdata_recovery.batdbdata_recovery.shThe 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 following custom configuration files:
- customIndexstrategies.yml
- olaengineCustomConfig.properties
- searchserviceCustomConfig.properties
- customIndexstrategies.yml
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.
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.batconf_backup.shAfter 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
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:
Windows script
Linux script
conf_recovery.batconf_recovery.shThe 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.
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 in the cluster. For more information, see Indexer-cluster.
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).
- Restart the Collection Station and 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 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 to move data collectors from one or more hosts (where the Collection Stations or Collection Agents are installed) to the target host. |