Mongorestore is not working with --uri string

I tried to dump database from atlas is done… but when i tried to restore the same database it failing

for restore database i used this command
mongorestore --uri “mongodb+srv://:@.mongodb.net/sample_supplies” --drop dump

error :
The --db and --collection flags are deprecated for this use-case; please use --nsInclude instead, i.e. with --nsInclude=${DATABASE}.${COLLECTION}
2022-08-19T14:39:22.401+0530 building a list of collections to restore from dump dir
2022-08-19T14:39:22.404+0530 don’t know what to do with subdirectory “dump\sample_guides”, skipping…
2022-08-19T14:39:22.405+0530 don’t know what to do with subdirectory “dump\sample_supplies”, skipping…
2022-08-19T14:39:22.405+0530 0 document(s) restored successfully. 0 document(s) failed to restore.

Help !!!

Try with nsInclude as suggested in your error message
Which is the correct db name?
sample_supplies vs sample_guides

I had same issue (and more) with mongorestore to load the sample data in my VirtualBox machine.
The root cause was different. I created a user in mongodb with userAdminAnyDatabase role. That proved to be a mistake. Just create a user with root role, give your user’s credentials in mongorestore, with -u and -p options (in case that you didn’t start you instance with these options) and then everything will work.
It is a miss that mongodb user creation is not clearly referred in installation instuctions of the documentation and/or in m001 notes.

Root is a superuser with unlimited privileges
There are other buit in roles like backup & restore.Those should suffice