20181112-PostgreSQL數據庫dmp文件導入(記錄一次數據導入)


20181112-PostgreSQL數據庫dmp文件導入

標注:dmp文件導入,場景:多個schema導入

1. 環境准備:

postgres集群master節點上,postgres用戶執行以下操作

cd ~
scp -rp  file1:實際路徑    ./
chown  postgres:postgres  filename

2. 登錄數據庫

1.用 postgres 用戶 登錄postgres集群master數據庫 :
命令:psql

3. 新建數據庫用戶:

create user smlprft password 'smlprft';
create user countercust  password 'countercust';
create user cuanadb password 'cuanadb';

4.在pg master 數據庫 依次導入數據:

# 向xpgdb導入
psql -f smlprft-20181110.dmp -d xpgdb

# 執行完成后,再執行下面的命令
psql -f countercust-20181110.dmp -d xpgdb

# 執行完成后,再執行下面的命令
psql -f cuanadb-20181110.dmp -d xpgdb


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM