Hi guys,
I hope everyone staying home and save during these difficult times. I am NEW to clould sql. I recently migrated our ON-PREM postgres databases in to Google CLOUD SQL (postgres)
Every week I have to MANUALLY export 15 tables From one postgres cloud sql instance to another. First within the Same project and then across to 6 other Projects /Environments.
This takes too long and I do not know how I can automate this.
I use pgAdmin or CLOUD Shell command line to perform these exports and imports.
STEPS
- create the exports (DATA ONLY) of all 15 tables in SOURCE
- Connect to psql client to truncate these 15 table at the TARGET
- Import tables (data only) in to TARGET
I am used to using CRONTAB and bash/SQL scripting to achieve this task on my ON-PREM databases.
HOW DO I script and automate this task in Google Cloud???
Thanks