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 Service OM

Restoring Service OM

Performing Restoration using FusionSphere OpenStack

This task describes how to restore Service OM data.

After an important operation, such as system upgrade or critical data modification, is performed for Service OM, an exception may occur, the operation has not achieved the expected result, or the GaussDB database data is lost due to unexpected power-off. In this case, you can roll back the system. The rollback requires data restoration.

Scenarios

This task cannot be used to restore the data after the Service OM node is faulty and is installed again and can be only used to restore the Service OM node data to a time point when a data backup was created.

Prerequisites
  • A backup file that meets the restoration date and time requirements is available in the local directory.
NOTE:

Before restoring data, you need to manually copy the backup file to the host to be restored. You can run the backup package-get command to query the backup package.

  • A PC is available to access the hosts in the AZ.
  • To restore the data when services are normal, manually back up the latest management data first and then restore the data. Otherwise, the management node data generated from the backup time to the restoration time will be lost.
  • You have obtained information about the data center administrator account.
  • You have obtained the username, password, and management IP address for logging in to the host.
Procedure

Query the local backup file.

  1. Use PuTTY to log in to the first FusionSphere OpenStack node through the IP address of the External OM plane.

    The default username and password are fsp and Huawei@CLOUD8, respectively.

    The system supports identity authentication using both the passwords and public-private key pairs. For details about login authentication using the public-private key pairs, see Using PuTTY to Log In to a Node in Key Pair Authentication Mode.

    NOTE:
    To obtain the IP address of the External OM plane, search for the required parameter on the Tool-generated IP Parameters sheet of the xxx_export_all.xlsm file exported from HUAWEI CLOUD Stack Deploy during software installation. The parameter names in different scenarios are as follows:
    • Region Type I scenario:

      Cascading system: Cascading-ExternalOM-Reverse-Proxy

      Cascaded system: Cascaded-ExternalOM-Reverse-Proxy

    • Region Type II and Region Type III scenarios: ExternalOM-Reverse-Proxy

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

    su - root

    The default password of the root user is Huawei@CLOUD8!.

  3. Run the TMOUT=0 command to disable user logout upon system timeout.
  4. Run the following command to enter the backup file directory:

    cd /opt/backup/backupfile/

  5. Run the following command to view the backup file in the directory:

    ll

  6. Check whether backup data that meets the restoration date and time requirements is available in the local directory.

    NOTE:

    If possible, use local backup data for restoration. Use backup data on the third-party backup server only when local backup data is unavailable.

Copy backup data from the third-party backup server.

  1. Use WinSCP to copy the backup file from the third-party backup server to the local PC.
  2. Use WinSCP to log in to the host to be restored using the IP address of the host.

    The default username and password are fsp and Huawei@CLOUD8, respectively.

    NOTE:

    Obtain the host IP address from the project LLD.

  3. Copy the backup file from the local PC to the required backup directory of the target service on the FusionSphere OpenStack node.

    The backup directory is /opt/backup/backupfile/Service name.

  4. Run the following command to change the group to which the backup package belongs:

    chown backup:cps Backup package name

