標註:dmp文件導入,場景:多個schema導入sql
postgres集羣master節點上,postgres用戶執行如下操做數據庫
cd ~ scp -rp file1:實際路徑 ./ chown postgres:postgres filename
1.用 postgres 用戶 登陸postgres集羣master數據庫 : 命令:psql
create user smlprft password 'smlprft'; create user countercust password 'countercust'; create user cuanadb password 'cuanadb';
# 向xpgdb導入 psql -f smlprft-20181110.dmp -d xpgdb # 執行完成後,再執行下面的命令 psql -f countercust-20181110.dmp -d xpgdb # 執行完成後,再執行下面的命令 psql -f cuanadb-20181110.dmp -d xpgdb