You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
obsidian-sync/work常用/PG12 导入导出sql文件.md

272 B

导出:
export PGPASSWORD=密码 && /opt/pgsql/bin/pg_dump -U 业务用户名 -d 库名 -h 127.0.0.1 --port=端口 -w > bak.sql

导入:
export PGPASSWORD=密码 && /opt/pgsql/bin/psql -U 业务用户名 -d 库名 -h 127.0.0.1 --port=端口 -w  -f  bak.sql