Import data failed

Failed: mongorestore target ‘dump’ invalid: CreateFile dump: The system cannot find the file specified.

1 Like

Please share the command you entered.

I entered this:
mongorestore --drop --gzip --uri “mongodb+srv://mflix-0wlnf.mongodb.net/test” data

I have started over again and some progress - but a new error:

mongorestore --drop --gzip --uri “mongodb+srv://mflix-0wlnf.mongodb.net/test” \data
2019-02-14T13:37:12.684+0100 preparing collections to restore from
2019-02-14T13:37:12.688+0100 don’t know what to do with file “\data\db\WiredTiger”, skipping…
2019-02-14T13:37:12.688+0100 don’t know what to do with file “\data\db\WiredTiger.lock”, skipping…
2019-02-14T13:37:12.688+0100 don’t know what to do with file “\data\db\WiredTiger.turtle”, skipping…
2019-02-14T13:37:12.689+0100 don’t know what to do with file “\data\db\WiredTiger.wt”, skipping…
2019-02-14T13:37:12.690+0100 don’t know what to do with file “\data\db\WiredTigerLAS.wt”, skipping…
2019-02-14T13:37:12.690+0100 don’t know what to do with file “\data\db_mdb_catalog.wt”, skipping…
2019-02-14T13:37:12.691+0100 don’t know what to do with file “\data\db\collection-0–5349754812000733773.wt”, skipping…
2019-02-14T13:37:12.691+0100 don’t know what to do with file “\data\db\collection-2–5349754812000733773.wt”, skipping…
2019-02-14T13:37:12.692+0100 don’t know what to do with file “\data\db\collection-4–5349754812000733773.wt”, skipping…
2019-02-14T13:37:12.692+0100 don’t know what to do with subdirectory “db\diagnostic.data”, skipping…
2019-02-14T13:37:12.693+0100 don’t know what to do with file “\data\db\index-1–5349754812000733773.wt”, skipping…
2019-02-14T13:37:12.693+0100 don’t know what to do with file “\data\db\index-3–5349754812000733773.wt”, skipping…
2019-02-14T13:37:12.693+0100 don’t know what to do with file “\data\db\index-5–5349754812000733773.wt”, skipping…
2019-02-14T13:37:12.694+0100 don’t know what to do with file “\data\db\index-6–5349754812000733773.wt”, skipping…
2019-02-14T13:37:12.696+0100 don’t know what to do with subdirectory “db\journal”, skipping…
2019-02-14T13:37:12.699+0100 don’t know what to do with file “\data\db\mongod.lock”, skipping…
2019-02-14T13:37:12.699+0100 don’t know what to do with file “\data\db\sizeStorer.wt”, skipping…
2019-02-14T13:37:12.700+0100 don’t know what to do with file “\data\db\storage.bson”, skipping…
2019-02-14T13:37:12.700+0100 done

You are not entering the command in the appropriate directory.

The data directory must be the one provided in the course material that you unzipped somewhere. Your \data is a data directory of a local mongod instance.

What was the error when you specified data rather than \data?

Solved it !

correct mongorestore cmd:

(mflix) C:\Users\ErikTorp\Documents\M220P\mflix-python>mongorestore --drop --gzip --uri mongodb+srv://m220student:m220password@mflix-0wlnf.mongodb.net/test data

2 Likes