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).
Backup by Category

Backup by Category

During backup SWR, perform all backup operations specified in this chapter.

Gauss Backup Guide

This section describes the overall backup policy of Gauss databases.

Backup Mode
  • Automatic and manual backup modes are supported.
  • Backing up Gauss databases are supported.
  • The system time cannot be changed. Otherwise, the path for saving backup data is incorrect or data backup fails.
  • The Compatibility View feature of Internet Explorer 10 is not supported. Only the Standard View feature is supported.
Default Situation
  • The service deployment system provides a backup policy named default. If scheduled backup is not enabled, this policy can be modified only, rather than being deleted.
  • Each database instance is attached with the default backup policy.
  • If the scheduled backup is not enabled for backup policies, all database instances will not be automatically backed up.
  • Backup policies attached to database instances must not be deleted.
  • If a remote backup policy is used, when the number of backup files exceeds the threshold (the default value is 7), the earliest backup file are deleted and only two latest local backup files are retained.
Automatic Backup Interval
  • The automatic backup period can be set daily, weekly, or monthly.
  • If the backup period is set to daily and physical backup is implemented, full backup is performed once a day.
Save Path of Backup Files
  • Back up to the local server: By default, backup files are saved to the /opt/pub/backup_local directory on the server where the database instance is deployed. (If the directory does not exist, manually create the directory and set the owner of the directory to dbuser:dbgroup and permission on the directory to 750.) The owner of the backup files is dbuser:dbgroup.
    NOTE:
    • If the replication status of master and standby instances is normal and standby instances are backed up to the local server by default, backup files are stored to the server where standby instances reside by default. If the replication status of standby instances is abnormal, backup files are stored to the server where master instances reside.
    • You are advised to back up files to remote servers. Back up files to local servers only when remote servers are unavailable during emergency situations.
  • Back up to the remote server: Backup files are saved to the directory of the remote server based on configured backup policies.
Security of Backup Data
  • After data backup, an abstract file is generated for data consistency check.
  • The owner of local backup files is dbuser:dbgroup, and the owner of remote backup files is a user of the SFTP service.
  • Backup data can be transmitted using SFTP. When SFTP is used, ensure that an independent SFTP account is used to transmit data.
  • If backup files stored on the SFTP server need to be deleted due to reasons such as insufficient storage space, they should be manually deleted by O&M personnel. The deletion of earlier data is recommended.
Database Backup

This section describes how to back up databases.

