Services Fail After Accidental Deletion of Regional MySQL Databases

Problem

In certain cases, the MySQL database for a Self-hosted Private Cloud Director region may be accidentally deleted or corrupted. This can cause critical platform components to fail, resulting in an unusable environment and loss of region-specific data.

Environment

  • Self-Hosted Private Cloud Director Virtualization - v2025.10 and Higher
  • Component - MySQL

Cause

Accidental deletion or corruption of the MySQL database for a specific region(s).

Diagnostics

When a regional MySQL database is deleted or corrupted, symptoms may include:

  • Components failing to start or repeatedly crashing.
  • Errors related to missing tables or database connections in component/pod logs.
  • The region appearing as unreachable or inactive in the control plane UI.

To confirm database loss login to MySQL from Percona pod:

Bash
Copy

If the region databases are missing from the list, restoration from the latest backup is required.

Resolution

As part of the Self-hosted Private Cloud Director backup process, MySQL data β€” including users and permissions β€” is backed up automatically for each region [Backup guide]. To restore the database without performing a full region restore, follow the steps below:

Before proceeding with the MySQL restore process, MySQL root password needs to be retrieved from the Kubernetes secret in its corresponding region namespace using

kubectl get secret -n <REGION_NAME> mysql -o jsonpath='{.data.pass}' | base64 -d

  1. Extract the Backup

Locate the backup archive obtained from the automated or manual backup process and extract it:

Bash
Copy

Within the extracted backup, locate the MySQL dump file for the affected region mysql_dump_<REGION_NAME>.sql

For example, for the Infra region backups/mysql_dump_Infra.sql

  1. Scale Down Percona Replicas

To safely restore the database, first scale down the Percona PXC replicas for the region:

Bash
Copy
  1. Delete Existing Percona PVCs

Delete the existing PersistentVolumeClaims (PVCs) associated with the Percona MySQL pods to remove the corrupted data:

Bash
Copy
  1. Scale Up Percona Replicas

Scale the replicas back up to recreate the database with new, empty volumes:

Bash
Copy
  1. Restore the Database from Backup

Once the Percona pods are up and running, copy the regional MySQL dump into percona-db-pxc-db-pxc-0 pod:

Example
Copy

Then, restore the dump using the MySQL client:

Bash
Copy

Validation

  • Log in to the database from percona pod and confirm that the expected databases and tables are present:
Bash
Copy
  • Verify that services are running and the region is healthy:
Bash
Copy
  • Access the management plane UI and confirm normal operations , API responses, and workflows should function as expected.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard