문제

I have a pretty big db in the terms of amount of different db object, not the size. I want to backup it (its structure, scheme). Preferably, I'd like to get the sql code. Of course, I can navigate to each its object and just get it but, as I said, there are a lot of them.

How do I do this easily?

도움이 되었습니까?

해결책

You can use pg_dump --schema-only --format=plain > dump_file.sql to dump your schema (db objects without data) into a sql file.

Details here: pg_dump.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top