Restore the Service OM data.

  1. Use PuTTY to log in to the first FusionSphere OpenStack node through the IP address of the External OM plane.

    The default username and password are fsp and Huawei@CLOUD8, respectively.

    The system supports identity authentication using both the passwords and public-private key pairs. For details about login authentication using the public-private key pairs, see Using PuTTY to Log In to a Node in Key Pair Authentication Mode.

    NOTE:
    To obtain the IP address of the External OM plane, search for the required parameter on the Tool-generated IP Parameters sheet of the xxx_export_all.xlsm file exported from HUAWEI CLOUD Stack Deploy during software installation. The parameter names in different scenarios are as follows:
    • Region Type I scenario:

      Cascading system: Cascading-ExternalOM-Reverse-Proxy

      Cascaded system: Cascaded-ExternalOM-Reverse-Proxy

    • Region Type II and Region Type III scenarios: ExternalOM-Reverse-Proxy

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

    su - root

    The default password of the root user is Huawei@CLOUD8!.

  3. Import environment variables. Enter 1 to select Keystone V3 authentication. Enter the password of user OS_USERNAME as prompted. (The default password is FusionSphere123.)

    source set_env

    Information similar to the following is displayed:

    please choose environment variable which you want to import: 
    (1) openstack environment variable (keystone v3) 
    (2) cps environment variable 
    (3) openstack environment variable legacy (keystone v2) 
    (4) openstack environment variable of cloud_admin (keystone v3) 
    please choose:[1|2|3|4] 

  4. Run the following command to view backup package information:

    backup package-get --service serviceom

    Information similar to the following is displayed:

    +-----------+-----------------------------+----------------------------------------------+
    | service   | single service package list | all service package list                     |
    +-----------+-----------------------------+----------------------------------------------+
    | serviceom |                             | serviceom-2019-03-07-20-05-51-36-all.tar.gz, |
    |           |                             | serviceom-2019-03-08-03-00-01-37-all.tar.gz  |
    +-----------+-----------------------------+----------------------------------------------+

  5. Run the following command to restore the Service OM data:

    restore execute --service serviceom --file Back file name [--path Directory containing the backup file]

    path is an optional parameter, which specifies the directory that contains the backup package. If the command does not contain this parameter, the system searches for the specified backup package first from the default local backup directory. If the backup package cannot be found in the local backup directory, the system then searches for and downloads the required backup package from the configured third-party server.

    For example, run the following command:

    restore execute --service serviceom --file serviceom-2019-03-08-03-00-01-37-all.tar.gz --path /opt/backup/backupfile/serviceom

Check the restoration progress.

  1. Run the following command to query the restoration progress:

    restore progress-get --service serviceom [--detail]

    detail is an optional parameter, which provides detailed information about the service instance.

    Information similar to the following is displayed:

    TOTAL:
    +-----------+---------------------+---------------------+---------+----------+---------+
    | service   | start time          | end time            | result  | progress | message |
    +-----------+---------------------+---------------------+---------+----------+---------+
    | serviceom | 2019-03-08 11:12:30 | 2019-03-08 11:21:43 | SUCCESS | 100%     |         |
    +-----------+---------------------+---------------------+---------+----------+---------+
    DETAIL:
    +-----------+------------------------------------------+---------+----------+-----------+----------+
    | service   | id                                       | result  | progress | errorcode | errormsg |
    +-----------+------------------------------------------+---------+----------+-----------+----------+
    | serviceom | allinonefm1-37ac19ac-f352-45c5-bc8d-b524 | SUCCESS | 100%     | 0         |          |
    |           | 2eb9cf13                                 |         |          |           |          |
    |           | allinonefm0-85ccddbd-a2b3-4a71-b7da-b4fc | SUCCESS | 100%     | 0         |          |
    |           | cb236ade                                 |         |          |           |          |
    +-----------+------------------------------------------+---------+----------+-----------+----------+

Performing Restoration Using Service OM

This task describes how to restore Service OM data.

After an important operation, such as system upgrade or critical data modification, is performed for Service OM, an exception may occur, the operation has not achieved the expected result, or the GaussDB database data is lost due to unexpected power-off. In this case, you can roll back the system. The rollback requires data restoration.

Scenarios
  • During the restoration, the Service OM process is stopped. Therefore, you cannot log in to Service OM and perform related operations.
  • After the data is restored, the data generated between the backup time and restoration time is lost.
  • Data restoration can be performed only when the system version during data backup is consistent with the current system version.
  • Use backup data of the same date (or close dates) for all components. Otherwise, services and operations may fail.
  • To restore the data when services are normal, manually back up the latest management data first and then restore the data. Otherwise, the management node data generated from the backup time to the restoration time will be lost.
  • Before data restoration, ensure that no system operation is in progress. The system operations include creating a resource cluster, scaling out or scaling in a cluster, provisioning services, configuring a system management subnet, powering on or off a server, and restarting a server. Do not perform any system operation during the restoration.
  • If there is a backup server administrator, contact him/her to perform related operations on the third-party backup server.
  • If possible, use local backup data for restoration. Use backup data on the third-party backup server only when local backup data is unavailable.
