5.22.3. Restoring 3scale API Management by using OADP


Restore Red Hat 3scale API Management components by restoring the backed up 3scale operator resources, MySQL database, and Redis database. This helps you to recover your 3scale deployment and resume API management services.

After the data has been restored, you can scale up the 3scale operator and deployment.

5.22.3.1. Restoring the 3scale API Management operator, secrets, and APIManager

Restore the Red Hat 3scale API Management operator resources, including the Secret and APIManager custom resources (CRs). This helps you to recover your 3scale operator configuration on the same or a different cluster.

Prerequisites

  • You backed up the 3scale operator.
  • You backed up the MySQL and Redis databases.
  • You are restoring the database on the same cluster, where it was backed up.

    If you are restoring the operator to a different cluster that you backed up from, install and configure OADP with nodeAgent enabled on the destination cluster. Ensure that the OADP configuration is same as it was on the source cluster.

Procedure

  1. Delete the 3scale operator custom resource definitions (CRDs) along with the threescale namespace by running the following command:

    $ oc delete project threescale
    "threescale" project deleted successfully
  2. Create a YAML file with the following configuration to restore the 3scale operator:

    apiVersion: velero.io/v1
    kind: Restore
    metadata:
      name: operator-installation-restore
      namespace: openshift-adp
    spec:
      backupName: operator-install-backup
      excludedResources:
      - nodes
      - events
      - events.events.k8s.io
      - backups.velero.io
      - restores.velero.io
      - resticrepositories.velero.io
      - csinodes.storage.k8s.io
      - volumeattachments.storage.k8s.io
      - backuprepositories.velero.io
      itemOperationTimeout: 4h0m0s

    where:

    operator-install-backup
    Specifies the name of the backup to restore the 3scale operator.
  3. Restore the 3scale operator by running the following command:

    $ oc create -f restore.yaml
    restore.velerio.io/operator-installation-restore created
  4. Manually create the s3-credentials Secret object by running the following command:

    $ oc apply -f - <<EOF
    ---
    apiVersion: v1
    kind: Secret
    metadata:
          name: s3-credentials
          namespace: threescale
    stringData:
      AWS_ACCESS_KEY_ID: <ID_123456>
      AWS_SECRET_ACCESS_KEY: <ID_98765544>
      AWS_BUCKET: <mybucket.example.com>
      AWS_REGION: <us-east-1>
    type: Opaque
    EOF

    where:

    <AWS_ACCESS_KEY_ID>
    Specifies your AWS credentials ID.
    <AWS_SECRET_ACCESS_KEY>
    Specifies your AWS credentials KEY.
    <mybucket.example.com>
    Specifies your target bucket name.
    <us-east-1>
    Specifies the AWS region of your bucket.
  5. Scale down the 3scale operator by running the following command:

    $ oc scale deployment threescale-operator-controller-manager-v2 --replicas=0 -n threescale
    deployment.apps/threescale-operator-controller-manager-v2 scaled
  6. Create a YAML file with the following configuration to restore the Secret:

    apiVersion: velero.io/v1
    kind: Restore
    metadata:
      name: operator-resources-secrets
      namespace: openshift-adp
    spec:
      backupName: operator-resources-secrets
      excludedResources:
      - nodes
      - events
      - events.events.k8s.io
      - backups.velero.io
      - restores.velero.io
      - resticrepositories.velero.io
      - csinodes.storage.k8s.io
      - volumeattachments.storage.k8s.io
      - backuprepositories.velero.io
      itemOperationTimeout: 4h0m0s

    where:

    operator-resources-secrets
    Specifies the name of the backup to restore the Secret.
  7. Restore the Secret by running the following command:

    $ oc create -f restore-secrets.yaml
    restore.velerio.io/operator-resources-secrets created
  8. Create a YAML file with the following configuration to restore APIManager:

    Example restore-apimanager.yaml file

    apiVersion: velero.io/v1
    kind: Restore
    metadata:
      name: operator-resources-apim
      namespace: openshift-adp
    spec:
      backupName: operator-resources-apim
      excludedResources:
      - nodes
      - events
      - events.events.k8s.io
      - backups.velero.io
      - restores.velero.io
      - resticrepositories.velero.io
      - csinodes.storage.k8s.io
      - volumeattachments.storage.k8s.io
      - backuprepositories.velero.io
      itemOperationTimeout: 4h0m0s

    where:

    operator-resources-apim
    Specifies the name of the backup to restore the APIManager.
    excludedResources
    Specifies the resources that you do not want to restore.
  9. Restore the APIManager by running the following command:

    $ oc create -f restore-apimanager.yaml
    restore.velerio.io/operator-resources-apim created
  10. Scale up the 3scale operator by running the following command:

    $ oc scale deployment threescale-operator-controller-manager-v2 --replicas=1 -n threescale
    deployment.apps/threescale-operator-controller-manager-v2 scaled
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동