How to take a backup of Database in MongoDB


The below command will take teh backup of "learn" database in  MongoDB. You have to run this sepately by executing "mongodump". Please find the below steps
1) First i figure out where i have installed Mongodb, it is the C:\Program Files\MongoDB\Server\4.0\bin
2) Then go that folder  by using "CD" command
3) chose "mongodump" and provide parameters like --db --out backup
--Out command will create a backup folder in the same drive, it will dump all the documents to that particular folder

And the backup files look like below(as mentioned in the below image)







If you want to take the same backups to another drive provide the path like below.


Comments

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

Pre login Handshake or Connection Timeout Period

Transparent Data Encryption(TDE) with Master Key and Certificate in SQL Server