I'm working on multi-tenant system in which I need to work on different tenats. in some cases I need to create new schema which contains some tables and default data. for that I just want to duplicate or copy public schema with diff. name Is there any way to duplicate or copy it. I did work around on this problem but I want a solution to copy schema not to create schema and regenrate table and data
Asked
Active
Viewed 131 times
0
-
Possible duplicate of [Copy schema and create new schema with different name in the same data base](https://stackoverflow.com/questions/2370614/copy-schema-and-create-new-schema-with-different-name-in-the-same-data-base) – May 07 '19 at 19:36
1 Answers
0
Take a back up of the schema you want along with the data In a plain text SQL file using pgadmin. And then create new schema and execute the SQL file under the new schema.

Kaja Hussain
- 76
- 5