1

I'm currently experimenting with Googles Cloud SQL and I'm facing the following problem:

Goal

I want to download a base-backup and after that the upcoming WAL-files to implement on-prem failover strategies for my Cloud-SQL hosted PostgreSQL database.

What I've tried & what went wrong

The commands pg_dump and pg_dumpall worked fine after some edits, but I can't get the pg_basebackup command to deliver files.

I'm receiving the following error:

pg_basebackup: could not connect to server: FATAL:  no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL off

Thoughts

It seems to me that Google doesn't allow doing "Continous Archiving" on my own, which would be fatal for on-prem failover strategies and would explicitly force me to use Google Cloud SQL's archiving methods.

Question

Does anyone use PITR techniques on their Cloud SQL Postgres instances and has a workaround for this?

torblerone
  • 163
  • 1
  • 1
  • 10
  • 1
    You replication protocol outside Googles Cloud SQL is forbidden by google. You basically cannot use `pg_basebackup`. – Sahap Asci Mar 24 '20 at 13:04
  • @SahapAsci So the only way for on-prem backups from Cloud SQL hosted postgres databases is with `pg_dump` and `pg_dumpall`? – torblerone Mar 24 '20 at 13:07
  • AFAIK there is no PITR feature implemented yet. Check [Cloud SQL for PostgreSQL features](https://cloud.google.com/sql/docs/postgres/features) and [Overview of backups](https://cloud.google.com/sql/docs/postgres/backup-recovery/backups) – Sahap Asci Mar 24 '20 at 13:16
  • I afraid @SahapAsci might be right, although I wasn't able to find any doc about it... BTW Can I ask how do connect to postgre on cloud SQL? – vitooh Mar 24 '20 at 16:42
  • @vitooh There are different options connecting to your Cloud SQL postgres, consider reading the official Documentation [of Google Cloud SQL](https://cloud.google.com/sql/docs/postgres/how-to#connecting-to-instances). – torblerone Mar 26 '20 at 14:27
  • 1
    On Google docs https://cloud.google.com/sql/docs/postgres/features#features_not_yet_available there is information that PITR is "not yet" available. There is no information about exact timing, but anyway it should be available soon – vitooh Apr 21 '20 at 07:10

0 Answers0