Prerequisites
  • Before data restoration, ensure that the Service OM node is running properly.
  • A local PC that can communicate with Service OM is available.
  • You have obtained the management IP address of the Service OM node and password of user galaxmanager.
  • The backup file that meets the restoration date and time requirements is available on Service OM or the third-party backup server. Using the latest backup file is recommended. To use the data backed up on FusionSphere OpenStack to restore the system, the data backup file must be decompressed, and the name format of the backup file must be changed to the same as that of the file backed up using Service OM.
  • The database is not accessed using other methods (such as using the psql commands on the server).
  • If backup data on the third-party backup server is used for restoration, obtain the backup server login information, including the IP address, username, and password.
Procedure
  1. Check whether to restore data using Service OM data which is backed up on FusionSphere OpenStack and stored in a local directory.

Query the local backup file.

  1. Use PuTTY and the management IP address of the Service OM node to log in to the active Service OM node.

    The default username and password are galaxmanager and IaaS@OS-CLOUD9!, respectively.

    NOTE:
    To obtain the management IP address of the Service OM node, search for the required parameter on the Tool-generated IP Parameters sheet of the xxx_export_all.xlsm file exported from HUAWEI CLOUD Stack Deploy during software installation. The parameter names in different scenarios are as follows:
    • Region Type I scenario: Cascading-OM-externalOM-Float-IP
    • Region Type II and Region Type III scenarios: OM-externalAPI-Float-IP

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

    su - root

    The default password of the root user is IaaS@OS-CLOUD8!.

  3. Run the TMOUT=0 command to disable user logout upon system timeout.
  1. Run the following command to enter the backup file directory:

    cd Directory containing the backup file

    Directory containing the backup file:
    • Directory containing the manually backed-up file: /opt/gmbackup/db/manualbk/
    • Directory containing the automatically backed-up file: /opt/gmbackup/db/
    • Directory containing the automatically backed-up file every month: /opt/gmbackup/db/autobakm/

  2. Run the following command to view the backup file in the directory:

    ll

  3. Check whether backup data that meets the restoration date and time requirements is available in the local Service OM directory.

    NOTE:

    If possible, use local backup data for restoration. Use backup data on the third-party backup server only when local backup data is unavailable.

