Sunday, March 29, 2020

[google-cloud-sql-discuss] AUTOMATING Export and Import Of tables For CLOUD SQL postgresql database


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

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/49226808-c486-42dd-be66-2407c14fa07b%40googlegroups.com.

No comments:

Post a Comment