Troubleshooting Developer Portal backup and restore on OpenShift and Cloud Pak for Integration
Review details on a failed backup or restore operation for Developer Portal backup on OpenShift and Cloud Pak for Integration.
Check the status of a backup operation
- Run the following command to a get a list of
backups:
oc get portalbackup -n <Portal_namespace>
The response looks like the following example, where only
crType: record
backups include an ID.NAME ID STATUS TYPE CR TYPE AGE COMMENT p1-bup-gqz8f 20200526.142449 Ready system record 55m p1-bup-jx4vc 20200526.142458 Ready site record 54m p1-bup-st4l2 Ready all create 56m y p1-bup-th2dm Ready all create 4h51m y
- Run the following command to view the details of a particular backup,, which is specified using
the <bup-name> from the
NAME
column in the list of backups:oc get portalbackup <bup-name> -n <Portal_namespace> -o yaml
The details of a backup look like the following example:
apiVersion: portal.apiconnect.ibm.com/v1beta1 kind: PortalBackup metadata: creationTimestamp: "2020-10-01T10:00:16Z" generateName: portal-bup- generation: 1 name: portal-bup-g66gv namespace: default resourceVersion: "8940" selfLink: /apis/portal.apiconnect.ibm.com/v1beta1/namespaces/default/portalbackups/portal-bup-g66gv uid: b1d5b295-b966-48f2-b6ef-dfcd1c499741 spec: comment: test comment portalCluster: portal crType: create siteName: installed type: site status: backupId: "" commentLeft: "y" conditions: - lastTransitionTime: "2020-10-01T10:00:18Z" reason: BackupFailed status: "False" type: Error - lastTransitionTime: "2020-10-01T10:01:19Z" message: |- 2020-10-01 10:00:18: CLI task (backup:site) starting. 2020-10-01 10:00:20: Making a backup for site conor.com 2020-10-01 10:00:27: A local backup was succesfully created: /var/aegir/backups/conor.com-20201001.100021.tar.gz 2020-10-01 10:00:30: Attempting to upload backup to remote backup server 2020-10-01 10:00:30: Uploading conor.com-20201001.100021.tar.gz to s3.eu-gb.cloud-object-storage.appdomain.cloud/eu-standard:22:cq-test/ptlcq4/ using objstore 2020-10-01 10:00:33: Site with URL conor.com (conor.com-20201001.100021.tar.gz) successfully uploaded 2020-10-01 10:00:33: All installed sites have been successfully backed up 2020-10-01 10:00:33: CLI task (backup:site) completed successfully. reason: BackupComplete status: "True" type: Ready - lastTransitionTime: "2020-10-01T10:01:19Z" reason: BackupInProgress status: "False" type: Running - lastTransitionTime: "2020-10-01T10:00:18Z" reason: BackupStatusUnknown status: "False" type: Warning fullBackupName: "" id: f8t0ux7z4zfnnjnu message: "" phase: Ready state: ""
- If the operation failed, check the associated
message
for more information.
Check the status of a restore operation
- Run the following command to get the name of the most recent restore
record:
oc get portalrestore -n <Portal_namespace>
The response looks like the following example:
NAME READY AGE portal-restore-twjrp Ready 28s
- Run the following command to view information about the restore operation; which is indicated
with the
<portal_restore_name>
shown in theNAME
column:oc get portalrestore <portal_restore_name> -n <Portal_namespace> -o yaml
The details of a failed restore operation look like the following example:
apiVersion: portal.apiconnect.ibm.com/v1beta1 kind: PortalRestore metadata: creationTimestamp: "2020-05-26T13:10:46Z" generateName: portal-restore- generation: 1 name: portal-restore-x2bf9 namespace: portal resourceVersion: "1493471" selfLink: /apis/portal.apiconnect.ibm.com/v1beta1/namespaces/portal/portalrestores/portal-restore-x2bf9 uid: 9f6a1e22-55ab-4595-8b98-bdfaec40d58c spec: type: site portalCluster: portal status: backupId: "" commentLeft: "" conditions: - lastTransitionTime: "2020-05-26T13:10:49Z" message: | Please provide a site to restore. To restore all sites use value 'all' in the CR status: Failed type: Ready fullBackupName: "" id: "" message: ""
- If the operation failed, check the associated
message
for more information.
Review the logs for additional information
Look for information in the logs of the
ibm-apiconnect
pod:- Locate the
ibm-apiconnect
pod with:oc get pods -n <Portal_namespace>
- View the logs
with:
oc logs <ibm-apiconnect-pod-NAME> -n <Portal_namespace>