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:
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.
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.
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.shExamples:{{code language="none"}}
{{/code}}- dbdata_recovery.bat C:\ITDA Backup\dbdata_recovery.zip
- dbdata_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.
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
- 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:
Windows script
Linux script
conf_recovery.batconf_recovery.shExamples:{{code language="none"}}
{{/code}}- 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.The [confluence_table-plus] macro is a standalone macro and it cannot be used inline. Click on this message for details.
- 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.
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 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 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. |
refers to the host name of the