No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

HUAWEI CLOUD Stack 6.5.0 Backup and Restoration Guide 03

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Restoring Database Service Data on the Database Node

Restoring Database Service Data on the Database Node

If Backup and Restoration is unavailable on ManageOne Maintenance Portal, you can restore database service data by restoring the database instance for which the service is abnormal. The following describes how to restore the O&M Management service data.

Context

If the data is damaged due to misoperations of system maintenance engineers, you can select the corresponding backup file to restore the system.

Prerequisites

Procedure

  1. Determine the IP address and port number of a database instance node where the service to be restored is located by following the instructions provided in Viewing the Database Instance Where the Database Service Is Deployed.

    Example of the database instance name: iamdbsvr-8-1@9-1; examples of the IP addresses of the master and slave database instance nodes: 192.168.121.174 and 192.168.121.175; example of the port number of the database instance: 32088

  2. Use PuTTY to log in to the active iamdbsvr-8-1@9-1 node using the IP address of the node.

    Default account: sopuser; default password: D4I$awOD7k

  3. Run the following command to switch to the root user:

    sudo su root

    The default password is Changeme_123.

  4. Run the following command to create a temporary directory for storing backup files:

    mkdir -p /opt/temp/

  1. Run the following commands to modify the permission and user of the files:

    chmod 750 -R /opt/temp/

    chown -R dbuser:dbgroup /opt/temp/

  2. Use FileZilla to upload the backup file to the /opt/temp/ directory as the dbuser user.
  3. Run the following commands to decompress the downloaded files to the temporary directory:

    cd /opt/temp/

    tar xf iamdbsvr-20190122085156.tar.gz

  4. Run the command to restore the database. The method for restoring the Gauss database is used to restore iamdbsvr-8-1@9-1.

    • Gauss database: restoring data about Deployment System Timer, Deployment System Framework, Deployment System, or IAM

      cd iamdbsvr-20190122085156

      tar xf iamdbsvr.tar.gz -C /opt/temp/

      LD_LIBRARY_PATH="/opt/gauss/app/lib" /opt/gauss/app/bin/gsql -h192.168.170.36 -pPort number -U ossdbuser -W Default password of the database user ossdbuser -d keystone < /opt/temp/iamdbsvr/keystone.sql

      NOTE:

      192.168.170.36 indicates the IP address of the master database instance node. Port number indicates the port number of the master database instance node. Changeme_123 indicates the default password of the database user ossdbuser. keystone.sql indicates the database file obtained by decompressing the iamdbsvr.tar.gz backup file, and keystone next to -d indicates the name of the decompressed database file. If there are multiple database files after decompression, you need to restore each database file by replacing the values as required.

    • Zenith database: restoring data about O&M Management, Operation Management, or Unified Log Center

    python /opt/oss/manager/apps/MOICAgent/tools/pyscript/plugins/internal/dbbackup_plugin/manualrecover.pyc mologcenterdbsvr.tar.gz /opt/temp/mologcenterdbsvr/mologcenterdbsvr-20190305121720 192.168.207.38 Password of the database user mologcenterdb Port number

    To restore the table data for all users of the instance, specify the database password for the user of the database instance.

    NOTE:

    192.168.207.39 indicates the IP address of the master database instance node. mologcenterdbsvr indicates the name without the suffix of the mologcenterdbsvr.tar.gz file to be restored. Changeme_123 is the default password of database user mologcenterdb. Port number is the port number of the master database instance node. Replace the values as required. mologcenterdbsvr-20190305121720 is the name of the decompression folder that stores the downloaded backup files to be restored.

  5. After the restoration is complete, wait for 5 minutes and choose Application > Service Management > System Monitor to view the database status and replication status of the slave database instance.

    1. Click to switch to the ManageOne or CloudSOP-UniEP page. Click the Relational Databases tab to view the database status.
      • If the status is Running, the database is running properly.
      • If the status is Not Running or Unknown, the database is abnormal. In this case, contact Huawei technical support.
    2. Click to switch to the ManageOne or CloudSOP-UniEP page and click the Relational Databases tab.
      By default, the data on the master database instance is automatically synchronized to the slave database instance.
      • If Replication Status of the slave database instance is normal, the data on the master database instance has been synchronized to the slave database instance.
      • If Replication Status of the slave database instance is abnormal, contact technical support for assistance.
      • If Replication Status of the slave database instance is --, the database instance is a single instance and does not have a master/slave relationship.

  6. Run the following command to delete redundant data:

    rm -rf /opt/temp/*

Translation
Download
Updated: 2019-06-14

Document ID: EDOC1100062366

Views: 776

Downloads: 9

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next