cloudNativePg bootstrap from dump - Mailing list pgsql-admin

From Alessandro Dentella
Subject cloudNativePg bootstrap from dump
Date
Msg-id CAFhgWoLAh18RdnqzZuFfZ-i7Zi_Z2iUUD2CwBJKRsYzWA__t+Q@mail.gmail.com
Whole thread Raw
Responses Re: cloudNativePg bootstrap from dump
List pgsql-admin
Hi

[I'm not sure if cloudNativePg questions are suitable for this list, let me know if not...]

I'd like to bootstrap a Cluster in CNPG from a PostgreSQL dump but I'm not sure it can be done and in case how.
Docs show 3 options: 1. initdb,2.  pg_basebackup and 3. recovery
Initdb seems the correct one to me and I could just start an empty db and psql data into it.
When I do that data seem to to get in but the psql process never ends:

  kubectl cnpg psql my-db < dump.sql

As a second option I'd like to know how to bake a backup from a Postgres instance suitable for the 'recovery' option.
If I understand this options would require me to stick to the same PostgreSQL version/

If I backup a db (kubectl cnpg backup) I get a directory with data.tar.gz (the physical backup) and a JSON file that describes it. 
I guess the data are produced by pg_basebackup, bu how should I produce the json description?


sandro


pgsql-admin by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Observation with Postgres table size
Next
From: Sunil Jadhav
Date:
Subject: Re: Observation with Postgres table size