Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

import data to mongodb

mongoimport --jsonArray --db YourDatabase --collection YourCollection --file Yourfile.json
Comment

import and export data in mongodb

1) mongodump (export)
    all database
       $ mongodump
     single database
       $ mongodump -d databaseName
     single collection
       $ mongodump -d databasename -c collectionName

2) mongorestore (import)
     mongorestore -d databaseName /path/
     mongorestore -d databaseName -c collectionName
Comment

import data in mongo

mongorestore -d <database_name> <directory_backup>
Comment

PREVIOUS NEXT
Code Example
Javascript :: Delete - Cloudinary 
Javascript :: detect localstorage limit 
Javascript :: javaScript getMonth() Method 
Javascript :: node js code for saving first middle and last name 
Javascript :: javascript timeline 
Javascript :: how to wait till jquery post request has been made 
Javascript :: express generator error handling 
Javascript :: jest cross origin localhost fobbiden 
Javascript :: loop over documents in mongoose 
Javascript :: react this.state 
Javascript :: angularjs form validation on submit 
Javascript :: javascript closure interview questions 
Javascript :: Destructuring array and object from a nested object 
Javascript :: obfuscate js string 
Javascript :: split() js 
Javascript :: ionic not compiling with proxy 
Javascript :: how to change the text of a paragraph 
Javascript :: spotify uri 
Javascript :: click binding angular 8 
Javascript :: call function javascript from asp net 
Javascript :: currenttarget javascript 
Javascript :: difference between js and jsx 
Javascript :: median of two sorted arrays 
Javascript :: what hostings can run react js 
Javascript :: closure in javascript 
Javascript :: shell 
Javascript :: jquery dom traversal parent 
Javascript :: add table header dynamically in jquery 
Javascript :: js round to x decimal places 
Javascript :: html form structure 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =