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 the Elasticsearch Service Data by Calling the Elasticsearch Backup and Restoration Interface

Restoring the Elasticsearch Service Data by Calling the Elasticsearch Backup and Restoration Interface

When Backup and Restoration is unavailable on ManageOne Maintenance Portal, system maintenance engineers can restore the Elasticsearch service data by calling the Elasticsearch backup and restoration interface.

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. Query the IP address and port number of the backupdbsvr database instance node. For details, see Viewing the Database Instance Where the Database Service Is Deployed. Example of the database instance name: backupdbsvr-8-0@9-0; 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: 32084
  2. Use PuTTY to log in to the database instance node using the IP address of any backupdbsvr-8-0@9-0 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 switch to the database maintenance user dbuser:

    su dbuser

  5. Run the following commands to connect to the master database instance node:

    /opt/zenith/app/bin/zsql mobackupservicedb/password of database user @192.168.121.174:port number

    If "SSL connection to server without CA certificate is insecure. Continue anyway? (y/n):" is displayed, enter y.

    NOTE:

    192.168.121.174 indicates the IP address of the master database instance node. Changeme_123 indicates the default password of database user mobackupservicedb. 32084 indicates the port number of the master database instance node. Change the values based on the site requirements.

  6. Run the following command to view information about the Elasticsearch service backup file:

    select f.name,f.type,f.create_time from files f where f.business_type = 'es_management';

    Information similar to the following is displayed:

    NAME                                                             TYPE     CREATE_TIME
    ---------------------------------------------------------------- -------- ---------------------------------
    snapshot-20190307063408                                          0        2019-03-07 06:34:09
    snapshot-20190307063410                                          0        2019-03-07 06:34:11

    name indicates the name of the backup file, type indicates the backup type, 0 indicates full backup, and create_time indicates the time when the backup file is generated.

  7. Use PuTTY to log in to the node where MODataSetService is deployed using the IP address of any node where MODataSetService is deployed.

    Default account: sopuser; default password: D4I$awOD7k

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

    su root

    The default password is Changeme_123.

  9. Run the following commands to select the Elasticsearch backup file to be restored and call the Elasticsearch backup and restoration interface to restore the Elasticsearch service data:

    su ossadm

    . /opt/oss/manager/bin/engr_profile.sh

    python

    import util.httpclient

    client=util.httpclient.CommonHttpClient("IP address of the node where MODataSetService resides",32018,True,False);

    client.post("/rest/modatasetservice/v1/es/backupExecution",{"taskCatalog": "1",

    "reportURL": "",

    "data": {"backupType":"0","taskId":"1","protocol":"sftp","snapshot":"snapshot-20190307063410",

    "config": {"passWord":"Password for logging in to the backup server","address": "192.168.121.101","port": "Port number","backupPath": "/datas/backup/sftpuser/eSbackup","username": "sftpuser"}}});

    If the following information is displayed, the command for calling the Elasticsearch backup and restoration interface is successfully executed:

    (200, '')

    Table 2-2 describes the parameters in the command for calling the Elasticsearch backup and restoration interface.

    Table 2-2 Command parameter description

    Parameter

    Description

    taskCatalog

    Specifies the task type. 1: restoration task; 0: backup task

    backupType

    Specifies the backup type. The value 0 indicates full backup. You only need to select the files to be backed up based on the time instead of backup types for Elasticsearch service restoration.

    taskId

    Specifies the task ID, which is automatically allocated by the system when a backup task is delivered. You can enter any value for restoration tasks.

    snapshot

    Specifies the backup file snapshot, which is named in the format of snapshot-Timestamp when the backup file is generated.

    passWord

    Specifies the password for logging in to the backup server, for example, Huawei@123.

    address

    Specifies the IP address of the backup server.

    port

    Specifies the port number of the server. The default port number is 22.

    backupPath

    Specifies the backup path.

    username

    Specifies the username for logging in to the backup server.

    POST

    Specifies the address of the Elasticsearch backup and restoration interface. 192.168.121.156 is the IP address of the node where MODataSetService is deployed. 32018 is the port number and is a fixed value.

    NOTE:

    server.cer indicates the name of the ER certificate on ManageOne Deployment Portal. server_key.pem indicates the ER certificate key on ManageOne Deployment Portal. Changeme_123 indicates the password of the ER certificate on ManageOne Deployment Portal. Replace these variables with the actual values.

Translation
Download
Updated: 2019-06-14

Document ID: EDOC1100062366

Views: 739

Downloads: 9

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