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).
Backing Up DMK Data

Backing Up DMK Data

Configuring Backup Policies

Background

Before an automatic or manual backup, you need to specify the backup file quantity, naming rules, and the IP address and storage path of backup files on the third-party server.

Prerequisites
  • You have obtained the floating IP address of the active and standby DMK nodes and password of the dmk user (OS account).
  • A PC that can communicate with the DMK nodes is available.
  • You have obtained the configuration information of the third-party backup server.
  • You have installed SFTP if you are using an SFTP server as the third-party backup server.
Procedure

Modifying the Backup File Configuration

  1. Log in to the OM-SRV01 node using PuTTY.

    Default username: dmk

    NOTE:
    • If HUAWEI CLOUD Stack 6.5.0 is upgraded from an earlier version, the default password of username dmk is Cloud12#$.
    • If HUAWEI CLOUD Stack 6.5.0 is newly installed, the default password of username dmk is cnp200@HW.

  2. Run the following command to check the HA status:

    haStatus

    • If the OM-SRV01 node is in the active state, go to Step 3.
    • If the OM-SRV01 node is in the standby state, go to Step 1 again to log in to the OM-SRV02 node.
    Figure 3-21 HA status

  3. Run the following command to disable user logout upon system timeout:

    TMOUT=0

  1. Run the following command to switch to the directory containing the backup configuration file:

    cd /pkg_repo/backup/conf

  2. Run the following command to open the backup configuration file using the vi editor:

    vi backup.conf

    Table 3-21 describes the parameters in the configuration file.

    Table 3-21 Parameters in the configuration file

    Parameter

    Description

    BACKUP_BASE_DIR

    Specifies the backup file directory.

    BACKUP_USER

    Specifies the OS user who performs the backup.

    LOCATION

    Specifies the region ID in the backup file name.

    AUTO_BACKUP_DAY

    Specifies the retention period of automatic backup files.

    MANUAL_BACKUP_DAY

    Specifies the retention period of manual backup files.

    HA_STATUS_JUDGE

    Specifies whether to check the HA status before the backup. The check can be performed only on the properly running active node.

    BACKUP_SN

    Specifies the serial number of the latest backup file.

    SERVICE_NAME

    Specifies a backup file name, which indicates the data of the DMK node.

    BACKUP_DIRS

    Specifies the directory of the file to be backed up. If multiple directories are specified, separate every two using a space.

  3. Type i to enter the editing mode. Change the parameter values based on service requirements.
  4. Press Esc, type :wq, and press Enter.

    Save the settings and exit the vi editor.

Configuring the Third-Party Backup Server Interconnection Information

  1. Log in to the OM-SRV01 node using PuTTY.

    Default username: dmk

    NOTE:
    • If HUAWEI CLOUD Stack 6.5.0 is upgraded from an earlier version, the default password of username dmk is Cloud12#$.
    • If HUAWEI CLOUD Stack 6.5.0 is newly installed, the default password of username dmk is cnp200@HW.

  2. Run the following command to check the HA status:

    haStatus

    • If the OM-SRV01 node is in the active state, go to Step 10.
    • If the OM-SRV01 node is in the standby state, go to Step 8 again to log in to the OM-SRV02 node.
    Figure 3-22 HA status

  3. Run the following command to disable user logout upon system timeout:

    TMOUT=0

  4. Run the following command to switch to the directory containing the backup configuration file:

    cd /pkg_repo/backup/conf

  5. Run the following command to open the configuration file using the vi editor:

    vi Upload_Server.cfg

    Table 3-22 describes the parameters in the configuration file.

    Table 3-22 Parameters in the configuration file for third-party backup server interconnection

    Parameter

    Description

    UPLOAD_MODE

    Specifies the backup type. Use the default value.

    • 2 indicates that an SFTP server is used for third-party backup.
    • 0 indicates that the backup files are not uploaded to a third-party backup server.

    SFTP_SERVER_IP

    Specifies the IP address of the SFTP server.

    SFTP_SERVER_PORT

    Specifies the port number of the SFTP server.

    SFTP_SERVER_USER

    Specifies the username of the SFTP server.

    SFTP_SERVER_PASSWD

    Specifies the password in ciphertext for logging in to the third-party backup server. The password is encrypted using the SHA-256 encryption tool.

    SFTP_SERVER_FILEPATH

    Specifies the directory on the SFTP server for storing uploaded backup files.

    If the current GaussDB node already has an SFTP backup server deployed, you can obtain the ciphertext required in Table 3-22 from the following directory: /opt/gaussdb/ha/tools/backupAndRestore/Upload_Server.cfg.

    If you cannot obtain the existing ciphertext of the server, encrypt the password plaintext:

    1. Log in the database node using the service account.
    2. Run the sudo su command to switch to the root user and enter password Cloud12#$ of the root user.
    3. Run the following commands to encrypt the password:

      source /etc/profile

      pwswitch -e 'Password plaintext'

  6. Press i to enter the editing mode.
  7. Modify the parameters in the configuration file based on the information about the third-party backup server.
  8. Press Esc, type :wq, and press Enter.

    Save the change and exit the vi editor.

Adjusting the Automatic Backup Time

NOTE:

