Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import a data base file.json into robo3T (robomongo)

Tags:

I have a file named services.json containing a data base that I exported from a windows mongodb, and I want to import that file into robomongo (connected to mongodb installed by npm) on Ubuntu.

I'm a beginner and I don't know how to proceed, which terminal use (robomongo or Ubuntu)?

like image 493
user2981029 Avatar asked Apr 11 '14 09:04

user2981029


People also ask

How do I import a JSON file into a database in MongoDB?

To import JSON file you need to follow the following steps: Step 1: Open a command prompt and give command mongod to connect with MongoDB server and don't close this cmd to stay connected to the server. Step 2: Open another command prompt and run the mongo shell. Using the mongo command.

How do I import a database into MongoDB?

To import data to a MongoDB database, you can use mongoimport to import specific collections data, or you can use mongorestore to import a binary (BSON) full database backup. The exported database file must be stored locally on the same machine as your client.

How do I add a database to robo 3t?

Creating the MongoDB Database in Robo 3T GUI To create a new MongoDB database, right-click on the New Connection and select Create Database in the pop-up menu. The “Create Database” window will appear asking the user to enter the desired database name in the “Database Name” field.

How do I import a JSON file from robomongo to MongoDB?

RoboMongo is just the UI for your mongod which is the primary daemon process for the MongoDB system. Apart from this you can import using the mongoimport command from terminal. Show activity on this post. if this is not a bson, and only json, you can use mongoimport --jsonArray . refference Insert json file into mongodb Show activity on this post.

What JSON format does robomongo support?

It's not really a JSON format that ROBO 3T accepts, but rather bunch of JSON objects separated by newlines. (if you use export Standard, then it's already formatted for document insert) Show activity on this post. RoboMongo is just the UI for your mongod which is the primary daemon process for the MongoDB system.

How to create a collection in MongoDB using Robo 3T?

Creating the first Collection in the MongoDB Database using Robo 3T Once the database is created, click the arrow on the left-side of the testDatabase then right click on the Collections(0) folder (0 means no collection) and select the Create Collection... in the menu.

What JSON format does Robo 3T support?

It's not really a JSON format that ROBO 3T accepts, but rather bunch of JSON objects separated by newlines. (if you use export Standard, then it's already formatted for document insert)


1 Answers

to import data for a collection in Robomongo:

  1. Right click on collection.
  2. Select 'insert Document'.
    enter image description here
  3. Paste your json data
  4. Click validate.
  5. Click save.
like image 76
Varun Sukheja Avatar answered Oct 15 '22 03:10

Varun Sukheja