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.

  1. Configuration Database
  2. Indexer
  3. 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

  1. Ensure that the Configuration Database is up and running.
  2. 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

  3. Locate and unzip the backup.zip file to an appropriate location.
  4. (Linux only) Open the command prompt and provide execute permissions to the preceding directory that contains the script.
  5. 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

  1. Ensure that you stop the services for all the product components. 
    For more information, see Starting-or-stopping-product-services.
  2. 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

  3. Locate and unzip the backup.zip file to an appropriate location.
  4. (Linux only) Open the command prompt and provide execute permissions to the preceding directory that contains the script.
  5. 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. Also, ensure that you point to a valid backed-up file.

    Windows script

    Linux script

    dbdata_recovery.bat
    dbdata_recovery.sh

    Examples:{{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.

  6. 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

  1. 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

  2. Locate and unzip the backup.zip file to an appropriate location.
  3. (Linux only) Open the command prompt and provide execute permissions to the preceding directory that contains the script.
  4. 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

  5. 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
  6. Create a copy of the scripts used while creating data collectors and notifications.

To restore all the configuration files

  1. Ensure that you stop the services for all the product components. 
    For more information, see Starting-or-stopping-product-services.
  2. 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

  3. Locate and unzip the backup.zip file to an appropriate location.
  4. (Linux only) Open the command prompt and provide execute permissions to the preceding directory that contains the script.
  5. 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.

    Windows script

    Linux script

    conf_recovery.bat
    conf_recovery.sh

    Examples:{{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.

  6. 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.

  7. 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
  8. Copy the backed-up copy of the scripts (used while creating data collectors and notifications).
  9. 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

  1. Stop the Collection Station.
    For more information, see Starting-or-stopping-product-services.
  2. 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.

  3. Restart the Collection Station and the Indexer.
    For more information, see Starting-or-stopping-product-services.

To restore the indexed data

  1. Stop the Indexer for which you want to restore the historical indexed data.
    For more information, see Starting-or-stopping-product-services.
  2. Copy the backed-up data to the new Indexer location at %BMC_ITDA_HOME%\data\indexer.
  3. 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:

  • Replace the old host name with the new host name in configuration files related to the Configuration Database, Indexer, Console Server, and Search.
    For more information, see Configurations-required-before-scaling-up.
  • If you already have Collection Agents configured, then you need to point the Collection Agents to the new Collection Station host name. To replace the old host name, follow these steps:
    1. Navigate to the %BMC_ITDA_HOME%\agent\collection\custom\conf\agent.properties.
    2. In the agent.properties file, edit the value of the station.identifiers property with the host name and appropriate port numbers of the new Collection Station.
      This must be specified in the format, station.identifiers=<Host-Name>;<Port>;<Payload-Port>.
      Example:station.identifiers=Host1;8080;41414,Host2;8082;41415

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.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*