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).
Analytic DataBase Service

Analytic DataBase Service

Restoring a Database

Preparing Data

  1. Use PuTTY to log in to the active database node EIS_PublicVM_service1.

    Default username: ads; default password: Cloud12#$

    NOTE:
    To check whether the node is the active node, perform the following operations:
    • Run the following command on the two EIS_PublicVM_service nodes:

      ps -ef|grep gaussdb

    • If the command output contains "primary", the corresponding node is the active one.

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

    su - root

    Default password: Cloud12#$

  3. Switch to the gausscore user.

    Perform the following operations:

    1. Run the following command to query the backup file:

      cd /opt/gaussdbcore/back_up_data

    2. Run the following command to copy the backup file:

      cp ads.sql_2019_05_14_02:00:04.tar.gz /opt/gaussdbcore

    • If the backup file is not found, the database backup function of this node may be disabled. In this case, search for the backup file on the other server. If the backup file is found, download it from the active and standby nodes following the preceding operations.
    • If the backup file is still not found, there are no successfully backed up sets or the backup function of the two nodes is disabled. Rectify the fault by following the instructions in the related document.

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

    tar -xzvf ads.sql_2019_05_14_02:00:04.tar.gz --force-local

  2. Back up the existing data.

    Run the following commands:

    su - ads

    cd /opt/dbs/ads

    sh DBbackup.sh adsdb adsdb Eis@Remote123 ads.sql Cloud12#$ 7 ads SFTP_USER SFTP_IP UPLOAD_PATH SFTP_PASSWORD

  3. Restore data.

    Run the following commands:

    su - root

    su - gausscore

    gsql -d adsdb -h 127.0.0.1 -p 8635 -U adsdb -WPassword for connecting to the database -f /opt/gaussdbcore/ads.sql_2019_05_14_02:00:04

    If there is no alarm or error in the command output, data is successfully restored.

  4. Delete the backup data.

    Run the following command on the active node:

    rm -rf /opt/gaussdbcore/ads.sql_2019_05_14_02:00:04*

Translation
Download
Updated: 2019-06-14

Document ID: EDOC1100062366

Views: 2113

Downloads: 18

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