Restore the data using data backed up on FusionSphere OpenStack.

  1. Use PuTTY to log in to the first FusionSphere OpenStack node through the IP address of the External OM plane.

    The default username and password are fsp and Huawei@CLOUD8, respectively.

    The system supports identity authentication using both the passwords and public-private key pairs. For details about login authentication using the public-private key pairs, see Using PuTTY to Log In to a Node in Key Pair Authentication Mode.

    NOTE:
    To obtain the IP address of the External OM plane, search for the required parameter on the Tool-generated IP Parameters sheet of the xxx_export_all.xlsm file exported from HUAWEI CLOUD Stack Deploy during software installation. The parameter names in different scenarios are as follows:
    • Region Type I scenario:

      Cascading system: Cascading-ExternalOM-Reverse-Proxy

      Cascaded system: Cascaded-ExternalOM-Reverse-Proxy

    • Region Type II and Region Type III scenarios: ExternalOM-Reverse-Proxy

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

    su - root

    The default password of the root user is Huawei@CLOUD8!.

  3. Run the following command to copy the backup file to the /home/fsp directory:

    cp Service OM Backup file /home/fsp/

    For example: cp /opt/backup/backupfile/serviceom/serviceom-2019-03-08-03-00-01-37-all.tar.gz /home/fsp/

  4. Run the following command to change the owner of the backup file to fsp:

    chown fsp:fsp Service OM Backup file

    For example: chown fsp:fsp /home/fsp/serviceom-2019-03-08-03-00-01-37-all.tar.gz

  5. Run the exit command to switch to user fsp.
  6. Run the following command to copy the backup file to the active Service OM node.

    scp -r Service OM backup file galaxmanager@ IP address of the active Service OM node:/home/galaxmanager/upload

    For example: scp -r /home/fsp/serviceom-2019-03-08-03-00-01-37-all.tar.gz galaxmanager@172.28.12.197:/home/galaxmanager/upload

  7. Enter the password of the SSH certificate as prompted. The default password is Huawei@CLOUD8!.

    NOTE:

    If you enter incorrect passwords for three consecutive times, the system prompts you to enter the password of user galaxmanager. The default password is IaaS@OS-CLOUD9!.

  8. Use PuTTY and the management IP address of the Service OM node to log in to the active Service OM node.

    The default username and password are galaxmanager and IaaS@OS-CLOUD9!, respectively.

    NOTE:
    To obtain the management IP address of the Service OM node, search for the required parameter on the Tool-generated IP Parameters sheet of the xxx_export_all.xlsm file exported from HUAWEI CLOUD Stack Deploy during software installation. The parameter names in different scenarios are as follows:
    • Region Type I scenario: Cascading-OM-externalOM-Float-IP
    • Region Type II and Region Type III scenarios: OM-externalAPI-Float-IP

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

    su - root

    The default password of the root user is IaaS@OS-CLOUD8!.

  10. Run the following command on Service OM to switch to the /home/galaxmanager/upload directory:

    cd /home/galaxmanager/upload

  11. Run the following command to decompress the backup file:

    tar -xzvf Service OM Backup file

    For example, run the following command:

    tar -xzvf serviceom-2019-03-08-03-00-01-37-all.tar.gz

  12. Run the following commands to decompress the backup file (If the backup files of both the active and standby nodes exist, perform the operation for one of the backup files):

    cd serviceom_ls_pkg

    tar -xzvf Service OMBackup data file

    For example, run the following commands:

    cd serviceom_ls_pkg

    tar -xzvf allinonefm0_37ac19ac-f352-45c5-bc8d-b5242eb9cf13_gmdb-2019-03-08-2.dump.tar.gz

  13. Run the following command to move the decompressed backup file to the /opt/gmbackup/db/manualbk/ directory and then change the file name (you need to keep the year, month, day, and count information unchanged):

    mv Service OMOriginal backup file /opt/gmbackup/db/manualbk/gmdb-2019-03-08-2.dump

    For example, run the following command:

    mv opt/goku/data/dc_backup/allinonefm0_37ac19ac-f352-45c5-bc8d-b5242eb9cf13_gmdb-2019-03-08-2.dump /opt/gmbackup/db/manualbk/gmdb-2019-03-08-2.dump

  14. Go to Step 24.

Copy backup data from the third-party backup server.

  1. Use WinSCP to copy the backup file from the third-party backup server to the local PC.
  2. Use WinSCP to copy the backup file from the local PC to the backup directories of the active and standby Service OM nodes as the galaxmanager user, respectively.

    Directory containing the backup file:
    • Directory containing the manually backed-up file: /opt/gmbackup/db/manualbk/
    • Directory containing the automatically backed-up file: /opt/gmbackup/db/
    • Directory containing the automatically backed-up file every month: /opt/gmbackup/db/autobakm/

