I've dumped some databases using mongodump
which means that I currently have a folder(which name, is the date I dumped the databases) and one folder for each database that I had and inside each database folder I have 2 files per collection, one .bson and one .metadata.json.
Now I want to use mongorestore
to rebuild databases and their collections using the following command:
mongorestore --db user --verbose /home/nvsh120/projects/database/11-26-20/user
but it doesn't work and exits with the following error:
uncaught exception: SyntaxError: unexpected token: identifier :
@(shell):1:15
So the problem was that I was trying to run mongorestore
from mongo shell whereas I should've run it from windows\linux command prompt\terminal.