1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/backing-up-the-3scale-operator-secret-apimanager.adoc

144 lines
3.5 KiB
Plaintext
Raw Normal View History

:_mod-docs-content-type: PROCEDURE
//included in backing-up-3scale-api-management-by-using-oadp.adoc assembly
[id="backing-up-the-3scale-operator-secret-apimanager_{context}"]
= Backing up the 3scale API Management operator, secret, and APIManager
[role="_abstract"]
You can back up the Red{nbsp}Hat 3scale API Management operator resources, and both the `Secret` and APIManager custom resource (CR).
.Prerequisites
* You created the Data Protection Application (DPA).
.Procedure
. Back up your 3scale operator CRs, such as `operatorgroup`, `namespaces`, and `subscriptions`, by creating a YAML file with the following configuration:
+
.Example `backup.yaml` file
+
[source,yaml]
----
apiVersion: velero.io/v1
kind: Backup
metadata:
name: operator-install-backup <1>
namespace: openshift-adp
spec:
csiSnapshotTimeout: 10m0s
defaultVolumesToFsBackup: false
includedNamespaces:
- threescale <2>
includedResources:
- operatorgroups
- subscriptions
- namespaces
itemOperationTimeout: 1h0m0s
snapshotMoveData: false
ttl: 720h0m0s
----
<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.
+
[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
----
+
.Example output
+
[source,terminal]
----
backup.velero.io/operator-install-backup created
----
. Back up the `Secret` CR by creating a YAML file with the following configuration:
+
.Example `backup-secret.yaml` file
+
[source,yaml]
----
apiVersion: velero.io/v1
kind: Backup
metadata:
name: operator-resources-secrets <1>
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
----
<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`.
. Create the `Secret` backup CR by running the following command:
+
[source,terminal]
----
$ oc create -f backup-secret.yaml
----
+
.Example output
+
[source,terminal]
----
backup.velero.io/operator-resources-secrets created
----
. 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:
name: operator-resources-apim <1>
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
----
<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.
. Create the APIManager CR by running the following command:
+
[source,terminal]
----
$ oc create -f backup-apimanager.yaml
----
+
.Example output
+
[source,terminal]
----
backup.velero.io/operator-resources-apim created
----