Stop Service OM processes.

  1. Check whether Service OM is deployed in active/standby mode.

  2. Use PuTTY and the management IP address of the Service OM node to log in to the active Service OM node.

    The default username and password are galaxmanager and IaaS@OS-CLOUD9!, respectively.

    NOTE:
    To obtain the management IP address of the Service OM node, search for the required parameter on the Tool-generated IP Parameters sheet of the xxx_export_all.xlsm file exported from HUAWEI CLOUD Stack Deploy during software installation. The parameter names in different scenarios are as follows:
    • Region Type I scenario: Cascading-OM-externalOM-Float-IP
    • Region Type II and Region Type III scenarios: OM-externalAPI-Float-IP

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

    su - root

    The default password of the root user is IaaS@OS-CLOUD8!.

  4. Run the TMOUT=0 command to disable user logout upon system timeout.
  5. Run the following command to query the IP addresses of active and standby Service OM nodes:

    QueryHaState om

    Information similar to the following is displayed:

    LOCAL_HOST=FMN01 
    LOCAL_STATE=active 
    LOCAL_IP=192.168.40.13 
    REMOTE_HOST=FMN02 
    REMOTE_STATE=standby 
    REMOTE_IP=192.168.40.14     

  6. Run the following command to disable the active/standby switchover:

    ha_switch -f MODIFY_DB 86400

  7. If you use the local Service OM backup file to restore the data, use WinSCP to copy the backup file from the active Service OM node to the related directory on the standby Service OM node as the galaxmanager user.
  8. Use PuTTY and the management IP address of Service OM to log in to the standby Service OM node.

    The default username and password are galaxmanager and IaaS@OS-CLOUD9!, respectively.

    NOTE:
    To obtain the management IP address of the Service OM node, search for the required parameter on the Tool-generated IP Parameters sheet of the xxx_export_all.xlsm file exported from HUAWEI CLOUD Stack Deploy during software installation. The parameter names in different scenarios are as follows:
    • Region Type I scenario: Cascading-OM-externalOM-Float-IP
    • Region Type II and Region Type III scenarios: OM-externalAPI-Float-IP

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

    su - root

    The default password of the root user is IaaS@OS-CLOUD8!.

  10. Run the TMOUT=0 command to disable user logout upon system timeout.
  11. Run the following command to stop all processes on the standby Service OM node:

    stopALL

    If the following information is displayed, all processes on the standby Service OM node are stopped:

    Stop all services success.

    If only one Service OM node is deployed, go to Step 37 after this step is complete.

  12. Use PuTTY and the management IP address of the Service OM node to log in to the active Service OM node.

    The default username and password are galaxmanager and IaaS@OS-CLOUD9!, respectively.

    NOTE:
    To obtain the management IP address of the Service OM node, search for the required parameter on the Tool-generated IP Parameters sheet of the xxx_export_all.xlsm file exported from HUAWEI CLOUD Stack Deploy during software installation. The parameter names in different scenarios are as follows:
    • Region Type I scenario: Cascading-OM-externalOM-Float-IP
    • Region Type II and Region Type III scenarios: OM-externalAPI-Float-IP

  13. Stop all processes on the active Service OM node based on Step 32 to Step 34.

Restoring the Service OM node data.

  1. Run the following command to restore the active Service OM node:

    restoreFusionManager -f Directory containing the backup file+ Backup file name

    The backup file name is gmdb-YYYY-MM-DD-sn.dump, YYYY-MM-DD indicates the backup date, and sn indicates the serial number.

    For example: restoreFusionManager -f /opt/gmbackup/db/manualbk/gmdb-2019-03-08-2.dump

    The active Service OM node is restored if the following information is displayed:

    [INFO ] Check conflict backup or restore task... 
    ... 
    [INFO ] Restore FusionManager ok

  2. Run the following command to configure the HA function for the active Service OM node:

    initGmn4Restore

    The HA function is configured if the following information is displayed:

    [INFO ] configure in HA mode 
    [INFO ] check configuration success 
    [INFO ] configure ip success 
    [INFO ] start configure ha, it will take about 1~2 minuters 
    [INFO ] configure ha success 
    [INFO ] init successful 
    [INFO ] init for restore successful

  3. Check whether Service OM is deployed in active/standby mode.

    • If yes, go to Step 40.
    • If no, no further action is required.

  4. Use PuTTY and the management IP address of Service OM to log in to the standby Service OM node.

    The default username and password are galaxmanager and IaaS@OS-CLOUD9!, respectively.

    NOTE:
    To obtain the management IP address of the Service OM node, search for the required parameter on the Tool-generated IP Parameters sheet of the xxx_export_all.xlsm file exported from HUAWEI CLOUD Stack Deploy during software installation. The parameter names in different scenarios are as follows:
    • Region Type I scenario: Cascading-OM-externalOM-Float-IP
    • Region Type II and Region Type III scenarios: OM-externalAPI-Float-IP

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

    su - root

    The default password of the root user is IaaS@OS-CLOUD8!.

  6. Run the TMOUT=0 command to disable user logout upon system timeout.
  7. Restore the standby Service OM node based on Step 37 to Step 38.
  8. On the active Service OM node, run the following command to enable the active/standby switchover:

    ha_switch -c MODIFY_DB

Translation
Download
Updated: 2019-06-14

Document ID: EDOC1100062366

Views: 825

Downloads: 9

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