![](/img/trans.png)
[英]Windows pg_dump postgres bug: pg_restore: error: input file does not appear to be a valid archive
[英]pg_restore: error: input file does not appear to be a valid archive
我已經提取了一個 pg_dump,但我不是 100% 確定我應該命名我的 output 文件。 這是我的命令:
pg_dump --dbname=db --format=t --host=foo --username=db --password=bar --dbname=db --exclude-table=store > db_backup
正如我所料,這得到了我的一個很好的文件,120megs。 當我嘗試在 PG 管理員中執行 pg_restore 時,我得到:
pg_restore: error: input file does not appear to be a valid archive
pgadmin 正在運行的命令是這樣的:
pg_restore.exe --host "localhost" --port "5432" --username "foo" --no-password --role "yanis" --dbname "air" --verbose
請確保在 pgadmin restore window 中傳遞包含文件名的完整路徑。 Pgadmin 將創建一個類似這樣的命令:
pg_restore.exe --host "localhost" --port "5432" --username "foo" --no-password --role "yanis" --dbname "air" --verbose "C:/db_backup"
另外,請確保 pgadmin 可以讀取 db_backup 文件並且文件的權限不受限制。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.