- General description
- Backing up 3scale
- Restoring 3scale
- APIManagerBackup CRD reference
- APIManagerRestore CRD reference
Backup and Restore functionality of a 3scale installation is provided for 3scale installations deployed using the APIManager custom resource definition provided by the 3scale-operator.
Operator capabilities custom resources are not part of the 3scale Installation functionality and are thus not included as part of the 3scale installation Backup and Restore functionality.
To see how to back up an APIManager 3scale based installation see #Backing up 3scale
To see how to restore a previously backed up APIManager 3scale based installation using the operator backup functionality see restoring 3scale
The backup functionality of a 3scale installation deployed by an APIManager
custom resource is provided.
To see what 3scale installation configurations can be backed up see the APIManagerBackup reference. Specifically the following sections should be consulted:
To backup a 3scale installation deployed with an existing APIManager the workflow is the following one:
- Perform a backup of the 3scale external databases:
- backend-redis
- system-redis
- system database (MySQL or PostgreSQL)
- Perform a backup of the following Kubernetes secrets:
- backend-redis
- system-redis
- system-database
- Create the APIManagerBackup Custom resource in the same namespace
as where the 3scale installation managed by the APIManager object
is deployed. See the APIManagerBackup reference
to see the available fields that can be configured. An example would be:
Another example, providing a pre-existing PersistentVolume name instead:
apiVersion: apps.3scale.net/v1alpha1 kind: APIManagerBackup metadata: name: example-apimanagerbackup-pvc spec: backupDestination: persistentVolumeClaim: resources: requests: "10Gi"
apiVersion: apps.3scale.net/v1alpha1 kind: APIManagerBackup metadata: name: example-apimanagerbackup-pvc spec: backupDestination: persistentVolumeClaim: # resources specification is required but ignored when providing a volumeName as per K8s PVCs requirements behavior resources: requests: "10Gi" volumeName: "my-preexisting-persistent-volume"
- Wait until APIManagerBackup finishes. You can check this by obtaining
the content of APIManagerBackup and waiting until the
.status.completed
field is set to true. - At this point the backup has finished. The backup contents are detailed in
the APIManagerBackup reference.
Other fields in the
status
section of the APIManagerBackup show details of the backup, like the name of the PersistentVolumeClaim where the data has been backed up when the configured backup destination has been a PersistentVolumeClaim. Make sure you take note of the value ofstatus.backupPersistentVolumeClaimName
field
The restore functionality of a 3scale installation previously deployed by an APIManager
custom
resource and backed up by an APIManagerBackup
scenario is provided
To see what 3scale installation configurations can be restored see the APIManagerRestore reference. Specifically the following sections should be consulted:
To restore a 3scale installation previously deployed with an APIManager that was backed using an APIManagerBackup custom resource the workflow is the following one:
- Make sure that there is no APIManager (and its corresponding 3scale installation) custom resource created in the namespace where 3scale is to be restored
- Perform a restore of the 3scale external databases:
- backend-redis
- system-redis
- system database (MySQL or PostgreSQL)
- Perform a restore of the following Kubernetes secrets:
- backend-redis
- system-redis
- system-database
- Create the APIManagerRestore custom resource. Configuration of the APIManagerRestore
has to specify backed up data of the same installation that was backed up
by an APIManagerBackup custom resource. See the APIManagerRestore reference
to see the available fields that can be configured. An example would be:
apiVersion: apps.3scale.net/v1alpha1 kind: APIManagerRestore metadata: name: example-apimanagerrestore-pvc spec: restoreSource: persistentVolumeClaim: claimSource: claimName: example-apimanagerbackup-pvc # Name of the PVC produced as the backup result of an APIManagerBackup readOnly: true
- Wait until APIManagerRestore finishes. You can check this by obtaining
the content of APIManagerRestore and waiting until the
.status.completed
field is set to true. - At this point the restore has finished. You should see a new APIManager custom resource has been created and a 3scale installation deployed by it being deployed and eventually running.