I have created a dump in an archive file by the following command :
mongodump --archive=newcollection.1.archive --db neel --collection newcollection
While restoring with the mongorestore i am getting an error :the --db and --collection args should only be used when restoring from a BSON file.
I got the syntax from [https://docs.mongodb.com/manual/reference/program/mongorestore/#examples][1] .
I fired the following command :
mongorestore --archive=newcollection.1.archive --db backup2.