Backup Storage Configuration

As of version 1.3.0, the PolarDB-X Operator has rolled out support for full backup restore. Before you can enable backup and restore for a cluster, you need to configure the storage method for the backup set.

You can complete the backup storage configuration in the following way.

Configuring Backup Storage

Supported Storage Methods

Currently, the supported storage methods are:

  • SFTP
  • Aliyun OSS

More storage methods will be supported in the future.

Configuring SFTP for Backup Storage

  1. Execute the following command to modify the ConfigMap:
    kubectl -n polardbx-operator-system edit configmap polardbx-hpfs-config
    
    Add your own SFTP configuration to the sinks array, as shown below:
    data:
    config.yaml: |-
     sinks:
       - name: default
         type: sftp
         host: 127.0.0.1
         port: 22
         user: admin
         password: admin
         rootPath: /backup
    
  2. After saving, run the following command to apply the configuration:
    kubectl -n polardbx-operator-system rollout restart daemonsets polardbx-hpfs
    

Explanation of configuration items:

  • name: The name of the configuration item, multiple SFTP configurations are distinguished by name.
  • type: The type of configuration item (for details refer to Supported Storage), possible values: sftp, oss.
  • host: The IP address of the backup machine.
  • port: The port number of the backup machine.
  • user: The username for the backup machine.
  • password: The password for the backup machine.
  • rootPath: The root directory where the backup sets are stored.

Configuring Alibaba Cloud OSS for Backup Storage

  1. Execute the following command to modify the ConfigMap:
    kubectl -n polardbx-operator-system edit configmap polardbx-hpfs-config
    
    Add your own OSS configuration to the sinks array,
    data:
    config.yaml: |-
     sinks:
       - name: default
         type: oss
         endpoint: endpoint
         accessKey: ak
         accessSecret: sk
         bucket: bucket
    
  2. After saving, run the following command to apply the configuration:

    kubectl -n polardbx-operator-system rollout restart daemonsets polardbx-hpfs
    

    Explanation of configuration items:

  3. name: The name of the configuration item, multiple OSS configurations are distinguished by name.

  4. type: The type of configuration item (for details refer to Supported Storage), possible values: sftp, oss.
  5. endpoint: The domain name for OSS access.
  6. accessKey: The access ID for OSS.
  7. accessSecret: The access secret for OSS.
  8. bucket: The OSS bucket.

For more information, please refer to: [OSS Product Documentation] (https://help.aliyun.com/document_detail/31827.html)

Notes

  • Sinks can be configured with multiple storage types, and it is permissible for different types of configurations to have the same name; each storage type also supports multiple configuration sets, but names must not be repeated within the same type.
  • The operator can run normally without a configured storage, but to use backup and restore functionalities, you must add the corresponding storage configuration.

results matching ""

    No results matching ""