MongoDB – Create Backup In this chapter, we will see how to create a backup in MongoDB. Dump MongoDB Data To create backup of database in MongoDB, you should use mongodump command. This command will dump the entire data of your server into the dump directory. There are many options available by which you can […]
Category Archives: mongodb
MongoDB – Create Collection In this chapter, we will see how to create a collection using MongoDB. The createCollection() Method MongoDB db.createCollection(name, options) is used to create collection. Syntax Basic syntax of createCollection() command is as follows − db.createCollection(name, options) In the command, name is name of collection to be created. Options is a document […]
MongoDB – Create Database In this chapter, we will see how to create a database in MongoDB. The use Command MongoDB use DATABASE_NAME is used to create database. The command will create a new database if it doesn”t exist, otherwise it will return the existing database. Syntax Basic syntax of use DATABASE statement is as […]