MariaDB restore workflow¶
The OpenStack database restore workflow includes the following phases:
Restoration phase 1:
mariadb-phy-restorejob launches the
mariadb-phy-restorepod. This pod contains the main restore script, which is responsible for:
Scaling of the
Verifying of the
Managing of the
During the restoration, the database is not available for OpenStack services that means a complete outage of all OpenStack services.
During the first phase, the following actions are performed:
Save the list of
mariadb-serverpersistent volume claims (PVC).
mariadbserver StatefulSet to
0replicas. At this point, the database becomes unavailable for OpenStack services.
Restoration phase 2:
openstack-mariadb-phy-restore-runnerwith the first
mariadb-serverreplica PVC mounted to the
/var/lib/mysqlfolder and the backup PVC mounted to
openstack-mariadb-phy-restore-runnerpod performs the following actions:
Unarchives the database backup files to a temporary directory within
mariabackup --prepareon the unarchived data.
.preparedfile in the temporary directory in
Restores the backup to
Exits with 0.
The script in the
mariadb-phy-restorepod collects the logs from the
openstack-mariadb-phy-restore-runnerpod and removes the pod. Then, the script launches the next
openstack-mariadb-phy-restore-runnerpod for the next
mariadb-serverreplica PVC. The
openstack-mariadb-phy-restore-runnerpod restores the backup to
/var/lib/mysqland exits with
Step 2 is repeated for every
mariadb-serverreplica PVC sequentially.
When the last replica’s data is restored, the last
openstack-mariadb-phy-restore-runnerpod removes the
.preparedfile and the temporary folder with unachieved data from
Restoration phase 3:
mariadb-phy-restorepod scales the
mariadb-serverStatefulSet back to the configured number of replicas.
mariadb-phy-restorepod waits until all
mariadb-serverreplicas are ready.