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
  • MinIO

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, s3.
  • 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, s3.
  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

Configuring MinIO 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 MinIO configuration to the sinks array,
    data:
    config.yaml: |-
     sinks:
       - name: default
         type: s3
         endpoint: endpoint
         accessKey: ak
         accessSecret: sk
         bucket: bucket
         useSSL: false
    
  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 MinIO configurations are distinguished by name.

  4. type: The type of configuration item (for details refer to Supported Storage), possible values: sftp, oss, s3.
  5. endpoint: The domain name for MinIO access (the domain name is in the form: {domain name}:{S3 API port (default is 9000)}, such as play.min.io:9000).
  6. accessKey: The access ID for MinIO.
  7. accessSecret: The access secret for MinIO.
  8. bucket: The MinIO bucket.
  9. useSSL: Whether to access MinIO through https mode (true means https mode, false means http mode)

For more information, please refer to: OSS Product Documentation

3.Quick Start

The MinIO official website offers the MinIO's Play test platform for testing HTTPS access. Refer to the MinIO product documentation), after creating a user in the console, you can test the backup based on HTTPS access using the following configuration:

data:
  config.yaml: |-
    sinks:
      - name: default
        type: s3
        endpoint: play.min.io:9000
        accessKey: ak
        accessSecret: sk
        bucket: bucket
        useSSL: true

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 ""