This step is optional. After the system is installed, by default, automatic full backups are performed at 00:00 every day and automatic incremental backups are performed at 04:00 with an interval of 4 hours every day. If you need to change the automatic backup time, perform the following operations.

  1. Log in to the OM-SRV01 node using PuTTY.

    Default username: dmk

    NOTE:
    • If HUAWEI CLOUD Stack 6.5.0 is upgraded from an earlier version, the default password of username dmk is Cloud12#$.
    • If HUAWEI CLOUD Stack 6.5.0 is newly installed, the default password of username dmk is cnp200@HW.

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

    sudo su - root

    Enter password Cloud12#$ of the root user as prompted.

  3. Run the following command to disable user logout upon system timeout:

    TMOUT=0

  4. Run the following command to switch to the directory containing the automatic backup configuration file:

    vi /etc/crontab

    The following is an example of the configuration file, indicating that full backup is automatically performed every six hours.
    Figure 3-23 Automatic backup configuration file

  5. Press i to enter the editing mode and modify automatic backup parameters as required.

    For example, if you need to change the full backup mode to automatic backup every five hours every day, change */6 * * * dmk/opt/autodeployment/backup/unifiedApi/performBackup.sh > /dev/null 2>&1 to */5 * * * dmk/opt/autodeployment/backup/unifiedApi/performBackup.sh > /dev/null 2>&1.

  6. Press Esc, type :wq, and press Enter.

    Save the change and exit the vi editor.

Viewing Automatic Backup Data

Procedure

View the local automatic backup data package.

  1. Log in to the OM-SRV01 node using PuTTY.

    Default username: dmk

    NOTE:
    • If HUAWEI CLOUD Stack 6.5.0 is upgraded from an earlier version, the default password of username dmk is Cloud12#$.
    • If HUAWEI CLOUD Stack 6.5.0 is newly installed, the default password of username dmk is cnp200@HW.

  2. Run the following command to view the local backup data on the DMK node:

    ll /pkg_repo/backup/auto/ -tr

    -r-------- 1 dmk dmk 43959618 Mar 23 00:00 cn-south-1FATDMK201803230000D925.tar.gz
    -r-------- 1 dmk dmk 44181705 Mar 23 06:00 cn-south-1FATDMK201803230600D926.tar.gz
    -r-------- 1 dmk dmk 41985576 Mar 23 12:00 cn-south-1FATDMK201803231200D927.tar.gz
    -r-------- 1 dmk dmk 43019519 Mar 23 18:00 cn-south-1FATDMK201803231800D930.tar.gz
    -r-------- 1 dmk dmk 43512352 Mar 24 00:00 cn-south-1FATDMK201803240000D931.tar.gz
    -r-------- 1 dmk dmk 43572369 Mar 24 06:00 cn-south-1FATDMK201803240600D932.tar.gz
    -r-------- 1 dmk dmk 39639976 Mar 24 12:00 cn-south-1FATDMK201803241200D933.tar.gz
    -r-------- 1 dmk dmk 39980062 Mar 24 18:00 cn-south-1FATDMK201803241800D934.tar.gz

View the backup data of a third-party server.

  1. Use PuTTY to log in to the SFTP server.

    NOTE:

    Obtain the IP address, user name, and password of the SFTP server from the environment administrator.

  2. Run the following command on the SFTP node to view the backup data of the third-party server:

    ll /xxx/ -tr

    NOTE:

    Set xxx to the backup path planned for the SFTP server. You can contact the environment administrator to obtain the path.

Manually Backing Up Data

Background

Manually back up data on the active DMK node to ensure that services can be restored if any of the following failures occurs:

  • An exception occurs or the operation has not achieved the expected result after an important operation, such as a system upgrade or critical data modification.
  • The disks or OSs of both the active and standby DMK nodes are faulty, and the node data is lost.
  • Data is corrupted due to misoperations.
Prerequisites
  • You have configured the backup file by following the steps provided in Configuring Backup Policies.
  • You have obtained the floating IP address of the active and standby DMK nodes and password of the dmk user (OS account).
  • A PC that can communicate with the DMK nodes is available.
  • The following conditions are met if data is to be backed up to a third-party backup server:
    • The DMK node can communicate with the third-party backup server.
    • Information about the third-party backup server has been configured on the DMK node. For details, see Configuring Backup Policies.
    • An application, such as PuTTY, which can be used for remote access on various platforms, is available.
Procedure
  1. Log in to the OM-SRV01 node using PuTTY.

    Default username: dmk

    NOTE:
    • If HUAWEI CLOUD Stack 6.5.0 is upgraded from an earlier version, the default password of username dmk is Cloud12#$.
    • If HUAWEI CLOUD Stack 6.5.0 is newly installed, the default password of username dmk is cnp200@HW.

  2. Run the following command to check the HA status:

    haStatus

    • If the OM-SRV01 node is in the active state, go to Step 3.
    • If the OM-SRV01 node is in the standby state, go to Step 1 again to log in to the OM-SRV02 node.
    Figure 3-24 HA status

  3. Run the following command to disable user logout upon system timeout:

    TMOUT=0

  1. Run the following command to back up data:

    bkManual

    After the data is backed up to a local directory, the system automatically uploads the backup files to the third-party backup server.

    The data is backed up and the backup files are uploaded to the third-party backup server if the following information is displayed:

    Manual backuping...
    Backup successfully, uploading...
    Successfully

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

    ll /pkg_repo/backup/manual -tr

    Check whether the latest backup file exists.
    • If yes, no further action is required.
    • If no, contact technical support.

Translation
Download
Updated: 2019-06-14

Document ID: EDOC1100062366

Views: 756

Downloads: 9

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