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 SFS Service Data

Restoring SFS Service Data

Generally, data needs to be restored in two scenarios. This chapter describes how to restore data in the two scenarios.

Context

  • Scenario 1: Data in the Gauss database is lost or damaged. In this scenario, the data needs to be restored.
  • Scenario 2: A fault occurs in the OceanStor DJ system or on the node where the OceanStor DJ system resides. In this scenario, the OceanStor DJ system needs to be reinstalled, and related configuration data needs to be restored.

Precautions

The data restoration takes a long time. During the restoration, ensure that the network and the communication with the OceanStor DJ node are normal. Otherwise, data restoration will be interrupted. If data restoration is interrupted due to communication failures caused by intermittent network disconnection or other factors, restore data again as described in scenario 2.

Procedure

  • Scenario 1: Data in the Gauss database is lost or damaged. In this scenario, the data needs to be restored.The restoration method is as follows:
  • Data restoration takes a long time. During the restoration, ensure that the network and the communication with the OceanStor DJ node are both normal. Otherwise, data restoration will be interrupted. If data restoration is interrupted due to a communication failure caused by intermittent network disconnection or other factors, contact technical support.
  • Backup data of a site cannot be used to restore another site with the same networking environment.
  • Backup data can be used for restoration only if the OceanStor DJ software version used when the restoration is executed is the same as that used when the backup is executed.
  • Restoring the database will stop all OceanStor DJ services, resulting in service interruption. Before the restoration, ensure that no OceanStor DJ service is running.
  • Because the restored GaussDB data exists only on OceanStor DJ, data on the ManageOne Operation Portal, OceanStor 9000, and OceanStor DJ may be inconsistent. After the restoration, using file sharing resources which have been modified after the backup time may cause errors due to data inconsistency. For details about how to handle the errors, see The ManageOne Operation Portal Displays You are not allowed to perform any operation on a deleted resource. in the HUAWEI CLOUD Stack 6.5.0 Troubleshooting Guide. If it cannot be solved, contact Huawei technical support engineers to handle the data inconsistency problem.
  1. Use PuTTY to log in to each OceanStor DJ node through its management IP address.

    The login account is djmanager and its default password is CloudService@123!.

    To obtain the IP address, search for SFS_DJ01, SFS_DJ02, and SFS_DJ03 in the 2.1 Tool-generated IP Parameters sheet of the xxx_export_all_EN.xlsm file exported after deployment using HUAWEI CLOUD Stack Deploy.

  2. Check whether directory /opt/djbackup/db exists on each node. If two nodes have this directory, perform the following steps on the node where the backup data is to be restored as needed.
  3. Run the TMOUT=0 command to prevent PuTTY from exiting due to timeout.

    NOTE:

    After the preceding command is executed, the system remains running even when no operation is performed, which results in security risks. For security purposes, run the exit command to exit after you finish performing operations.

  4. Run the sudo /opt/huawei/dj/bin/backup/backup/gaussdb_restore_entry.sh -f file_path command to restore data in the Gauss database.

    NOTE:

    In the preceding command, file_path indicates the full path of the directory for storing data that is backed up automatically or manually.

    • The path for storing data that is backed up automatically is /opt/djbackup/db.
      sudo /opt/huawei/dj/bin/backup/backup/gaussdb_restore_entry.sh -f /opt/djbackup/db/gaussdb_backup_20180303042320305731674.all.tar.gz
    • The path for storing data that is backed up manually is /opt/djbackup/db/manualbk.
      sudo /opt/huawei/dj/bin/backup/backup/gaussdb_restore_entry.sh -f /opt/djbackup/db/manualbk/gaussdb_backup_20180303042320305731674.all.tar.gz
    NOTE:
    • If you need to use the backup data on the FTP or SFTP server for restoration, log in to the server, decompress the backup data, copy the required backup data package to /home/djmanager on the OceanStor DJ node, and then perform data restoration.

      Path of the backup data: Backup data storage path/OceanStor DJ node host name/DJ_DB_DUMP-Timestamp/DJ_DUMP-db-dump-Timestamp.tar.gz.

      Path of the decompressed backup data package: User-defined decompression path/db/opt/djbackup/db/gaussdb_backup_Timestamp.all.tar.gz.

      To obtain the backup data storage path, see Configuring an FTP Server and Configuring an SFTP Server in Configuring a Backup Policy.

    • If you need to use the backup data in the NFS shared path for restoration, access the path to which the NFS shared space is mounted, decompress the backup data, copy the required backup data package to /home/djmanager, and then perform data restoration.

  5. Enter N or n to restore only the Gauss database.

    sudo /opt/huawei/dj/bin/backup/backup/gaussdb_restore_entry.sh -f /opt/djbackup/db/gaussdb_backup_20180303151209739478866.all.tar.gz 
    gaussdbRestore: N) restore GaussDB only, Y) restore GaussDB, kmc, wcc, and digital certificate.(Y/N)  
    n     

  6. After ensuring that no service is running on OceanStor DJ, enter y or Y as prompted. Then, the system automatically stops all OceanStor DJ services.

    Enter the backup data encryption password as prompted. The default password is CloudService@123!.

    After the restoration is complete, the system automatically starts all services. When the system displays message Successfully started DJ services, all services have been started successfully.

    gaussdbRestore: This operate will stop DJ services. Are you sure you want to continue?(Y/N)  
    y  
    gaussdbRestore: INFO | Begin to stop all services...  
    ...  
    ...  
    ...  
    gaussdbRestore: INFO | Successfully started DJ services.
    • If the backup data to be used for restoration has been tampered with or misoperated, the system displays message The backup file has been changed. Are you sure you want to continue. In this case, you are advised to use backup data at another point in time for restoration.
    • If an exception occurs after the service restart, resolve the problem by following instructions in The Active/Standby States of GaussDB Nodes Are Abnormal > File Storage Faults > OceanStor DJ Manila TroubleShooting > SFS TroubleShooting in the HUAWEI CLOUD Stack 6.5.0 Troubleshooting Guide.
    • If a file system is permanently deleted after the backup operation, the deleted file system will still be displayed on the ManageOne Operation Portal after the backup is used for restoration. In this case, the administrator needs to manually delete dirty data (file systems which have records in databases but have been permanently deleted) according to operation log. For details, see The ManageOne Operation Portal Displays You are not allowed to perform any operation on a deleted resource. in the HUAWEI CLOUD Stack 6.5.0 Troubleshooting Guide.

  • Scenario 2: A fault occurs in the OceanStor DJ system or on the node where the OceanStor DJ system resides. The restoration method is as follows:
  1. Reinstall the OceanStor DJ. For details,see Installing OceanStor DJ in the STaaS Solution 6.5.0 SFS Software Installation Guide (Private Cloud Scenario for HUAWEI CLOUD Stack 6.5.0).
  2. Restore the Gauss database, KMC key files, WCC key files, and digital certificates.

    • Backup data of a site cannot be used to restore another site with the same networking environment.
    • Backup data can be used for restoration only if the OceanStor DJ software version used when the restoration is executed is the same as that used when the backup is executed.
    • If the database is backed up during service running (such as volume backup), some data may not be saved into the database, resulting in data inconsistency. You are advised to back up the database after service running has ended or when there are a few services running.
    1. Run the PuTTY software.
    2. Use the djmanager account and its password to log in to the OceanStor DJ node.

      The default password of the djmanager account is CloudService@123!. To ensure system security, change the password periodically. For details, see the HUAWEI CLOUD Stack 6.5.0 Account List.

    3. Upload the required backup data package to the /home/djmanager directory.
      NOTE:
      • If you need to use backup data on the FTP server for restoration, log in to the FTP server, decompress backup data, copy the required backup data package to /home/djmanager on the OceanStor DJ node, and then perform data restoration.
      • If you need to use backup data in the NFS shared path for restoration, access the path to which the NFS shared space is mounted, decompress backup data, copy the required backup data package to /home/djmanager, and then perform data restoration.
    4. Run the sudo /opt/huawei/dj/bin/backup/backup/gaussdb_restore_entry.sh -f file_path command to restore the Gauss database, KMC key files, WCC key files, and digital certificates.

      In the preceding command, file_path indicates the full path of the path where the backup data resides, instead of a relative path that contains a period following a slash (./).

    5. Enter Y or y to restore the Gauss database, KMC key files, WCC key files, and digital certificates. The backup data encryption password is required during the restoration.
      sudo /opt/huawei/dj/bin/backup/backup/gaussdb_restore_entry.sh -f /home/djmanager/gaussdb_backup_20160608151209739478866.all.tar.gz gaussdbRestore: N) restore GaussDB only, Y) restore GaussDB, kmc, wcc, and digital certificate.(Y/N) y gaussdbRestore: You need to provide the backup password. Are you sure you want to continue?(Y/N) y gaussdbRestore: Password:  
    6. After ensuring that no service is running on OceanStor DJ, enter y or Y as prompted. Then, the system automatically stops all OceanStor DJ processes.

      After the restoration is complete, the system automatically starts all processes. When the system displays the message Successfully started DJ services, all processes have been started successfully.

      gaussdbRestore: This operate will stop DJ services. Are you sure you want to continue?(Y/N) y gaussdbRestore: INFO | Begin to stop all services... ... ... ... gaussdbRestore: INFO | Successfully started DJ services.
      • If the backup data to be used for restoration has been tampered with or misoperated, the system displays the message The backup file has been changed. Are you sure you want to continue. In this case, you are advised to use backup data of another time point for restoration.
      • If an exception occurs after the service restart, resolve the problem by following instructions in The Active/Standby States of GaussDB Nodes Are Abnormal > File Storage Faults > OceanStor DJ Manila TroubleShooting > SFS TroubleShooting in the HUAWEI CLOUD Stack 6.5.0 Troubleshooting Guide.

Translation
Download
Updated: 2019-06-14

Document ID: EDOC1100062366

Views: 769

Downloads: 9

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