I’m trying to setup preview environments for my pull requests. Each environment needs its own prepopulated database.
My seed database is about 15GB.
I have a process to bootstrap a MySQL image and copy the /var/lib/mysql
contents to a PVC volume (I also have this in a tarball).
I need to find a way to make new PVC which are populated with this data. To me I see a few options:
- Clone an existing PVC for my new deployment and use that
- do some backup/restore process to make a new PVC from the old
- Make a new PVC and populate it with a tarball
I'm struggling to get any of these to work on GKE. Has anyone managed to achieve the above? I can't mount in the sql file as it simply takes too long to create the database from it - I need to mount in the database files directly.
I spent some time trying to get the CSI drivers working, but it seems I can't find a reasonable how-to guide.