Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1.16 KB

readme.md

File metadata and controls

23 lines (17 loc) · 1.16 KB

Periodic MySQL db backup export to bucket

Minimalistic code to create a database and provision GCP native resources sufficient to periodically export database backups to a bucket. Further information on this repository can be found in the article GCP - Periodic export of MySQL backups to a bucket with Terraform

Directory contents

main.tf

Terraform code to provison the infra structure required for demonstration:

  • vanilla MySQL database
  • GCP App engine application
  • bucket for backups and Cloud Function source code
  • zip archive of Cloud Function source code
  • Cloud Function to invoke the MySQL REST API
  • Cloud Scheduler to periodically invoke the Cloud Function

test.tfvars

Contains the GCP project id in which the resources are to be provisioned

/app/export_database.js

NodeJS code to invoke the MySQL REST API endpoint to export a database backup to a bucket

/app/package.json

Package file used by Cloud Functions to determine dependencies