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