Procedure
  • If backup policies are configured with the same backup server and directory in the system, you are not allowed to back up the same instance by using the backup policies. Otherwise, the backup history list is affected.
  1. Use a browser to log in to the FusionStage OM zone console.

    1. Log in to ManageOne Maintenance Portal.
      • Login address: https://Address for accessing the homepage of ManageOne Maintenance Portal:31943, for example, https://oc.type.com:31943.
      • The default username is admin, and the default password is Huawei12#$.
    2. On the O&M Maps page, click the FusionStage link under Quick Links to go to the FusionStage OM zone console.

  2. Choose Application Development > Database > Backup Policy from the main menu.
  3. Click in the Operation column for the default backup policy. You can also create a backup policy and bind it to the target database instance.
  4. On the displayed page, set the following parameters:

    1. Enable the scheduled backup by toggling Scheduled Backup to On.
    2. Select physical from the Backup mode drop-down list.
    3. Set Incremental backup period to 0. That is, full backup (instead of incremental backup) is performed.
      NOTE:

      When incremental backup is selected, only changed database instances are backed up on the basis of full backup.

    4. Set Start time to 00:00 the next day. This time is container time. For details, see How Do I Query the Container Time.
    5. Set Backup period to 1 day.

  5. Select Back up to remote server for Backup Path and set the basic information of the server by configuring the displayed parameters. The remote server should be provided by the user. For description about the parameters, see Table 1-21

    1. You are advised to manually create the backup directory /opt/bak/backup_remote, set the permission on the directory to 750, owner to dbbackup, and owner group to dbgroup.

      The following commands are manually created:

      mkdir -p /opt/bak/backup_remote/

      chown -R dbbackup:dbgroup /opt/bak/backup_remote

      find /opt/bak/backup_remote/ -type d | xargs chmod 750

    2. Run the following commands to set the owner of the /opt/bak directory to dbbackup, the owner group to ossgroup, and the permission on the directory to 750:

      chown dbbackup:dbgroup /opt/bak

      chmod 750 /opt/bak

    3. After the parameters are set, click Check to check the validity of the remote backup server parameters.
      Table 1-21 The remote server should be provided by the user.

      Remote Connection Protocol

      Parameter Description

      Remarks

      SFTP

      • Server IP address: indicates the IP address of a server where the SFTP service is enabled.
      • Protocol and port: indicates the SFTP and the corresponding port.
      • User name: indicates the user name of the SFTP service. This document uses the SFTP service user dbbackup and user group dbgroup as an example.
      • Password: indicates the password of the SFTP service user name.
      • Remote backup path: indicates the path whose owner is the user of the SFTP service. The permission on the path is 750.

      The system supports only SFTP uploading and downloading. SFTP configurations, such as SFTP server building, are ensured by users.

      NOTE:

      Ensure that the SFTP server can ping the IP address of the management nodes (master nodes) in the management zone and data zone.

  6. Click OK.
  7. Modify the backup policy of the database instance that does not need to be Scheduled backed up.

    By default, database instances are bound to the default backup policy. Therefore, you need to unbind the database instance that does not need to be backed up from the default backup policy. However, a database instance must be bound to a backup policy at least. Therefore, before unbinding the database instance from the default backup policy, create the non-scheduled remote backup policy offpolicy, and then bind the database instance to the offpolicy backup policy.

    NOTE:

    For example, database instance monitordbsvr-node IP-database id (monitordbsvr-10_109_189_44-24) does not need to be backed up. In this instance name, node IP indicates the IP address of the node where the database instance resides; database id indicates the ID of the database instance.

    1. Choose Application Development > Database > Backup Policy from the main menu.
    2. On the right side of the navigation bar, click Add.
    3. Create the offpolicy backup policy.
      1. Enable the scheduled backup by toggling Scheduled Backup to On.
      2. Select physical from the Backup mode drop-down list.
      3. Select Back up to remote server for Backup Path.
      4. Click OK.
    4. Choose Application Development > Database > RDBMS from the main menu.
    5. Select the database instances that do not need to be backed up, for example, database instances whose name starts with monitordbsvr.
    6. Click Modify Backup Policy.
    7. In the displayed dialog box, deselect the default backup policy and select the offpolicy backup policy.
    8. Click OK.

Checking the Backup Result

You can check backup execution results on the Backup History page.

Procedure
  1. Use a browser to log in to the FusionStage OM zone console.

    1. Log in to ManageOne Maintenance Portal.
      • Login address: https://Address for accessing the homepage of ManageOne Maintenance Portal:31943, for example, https://oc.type.com:31943.
      • The default username is admin, and the default password is Huawei12#$.
    2. On the O&M Maps page, click the FusionStage link under Quick Links to go to the FusionStage OM zone console.

  2. Choose Application Development > Database > Backup List from the main menu.
  3. On the Backup List page, view the database backup result.

    NOTE:
    • Success: indicates that the database backup is successful.
    • Failure: indicates that the database backup fails.

Backing Up Redis

Only persisted Redis instances, that is, Redis data of Febs, need to be logically backed up in a manual manner. This section describes how to back up Febs instances.

Context

Redis instances of Febs need to be backed up in a manual manner.

