Principal steps

Below is a high-level deployment plan for the wordpress migration/swap steps, detailing the overall workflow and commands.

  1. Export the MySQL database from the old (Scaleway) cluster.
  2. Transfer and import it into the new database.
  3. Move the WordPress files (wp-content and wp-config.php) from the old cluster to the new cluster.
  4. Migrate DNS & Run terraform apply to finalize updates (certificates, helm deployments, etc.).

Example of detailed step for a previous project

Detailed Steps

Step 1: Database Dump and Transfer

  1. Dump and Compress the Database on Scaleway Cluster

From the temporary MySQL pod in the Scaleway prod cluster (temp-ns-for-db-dump namespace):

KUBECONFIG=scaleway-kubeconfig-caats.yaml kubectl -n caats exec -it caats-wordpress-5d6467dfdd-68kqz -- sh
cd /tmp
mysqldump -h 192.168.0.17 -u caats-mysql-wordpress -p'2JdxXPiDJLmg!UzTkncc9o@QrpaR_Ys2W2o' wordpress | gzip > wordpress.sql.gz
  1. Copy the Compressed Dump to Local Machine

From your local machine or AWS Console (using appropriate KUBECONFIG for Scaleway):

KUBECONFIG=scaleway-kubeconfig-caats.yaml kubectl -n caats cp caats-wordpress-5d6467dfdd-68kqz:/tmp/wordpress.sql.gz ./wordpress.sql.gz
  1. Copy the Compressed Dump from Local to AWS Temporary MySQL Pod

Using the AWS cluster kubeconfig and the temporary MySQL pod (temp-debug-pod in caats ns):

kubectl -n temp-ns-for-db-restore cp wordpress.sql.gz mysql:/tmp/wordpress.sql.gz