in some other situations you need to use the same folder path if you you specify ./backup in dump use it in restore. Even though your path will become like this ./backup/dbname
mongodump --uri='...' --out=./backup
mongorestore --uri='...' --dir=./backup