mongodump --authenticationDatabase admin --db XXXXX --collection XXXXX --port 27017 --username XXXXX --password XXXXX --gzip --archive=rhys.gz
mongorestore --authenticationDatabase admin --db XXXXX --collection XXXXX -u admin --passwordXXXXX --gzip --archive rhys.gzmongorestore --authenticationDatabase admin -u XXXXX --password XXXXX --gzip --archive rhys.gz
Hi Rhys
mongorestore —authenticationDatabase admin -u XXXXX —password XXXXX —gzip —archive rhys.gz
I believe what happened is you have no equal sign (=) between the parameter --archive and the filename rhys.gz, which makes mongorestore to wait for an input from stdin indefinitely.
You may also need to add the --gzip parameter to restore from a compressed archive (see Restore from Compressed Data)
I tested this command in MongoDB 3.2.11 and it seems to work as expected:
mongorestore --authenticationDatabase admin --db XXXX --collection XXXX -u user -p password --gzip --archive=test.gz
Please note that you can specify a --verbose option in both mongodump and mongorestore to print more information to the console.
Best regards,
Kevin