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).
Verifying the Integrity of the SFTP Operation SDR Backup Files and Database Service Backup Files

Verifying the Integrity of the SFTP Operation SDR Backup Files and Database Service Backup Files

Procedure

  1. Query the node where the MOICAgentMgmtService microservice resides based on Querying the IP Address of the Node Where MODataSetService Is Deployed.
  2. Stop the MOICAgentMgmtService microservice on all nodes except the Service01 node based on Stopping a Microservice
  3. Log in to the Service01 node as the sopuser user.

    The default password of the sopuser user is D4I$awOD7k.

  4. Run the following command to switch to the ossadm user:

    su - ossadm

    The default password of the ossadm user is Changeme_123.

  5. Check the backup file.

    • SFTP operation SDR backup file
      1. Run the following command to connect to the SFTP backup server:

        sftp sftpuserIP address of the SFTP backup server

        NOTE:
        • The user name and password of the SFTP backup server must be the same as those set when the SFTP backup server is created for ManageOne.
        • If "Are you sure you want to continue connecting (yes/no)?" is displayed during the command execution, enter yes and then press Enter.
      2. Run the following command to view the file list:
        cd /opt/oss/backupdata/ManageOne
        NOTE:

        The directory of the SFTP backup server must be the same as the directory set when the SFTP backup server is created for ManageOne.

        ls -l

        Information similar to the following is displayed:

        drwxr-x--- 2 ossadm ossgroup 4096 Mar 12 01:01 admindbsvr
        drwxr-x--- 2 ossadm ossgroup 4096 Mar 12 08:00 backupdbsvr
        drwxr-x--- 2 ossadm ossgroup 4096 Mar 12 07:00 es
        drwxr-x--- 2 ossadm ossgroup 4096 Mar 12 01:00 fullmeter
        drwxr-x--- 2 ossadm ossgroup 4096 Mar 12 01:00 iamdbsvr
        drwxr-x--- 2 ossadm ossgroup 4096 Mar 12 01:00 mologcenterdbsvr
        drwxr-x--- 2 ossadm ossgroup 4096 Mar 11 14:23 ossdbsvr
        drwxr-x--- 2 ossadm ossgroup 4096 Mar 12 01:00 tenantdbsvr

        fullmeter is the directory that stores the full backup file.

      3. Run the following commands to view the full backup file:

        cd fullmeter

        ls -l

        Information similar to the following is displayed:

        total 600
        -rw-r----- 1 ossadm ossgroup 614400 Mar 12 01:00 20190312010015426.tar
    • Database backup file
      1. Run the following command to connect the current node to the SFTP server where the backup files are stored:

        sftp sftpuserIP address of the SFTP backup server

        NOTE:

        The user name and password of the SFTP backup server must be the same as those set when the SFTP backup server is created for ManageOne.

      2. Run the following commands to view the backup file list:

        cd /opt/oss/backupdata/ManageOne

        NOTE:

        The directory of the database backup server must be the same as the directory set when the SFTP backup server is created for ManageOne.

        cd iamdbsvr

        ls -l

        Information similar to the following is displayed:

        total 188
        -rw-r----- 1 ossadm ossgroup 188823 Mar 12 01:00 iamdbsvr-20190312010005.tar.gz

  6. Perform the following steps to verify the integrity of the backup file (iamdbsvr-20190312010005.tar.gz is used as an example):

    1. Use FileZilla to download the backup file to the local client.
      NOTE:

      The username and password used for downloading files must be the same as those created when the SFTP backup server is created for ManageOne.

    2. Use FileZilla to upload the backup file to the /home/ossadm directory as the ossadm user.
    3. Run the following command to decompress the backup file:

      tar xf iamdbsvr-20190312010005.tar.gz

    4. Run the following commands to assign permission on the decompressed file:

      cd /home/ossadm

      chmod 660 /home/ossadm/iamdbsvr-20190312010005/*

      NOTE:

      iamdbsvr-20190312010005 indicates the name of the folder generated after the iamdbsvr-20190312010005.tar.gz package is decompressed.

    5. Run the following commands to switch to the decompressed folder and view and take a note of the name of the decompressed backup file:

      cd /home/ossadm/iamdbsvr-20190312010005/

      ll

      The name extension of a backup file is .gz or .tar. iamdbsvr.tar.gz is used as an example.

    6. Run the following commands to verify the integrity of the backup file:

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

      python

      import util.httpclient

      client=util.httpclient.CommonHttpClient("IP address of the Service01 node",32018,True,False)

      client.post("/rest/mobackupservice/v1/sign/verification",{"filePath":"/home/ossadm/iamdbsvr-20190312010005","backupFileName":"iamdbsvr.tar.gz"})

      NOTE:

      iamdbsvr-20190312010005 indicates the name of the folder generated after the iamdbsvr-20190312010005.tar.gz package is decompressed, and iamdbsvr-20190312010005 indicates the name of the backup file recorded in 6.e.

      • The verification is successful if information similar to the following is displayed:
        (200, '{"result":"Backup file validity:OK."}')
      • If information similar to the following is displayed, the verification fails, and the backup file is tampered with. The restoration of the file may cause system unavailability.
        (200, '{"result":"Backup file validity:Failure. Backup file is changed. xxx"}')
        (200, '{"result":"Backup file validity:Failure. The client.cer of certificate is invalid."}')
        (200, '{"result":" Backup file validity:Failure. Failed to decrypt backup file digest in remark.txt, the digest is changed "}')
    7. Run the following command to roll back to the ossadm user:

      exit()

  7. Start the MOICAgentMgmtService microservice on all nodes except the Service01 node based on Starting a Microservice
  8. Delete the intermediate file (iamdbsvr-20190312010005.tar.gz is used as an example).

    rm -f /home/ossadm/iamdbsvr-20190312010005.tar.gz

Translation
Download
Updated: 2019-06-14

Document ID: EDOC1100062366

Views: 2069

Downloads: 15

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