提取文件时发生了错误(在gpg递减.gpg文件为.dump文件之后)
我有一个Postgres数据库备份,加密并保存为.gpg
文件。我正在努力提取/使用.dump文件。
我最初尝试使用此命令将其解密:
gpg --decrypt --output /home/jimmythecode/Downloads/db_backup /home/jimmythecode/Downloads/heroku-backup-2022-05-05_07.00.gpg
gpg
似乎已经接受了我的加密密码/秘密,并在下载文件夹中创建了一个压缩db_backup
文件 - 但是当我时打开并尝试提取pg_backup.dump
db_backup
文件我获取错误:提取文件时发生了错误
。
我已经在终端中运行了命令文件db_backup
。它返回:
db_backup: gzip compressed data, was "pg_backup.dump", last modified: Thu May 5 07:00:35 2022, from Unix, original size modulo 2^32 332380
因此,由于它是gzip
文件,因此我尝试使用命令:gunzip db_backup
。但这会返回:
gzip: db_backup: unknown suffix -- ignored
如果我尝试输入命令gunzip db_backup.gzip
或gunzip db_backup.gz
我得到:
gzip: db_backup.gz: No such file or directory
I have a postgres database backed up, encrypted, and saved as a .gpg
file. I'm struggling to extract/use the .dump file.
I've initially tried decrypting it with this command:
gpg --decrypt --output /home/jimmythecode/Downloads/db_backup /home/jimmythecode/Downloads/heroku-backup-2022-05-05_07.00.gpg
gpg
seems to have accepted my encryption passphrase/secret and has created a compressed db_backup
file in my downloads folder - but when I open and try to extract the pg_backup.dump
contained within the db_backup
file I get the error: An error occurred while extracting files
.
I've ran the command file db_backup
in my terminal. It returns:
db_backup: gzip compressed data, was "pg_backup.dump", last modified: Thu May 5 07:00:35 2022, from Unix, original size modulo 2^32 332380
So, since it's a gzip
file, I've tried using the command: gunzip db_backup
. But this returns:
gzip: db_backup: unknown suffix -- ignored
If I try entering the commands gunzip db_backup.gzip
or gunzip db_backup.gz
I get:
gzip: db_backup.gz: No such file or directory
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我从来没有发现上述可能。我找到了一个替代方案,它是创建.sql而不是.dump文件:
然后,我创建了一个名为
June> June30 -Test
的数据库,并在我的终端中执行了以下行:数据库现在已恢复。
I never found out if the above is possible. I've found an alternative, which is to create a .SQL rather than a .dump file:
I then created a database called
june30test
and executed the following line in my terminal:The database is now restored.