2024-12-10 01:09:02 +05:30
:_mod-docs-content-type: PROCEDURE
2025-02-24 20:06:56 +05:30
//included in backing-up-3scale-api-management-by-using-oadp.adoc assembly
2024-12-10 01:09:02 +05:30
2025-02-24 20:06:56 +05:30
[id="backing-up-the-3scale-operator-secret-apimanager_{context}"]
= Backing up the 3scale API Management operator, secret, and APIManager
2024-12-10 01:09:02 +05:30
2025-08-25 12:34:40 +05:30
[role="_abstract"]
2025-02-24 20:06:56 +05:30
You can back up the Red{nbsp}Hat 3scale API Management operator resources, and both the `Secret` and APIManager custom resource (CR).
2024-12-10 01:09:02 +05:30
.Prerequisites
* You created the Data Protection Application (DPA).
.Procedure
2025-02-24 20:06:56 +05:30
. Back up your 3scale operator CRs, such as `operatorgroup`, `namespaces`, and `subscriptions`, by creating a YAML file with the following configuration:
2024-12-10 01:09:02 +05:30
+
.Example `backup.yaml` file
+
[source,yaml]
----
apiVersion: velero.io/v1
kind: Backup
metadata:
2025-02-24 20:06:56 +05:30
name: operator-install-backup <1>
2024-12-10 01:09:02 +05:30
namespace: openshift-adp
spec:
csiSnapshotTimeout: 10m0s
defaultVolumesToFsBackup: false
includedNamespaces:
2025-02-24 20:06:56 +05:30
- threescale <2>
2024-12-10 01:09:02 +05:30
includedResources:
- operatorgroups
- subscriptions
- namespaces
itemOperationTimeout: 1h0m0s
snapshotMoveData: false
ttl: 720h0m0s
----
2025-02-24 20:06:56 +05:30
<1> The value of the `metadata.name` parameter in the backup is the same value used in the `metadata.backupName` parameter used when restoring the 3scale operator.
<2> Namespace where the 3scale operator is installed.
2024-12-10 01:09:02 +05:30
+
[NOTE]
====
You can also back up and restore `ReplicationControllers`, `Deployment`, and `Pod` objects to ensure that all manually set environments are backed up and restored. This does not affect the flow of restoration.
====
. Create a backup CR by running the following command:
+
[source,terminal]
----
$ oc create -f backup.yaml
----
2025-02-24 20:06:56 +05:30
+
.Example output
+
[source,terminal]
----
backup.velero.io/operator-install-backup created
----
2024-12-10 01:09:02 +05:30
2025-02-24 20:06:56 +05:30
. Back up the `Secret` CR by creating a YAML file with the following configuration:
2024-12-10 01:09:02 +05:30
+
.Example `backup-secret.yaml` file
+
[source,yaml]
----
apiVersion: velero.io/v1
kind: Backup
metadata:
2025-02-24 20:06:56 +05:30
name: operator-resources-secrets <1>
2024-12-10 01:09:02 +05:30
namespace: openshift-adp
spec:
csiSnapshotTimeout: 10m0s
defaultVolumesToFsBackup: false
includedNamespaces:
- threescale
includedResources:
- secrets
itemOperationTimeout: 1h0m0s
labelSelector:
matchLabels:
app: 3scale-api-management
snapshotMoveData: false
snapshotVolumes: false
ttl: 720h0m0s
----
2025-02-24 20:06:56 +05:30
<1> The value of the `metadata.name` parameter in the backup is the same value used in the `metadata.backupName` parameter used when restoring the `Secret`.
2024-12-10 01:09:02 +05:30
2025-02-24 20:06:56 +05:30
. Create the `Secret` backup CR by running the following command:
2024-12-10 01:09:02 +05:30
+
[source,terminal]
----
$ oc create -f backup-secret.yaml
----
2025-02-24 20:06:56 +05:30
+
.Example output
+
[source,terminal]
----
backup.velero.io/operator-resources-secrets created
----
2024-12-10 01:09:02 +05:30
. Back up the APIManager CR by creating a YAML file with the following configuration:
+
.Example backup-apimanager.yaml file
[source,yaml]
----
apiVersion: velero.io/v1
kind: Backup
metadata:
2025-02-24 20:06:56 +05:30
name: operator-resources-apim <1>
2024-12-10 01:09:02 +05:30
namespace: openshift-adp
spec:
csiSnapshotTimeout: 10m0s
defaultVolumesToFsBackup: false
includedNamespaces:
- threescale
includedResources:
- apimanagers
itemOperationTimeout: 1h0m0s
snapshotMoveData: false
snapshotVolumes: false
storageLocation: ts-dpa-1
ttl: 720h0m0s
volumeSnapshotLocations:
- ts-dpa-1
----
2025-02-24 20:06:56 +05:30
<1> The value of the `metadata.name` parameter in the backup is the same value used in the `metadata.backupName` parameter used when restoring the APIManager.
2024-12-10 01:09:02 +05:30
. Create the APIManager CR by running the following command:
+
[source,terminal]
----
$ oc create -f backup-apimanager.yaml
----
2025-02-24 20:06:56 +05:30
+
.Example output
+
[source,terminal]
----
backup.velero.io/operator-resources-apim created
----