Mongodb docker中的Mongorestore失败:失败:gzip:无效标头

Mongodb docker中的Mongorestore失败:失败:gzip:无效标头,mongodb,gzip,stdout,Mongodb,Gzip,Stdout,我用命令创建了一个mongo转储(如中所建议的) 现在,当我试图用 docker exec mongodb bash -c 'mongorestore --gzip --archive=dumpname.gz' 我明白了 失败:gzip:无效标头 似乎在使用重定向时存在一些错误()。因此,当我将第一个命令更改为不使用它时,mongorestore开始工作: mongodump --host $cluster --ssl --username $username --authentication

我用命令创建了一个mongo转储(如中所建议的)

现在,当我试图用

docker exec mongodb bash -c 'mongorestore --gzip --archive=dumpname.gz'
我明白了

失败:gzip:无效标头


似乎在使用重定向时存在一些错误(
)。因此,当我将第一个命令更改为不使用它时,
mongorestore
开始工作:

mongodump --host $cluster --ssl --username $username --authenticationDatabase admin --db $dbname --gzip --archive=dumpname.gz
可以发现一些类似的问题

mongodump --host $cluster --ssl --username $username --authenticationDatabase admin --db $dbname --gzip --archive=dumpname.gz