I have taken the /data/db folder copy from a different windows laptop and pasted it in my laptop. I tried starting the mongod with dbpath pointing to the folder which has the copy. I’m able to start the server, but I don see the collections/databases. Please advice.
I pasted the data/db folder from source(it was from my peer’s laptop) into /data/db1 in my laptop. I checked for the files and it matched the source count. I used the below command.
That should work ok, so I’m not sure what went wrong. Could you double check the dbpath, since typically path like /data/db1 (with slashes) are Unix-style paths. Windows usually have drive letters e.g. C:\data\db1
Another possibility is that there is a startup error or warning on the logs. Maybe the server is unable to open some file, permission issues, etc.? If you can post the full mongod log when it starts up, there might be some hint there.