r-spacex / SpaceX-API

:rocket: Open Source REST API for SpaceX launch, rocket, core, capsule, starlink, launchpad, and landing pad data.
Apache License 2.0
10.5k stars 933 forks source link

Question: using local mongodb instance - cannot import the data #96

Closed alshapton closed 6 years ago

alshapton commented 6 years ago

Ive got the code running, and a mongo instance, however i cant import the sample data

Can anyone point me in the right direction pls ? Ive spent a week on this now and I am frustrated :-|

Cheers

Andrew

PS - ANY help is appreciated :-)

jakewmeyer commented 6 years ago

mongorestore is the tool used to import the data. The data was exported using mongodump and contains all the collections, indexes, and documents.

In your shell of choice, run the following:

mongorestore --gzip --archive=path/to/database/backup --db=spacex-api

This command defaults to the mongo instance running on localhost with no password. If you have authentication set up, you'll need to add it to the command per the mongorestore instructions

alshapton commented 6 years ago

Thanks