3

I need to import everything that exists in a particular database in mongoDB to arangoDB. I can dump the mongoDB data as:

mongodump -d "database_name" -u "user_name" -p "password"

Which will then dump the database to a dump folder.

Now I need to import this dump to my arangoDB database. How do I do this ?

1 Answer 1

2

A method you can try is to first export your Mongo database into a JSON file as:

mongoexport --db databaseName --collection collectionName --out dump.json

Once you've obtained the JSON file you can try to import it into Arango using arangoimp

arangoimp --file dump.json --collection collectionName --create-collection true

References:

Let me know if you encounter problems.

Sign up to request clarification or add additional context in comments.

3 Comments

That would only import a single collection. I want the whole db
You would need some kind of script that iterates through every collection and dumps and imps for you. If mongodb has any list collection feature, this should be very simple.
This method works only in rare cases where the collections have no relations and there are no foreign keys, as the ids/keys won't be correctly vinculated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.