CNE GCP Ready: Configuring the Cloud Native Experience

CNE GCP Ready: Incremental Backup and Restore

Cloud Native Experience (CNE) GCP Ready supports automated backups and restores using Argo Workflows, Cloud SQL backups, and Cloud Storage. Backups are disabled by default and must be configured for your environment.

Enabling Incremental Backups

Configure backup settings in your infrastructure.yaml file:

backup:
  enabled: true
  region: ""
  retentionDays: 30
  storageClass: NEARLINE
  schedule: "0 5 * * *"
  cleanup:
    schedule: "0 2 * * *"
ValueDescription
backup.enabledEnables backups when set to true.
backup.regionCloud Storage region for the backup vault bucket. An empty value inherits the environment region.
backup.retentionDaysNumber of days backups are retained before cleanup.
backup.storageClassCloud Storage class for the backup vault bucket.
backup.scheduleCron expression for automatic backup creation.
backup.cleanup.scheduleCron expression for automatic backup cleanup.

Backups include

  • Cloud SQL database snapshots
  • Document library bucket data

Backup data is stored in a dedicated Cloud Storage vault bucket.

Verify the configuration:

kubectl get liferayinfrastructure -n <namespace> \
   -o jsonpath='{.items[0].spec.backup}{"\n"}'

kubectl get cronworkflow -n <namespace>

Automatic Backup Creation

Automatic backups run according to backup.schedule. By default, backups run daily.

After Argo CD synchronizes the configuration, the environment includes scheduled backup and cleanup workflows.

To list scheduled workflows:

kubectl get cronworkflow -n <namespace>

To list backups created by the scheduler:

kubectl get liferaybackup -n <namespace>

Manual Backup Creation

You can also create backups on demand using the Argo workflow template.

Submit a backup workflow:

argo submit \
   --from clusterworkflowtemplate/backup-create-cluster-workflow-template \
   -n <namespace> \
   --watch

After the workflow completes, verify the backup:

kubectl get liferaybackup -n <namespace>

Restoring Incremental Backups

Warning

Restore operations replace the active environment data with the selected backup. The previous data plane is removed after the restore completes successfully.

Confirm these prerequisites before starting a restore:

  • Ensure at least one successful backup exists.

  • Confirm the target environment is healthy.

Verify a backup completed successfully:

kubectl get liferaybackup <backup-name> -n <namespace> \
   -o jsonpath='{.status.conditions[?(@.type=="Succeeded")]}'

Accessing Argo Workflows

The Argo Workflows server does not expose a public endpoint by default.

  1. Enable port forwarding:

    kubectl port-forward \
       -n argo-workflows-system \
       svc/argo-workflows-server \
       2746:2746
    
  2. Open your browser at:

    https://localhost:2746
    

Running a Restore

Submit a restore workflow using the backup name:

argo submit \
   --from clusterworkflowtemplate/backup-restore-cluster-workflow-template \
   -n <namespace> \
   -p liferay-backup-name=<backup-name> \
   --watch

Example:

argo submit \
   --from clusterworkflowtemplate/backup-restore-cluster-workflow-template \
   -n liferay-project-dev \
   -p liferay-backup-name=liferay-backup-xkprh \
   --watch

Restore from a backup in another namespace:

argo submit \
   --from clusterworkflowtemplate/backup-restore-cluster-workflow-template \
   -n liferay-project-staging \
   -p liferay-backup-name=liferay-backup-xkprh \
   -p liferay-backup-namespace=liferay-project-prod \
   --watch

During restore, the platform provisions a new inactive data plane, restores the backup into it, switches traffic to the restored environment, and removes the previous active data plane after completion.

If the restore fails before completion, the workflow rolls back to the previous active data plane automatically.

Optional Restore Configuration

Default restore settings work without additional configuration.

To customize restore behavior, edit liferay/system/infrastructure-provider.yaml.

Example:

liferay-subchart-backup-restore:
  liferayInfrastructure:
    waitTimeoutSeconds: 7200

Monitoring Backup and Restore Workflows

Monitor restore progress and workflow resources:

argo watch -n <namespace> @latest

kubectl get workflows -n <namespace>

kubectl get liferaybackup -n <namespace>

kubectl get liferayinfrastructure -n <namespace> -w \
   -o jsonpath='{.items[0].spec.restorePhase}{"\n"}'

Automatic cleanup removes expired backups according to backup.retentionDays and backup.cleanup.schedule.