Back up data and essential deployment information so that you can use it to recover your
deployment after a disaster.
Before you begin
Perform a backup of the Management
subsystem.
Important: Backups of the Management and Portal subsystems must be performed in
sequence, and close together in time, to ensure that the Portal sites are consistent with Management
database.
About this task
Make sure to store all backups and deployment information to a secure location where you can
access it after a disaster. You cannot recover a deployment without the information that you collect
during this task.
Important: If you update any of your subsystem CRs or secrets,
ensure that you take new backups of them.
Procedure
-
Save the ID of the Portal subsystem.
If your original CR name
was 10 characters or longer, you must add the
originalUID
(Version 10.0.3 or later) or metadata.uid
(Version
10.0.2 or earlier) value from the original Portal subsystem into the appropriate section of the
installation CR during the recovery process.
When you deployed API Connect using the top-level APIConnectCluster CR, the deployment settings
were added to subsystem-specific CRs that are managed by the top-level CR. When you recover the
Portal subsystem after a disaster, you can locate the subsystem's ID in the saved copy of the Portal
subsystem CR.
-
Find the API Connect cluster's name by running the following command and looking for the value
in the NAME column:
oc get APIConnectCluster
The response looks like the following example:
NAME READY STATUS VERSION RECONCILED VERSION AGE
apic-cluster-name 7/7 Running 10.0.3 10.0.3-149 6d4h
-
Get the YAML that describes the Portal subsystem CR and save it in a file using the following
command:
oc get ptl apic-cluster-name-ptl -o yaml > apic-cluster-name-ptl.yaml
-
Back up the Developer Portal database encryption secret.
-
Run the following command to get the name of the encryption secret:
oc get ptl -n <APIC-namespace> -o yaml | grep encryption
The output of this command shows the name of the secret that is storing the database encryption
key, for example:
encryptionSecret: portal-enc-key
-
Run the following command to save a local copy of the secret as a YAML file:
oc get secret portal-enc-key -n <APIC-namespace> -o yaml > portal-enc-key.yaml
-
Back up the Portal endpoint definitions.
Save the information to a file because you must use the same names in the recovered
deployment.
-
Get the
portalAdminEndpoint
definition by running the following command:
oc get route | grep portal-director | awk '{print $2}'
The response looks like the following example:
dr-ptl-portal-director-apic.apps.vlxocp-1556.cp.fyre.ibm.com
-
Get the
portalUIEndpoint
definition by running the following command:
oc get route | grep portal-web | awk '{print $2}'
The response looks like the following example:
dr-ptl-portal-web-apic.apps.vlxocp-1556.cp.fyre.ibm.com
-
Back up the Portal subsystem database.
-
Configure the Portal subsystem for
backups.
-
Perform a backup of the Portal
subsystem.
Note: Make sure that you set the property type: all
when you backup the Portal
database, to ensure that you capture data for the Portal subsystem and all Portal sites.
-
Get the name of the newest Portal backup and save it for reference during a recovery.
Run the following command to list the Portal backups:
oc get portalbackup -n <APIC-namespace>
The response looks like the following example; the newest backup is the one with the smallest
AGE
:
NAME ID TASK ID STATUS TYPE CR TYPE CLUSTER AGE COMMENT
portal-manual-bup-9lghk n/a p5rkbbpyejrbqjab Ready all create production-ptl 15h test comment
portal-manual-bup-jqbdm n/a cn8frkey1vgbls2u Ready all create production-ptl 15h test comment
-
Copy all of the information that you saved to a secure location.