首页 > 代码库 > Postgresql 技巧

Postgresql 技巧

备份

pg_dump -f "F:/dump.sql"<file name> -U postgres<database name> -h 10.38.197.120<host name> -p 5432<host port> -O<without owner>

 

恢复

psql -f "F:/dump.sql"<file name> -U postgres<database name> -h <host name> -p 5432<host port>