Procedure
  1. Use PuTTY to log in to the manage_lb1_ip node.

    The default username is paas, and the default password is QAZ2wsx@123!.

  2. Run the following command and enter the password of the root user to switch to the root user:

    su - root

    Default password: QAZ2wsx@123!

  3. Run the following command to query the node where the datamgmtservice service is deployed:

    kubectl get pod -nfst-manage -oyaml `kubectl get pod -nfst-manage | grep datamgmtservice | awk '{print $1}'` | grep hostIP

  4. Use PuTTY to log in to the node queried in Step 3 as the paas user.

    The default username is paas, and the default password is QAZ2wsx@123!.

  5. Run following commands to back up the Febs instance (febsdb-10_8_41_73-7@10_8_41_66-7 is used as an example to show how to back up a Febs instance):

    cd /opt/paas/oss/manager/apps/DBAgent/bin

    ./dbsvc_adm -cmd backup-db-instance -instid febsdb-10_8_41_73-7@10_8_41_66-7 -method logical -name default

    In the preceding command, default indicates the default local backup policy. If remote backup is used, change default to the name of the mapping remote policy.

  6. Log in to the standby server where the database instance resides as the paas user and view backup files.

    NOTE:
    • If the default local backup policy is used and Febs is a single instance, log in to the database node where the Febs instance resides as the paas user. The backup path is /opt/pub/backup_local.
    • If the default local backup policy is used and Febs is a dual instance, log in to the database node where the standby Febs instance resides as the paas user. The backup path is /opt/pub/backup_local.
    • If the remote backup policy is used, query files on the remote backup server. You can view the backup path based on the path configured in the backup policy.

Backing Up the Software Repository

Precaution
  • Before backup, make sure that disk space is sufficient.
  • To avoid the inconsistency between the data you hope to obtain and the data obtained after the backup, stop uploading data to the software repository before performing the backup.
  • Data in the tenant management zone increases as users constantly upload data. Ensure that the free space of the backup directory, such as /tmp, is greater than the space of the data directory /var/paas/dockyard of the node where the SWR service is deployed
Backup Policy

If the software repository needs to be backed up, perform a full backup in off-peak hours based on the backup policy.

Methods for Backing Up a Cluster

Backing Up Data on the Tenant Zone

  1. Use PuTTY to log in to the manage_lb1_ip node.

    The default username is paas, and the default password is QAZ2wsx@123!.

  2. Run the following command and enter the password of the root user to switch to the root user:

    su - root

    Default password: QAZ2wsx@123!

  3. Run the following command to query the node where swr resides on the tenant zone:

    kubectl describe node $(kubectl get pod -n fst-manage -owide|grep swr-api-server | awk '{print $7}') -n fst-manage|grep IP

    Information similar to the following is displayed:

                        kubernetes.io/kubelet.common.envs=HOSTING_SERVER_IP=192.168.177.140
      InternalIP:  192.168.177.140
      DataIP:      192.168.177.140
                        kubernetes.io/kubelet.common.envs=HOSTING_SERVER_IP=192.168.177.196
      InternalIP:  192.168.177.196
      DataIP:      192.168.177.196
                        kubernetes.io/kubelet.common.envs=HOSTING_SERVER_IP=192.168.177.110
      InternalIP:  192.168.177.110
      DataIP:      192.168.177.110

  4. Log in as the paas user to the node you queried in Step 3 and run the following command to back up data under the /var/paas/dockyard/ directory (Assume that the data will be backed up to the /opt/dockyard directory.):

    • Local backup

      su root

      mkdir /opt/dockyard

      cp -r /var/paas/dockyard/* /opt/dockyard

    • Remote backup

      su root

      scp -r /var/paas/dockyard/* Name of the SFTP server user@SFTP server address:/SFTPserver backup directory/Name of the node where the SWR service is deployed/

      An example command is scp -r /var/paas/dockyard/* sftpuser@10.118.38.35:/opt/dockyard/manage-swr-22a5deec-7653-xqgll/.

    Ensure that all nodes where the preceding directories are located have sufficient space for storing backup files.

Translation
Download
Updated: 2019-06-14

Document ID: EDOC1100062366

Views: 763

Downloads: 9

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