Backup of PostgreSQL database design - without data

前端 未结 4 1698
独厮守ぢ
独厮守ぢ 2021-01-17 08:31

I have tried to find a way to backup my database design without including the data stored in the database. Actually, one might say that I want to have a file that holds all

4条回答
  •  再見小時候
    2021-01-17 09:03

    You can use this from psql(terminal):

    pg_dump -s databasename > file.dump
    

    from pg_dump documentation the "-s" dump only the object definitions (schema), not data.

    pg_dump documentation

提交回复
热议问题