简体   繁体   English

pg_restore:错误:输入文件似乎不是有效的存档

[英]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.

相关问题 Windows pg_dump postgres 错误:pg_restore:错误:输入文件似乎不是有效的存档 - Windows pg_dump postgres bug: pg_restore: error: input file does not appear to be a valid archive pg_restore:[存档]输入文件在使用Pgadmin 4的PostgreSQL中似乎不是有效的存档错误 - pg_restore: [archiver] input file does not appear to be a valid archive error in PostgreSQL using Pgadmin 4 pg_restore:[archiver]输入文件在ubuntu 18.04中使用Pgadmin 4的PostgreSQL中似乎不是有效的存档错误 - pg_restore: [archiver] input file does not appear to be a valid archive error in PostgreSQL using Pgadmin 4 in ubuntu 18.04 Postgres 教程:pg_restore:[archiver] 输入文件似乎不是有效的存档 - Postgres Tutorial: pg_restore: [archiver] input file does not appear to be a valid archive pg_restore: [archiver] postgres 中的输入文件太短错误 - pg_restore: [archiver] input file is too short error in postgres pg_restore: [目录归档程序] 无法打开输入文件。 尝试恢复数据库时出错 - pg_restore: [directory archiver] could not open input file. Error while trying to restore DB pg_restore错误:pg_restore:文件头中的[archiver]不支持的版本(1.13) - pg_restore error: pg_restore: [archiver] unsupported version (1.13) in file header pg_restore toc 错误 - pg_restore toc error 档案目录中的每一列是什么意思? (pg_dump/pg_restore) - What does each column in an archive's table of contents mean? (pg_dump/pg_restore) pg_restore错误:“关系不存在”并创建新数据库 - pg_restore ERROR: “Relation does not exist” and creating new database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM