簡體   English   中英

如何在 Azure PostgreSQL 服務器上恢復 .dump 或 .sql

[英]How to restore .dump or .sql on Azure PostgreSQL Server

我已經有.dump 和.sql 但我無法恢復它。 我使用了 pgAdmin,我可以看到表格,但里面沒有數據。Azure Studio 和 Navicat 中的情況相同。 我使用“pg_restore”來恢復文件,但它不會引發任何錯誤。

使用數據進行轉儲和恢復的正確方法是

./pg_dump -U postgres -p 5432 -h <remote_IP> -Ft dbname_source > dump_of_source.sql.tar 
./pg_restore -U postgres -h localhost -p 5432 -d dbname_target dump_of_source.sql.tar

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM