Restoring Redshift Schema (only schema no data)form Prod cluster to non-prod cluster

0

Is there a way to restore Redshift Schema (only schema no data) form Prod cluster to non-prod cluster ? Snapshots would restore both but our requirement is to only restore the schema.

질문됨 2년 전992회 조회
1개 답변
0

Hi Sarbajit,

This is what I found as per AWS Whitepaper. https://docs.aws.amazon.com/cli/latest/reference/redshift/restore-table-from-cluster-snapshot.html **--source-schema-name (string)

The name of the source schema that contains the table to restore from. If you do not specify a SourceSchemaName value, the default is public .**

As well you can view the of all schemas on available on Redshift, via querying the PG_NAMESPACE. I'm assuming its must be postgres. So PostgreSQL queries must work here. select *from pg_namespace. https://docs.aws.amazon.com/redshift/latest/dg/r_Schemas_and_tables.html

Conclusion: As per the above docs, it seems you need to backup your existing schema(may be snapshot) but while restoring you have to target the schema only.

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