Re: [mongodb-user] Problem restoring from gzip archives: Failed: gzip: invalid header

1,802 views
Skip to first unread message

Gabriel Russell

unread,
Dec 29, 2016, 4:22:12 PM12/29/16
to mongod...@googlegroups.com
Rhys,

Can you show us the complete output of the mongorestore command?

If you use gzip to test the compressed stream like this, what do you get?

> gunzip -t /path/to/backup.gz

If that works, what happens if you do the uncompression external to the restore like so?

> gunzip -c /path/to/backup.gz | mongorestore --archive

Sincerely,
Gabriel

On Mon, Dec 12, 2016 at 11:24 AM, 'Rhys Campbell' via mongodb-user <mongod...@googlegroups.com> wrote:
Hello,

I seem to be having an issue restoring gzip compressed backup files.

I am backing up like so...

mongodump --port "$PORT" --username "$MONGO_USER" --password "$MONGO_PWD" --gzip --archive="$BACKUP_DIR/$BACKUP_ARCHIVE";

I've been trying various restore string but the msot basic is...

mongorestore --gzip --archive /path/to/backup.gz

The backups have been taken from a 3.2.8 instance (with 2.2.8 tools). I have tried restores on 3.2.8 and 3.2.11 with the same result. 

The command...

file /path/to/backup.gz

Reports: gzip compressed data and I have been able to gunzip these files without any apparent issue.

Am I doing something wrong here with the backup or restores?

Cheers,

Rhys




--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/3541d579-754e-4fe6-acb1-2b3787f517d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages