pg備份表命令 postgresql怎么還原數(shù)據(jù)庫?
postgresql怎么還原數(shù)據(jù)庫?還原需要原先對數(shù)據(jù)庫進行過備份,才能從備份恢復,如果沒有備份過,那是無法還原的?;謴蛿?shù)據(jù)庫,指令如下: pg_restore.exe --host localh
postgresql怎么還原數(shù)據(jù)庫?
還原需要原先對數(shù)據(jù)庫進行過備份,才能從備份恢復,如果沒有備份過,那是無法還原的?;謴蛿?shù)據(jù)庫,指令如下: pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "symbolmcnew" --no-password --verbose "databasename.backup"指令解釋:如上命令,psql是恢復數(shù)據(jù)庫命令,localhost是要恢復到哪個數(shù)據(jù)庫的地址,當然你可以寫上ip地址,也就是說能遠程恢復(必須保證 數(shù)據(jù)庫允許外部訪問的權(quán)限哦~);postgres 就是要恢復到哪個數(shù)據(jù)庫的用戶;symbolmcnew 是要恢復到哪個數(shù)據(jù)庫,databasename.backup指備份文件。