[英]pg_restore: error: input file does not appear to be a valid archive
I've extracted a pg_dump, but I'm not 100% sure on what I should name my output file.我已经提取了一个 pg_dump,但我不是 100% 确定我应该命名我的 output 文件。 Here is my command:
这是我的命令:
pg_dump --dbname=db --format=t --host=foo --username=db --password=bar --dbname=db --exclude-table=store > db_backup
This gets my a nice file, 120megs, as I'd expect.正如我所料,这得到了我的一个很好的文件,120megs。 When I try to do pg_restore in PG admin, I get:
当我尝试在 PG 管理员中执行 pg_restore 时,我得到:
pg_restore: error: input file does not appear to be a valid archive
The command pgdmin is running is like this: pgadmin 正在运行的命令是这样的:
pg_restore.exe --host "localhost" --port "5432" --username "foo" --no-password --role "yanis" --dbname "air" --verbose
Please make sure that in pgadmin restore window you are passing the full path including the file name.请确保在 pgadmin restore window 中传递包含文件名的完整路径。 Pgdmin will create a command something like this:
Pgadmin 将创建一个类似这样的命令:
pg_restore.exe --host "localhost" --port "5432" --username "foo" --no-password --role "yanis" --dbname "air" --verbose "C:/db_backup"
Also, make sure that pgadmin can read db_backup file and the permission on file is not restricted.另外,请确保 pgadmin 可以读取 db_backup 文件并且文件的权限不受限制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.