MongoDB import command does not import documents version 42.14

Still not clear with your requirement
If your intention is to import data from your primary server to another DB on your local host first create a dump file using mongoexport
Then import into your target DB

Also not clear what you meant by test.json will be created after import
mongoimport will not create any file.It expects a file created by mongoexport which is what we should pass with --file

How are you sure your test.json is a valid file
I was asking the physical size of this file H:\Desktop\Downloads\MongoBD\dumps\test.json not the size from db.stats
Purpose of asking these is to make sure your file is not empty

steevej also asked you to share how test.json was created and command you used to create it

Hope it clarifies your doubts

1 Like