pg_dump导出数据

导出结构

/home/postgres/pgsql/bin/pg_dump -Upostgres -d if -s  --no-tablespaces  -f if_create_obj.sql

导出数据

  • copy形式
/home/postgres/pgsql/bin/pg_dump -Upostgres -d if -a  --no-tablespaces   -f if_init.sql
  • insert语句形式(通过添加–inserts选项)
/home/postgres/pgsql/bin/pg_dump -Upostgres -d if -a  --no-tablespaces  --inserts -f if_init.sql
posted @ 2019-08-01 19:12  岳麓丹枫  阅读(2517)  评论(0编辑  收藏  举报