Abhishek Choudhary
Abhishek Choudhary

Reputation: 161

Unable to restore MongoDB from db_dump

I am trying to restore MongoDB from db_dump via terminal.

$ mongorestore -h localhost:27017 --db aaaa_production --archive=db_dump_071118.gz --gzip

Error parsing command line: unrecognised option '--archive=db_dump_071118.gz'
try 'mongorestore --help' for more information

Upvotes: 0

Views: 1405

Answers (1)

Sandeep Patel
Sandeep Patel

Reputation: 5148

Before running mongorestore command make sure that MongoDB is running on the same port as specified in mongorestore command. In your case, MongoDB should be running on localhost:27017.Then run following command to restore database:

$ mongorestore -h localhost:27017 --db aaaa_production --gzip --archive=db_dump_071118.gz 

Upvotes: 1

Related Questions