Backup and Restore in MongoDB
Creating backups and restoring data using the utilities provided with MongoDB.
The mongodump and mongorestore utilities work with BSON data dumps and are useful for creating backups of small deployments.
Backup Can be created at any desired location.
Step For Backup-
1. Run Command Prompt as Administrator.
2. Reach to Install location of MongoDB. (Ex C:\MongoDbNew\Server\bin)
3. Run this command
C:\MongoDbNew\Server\bin\mongodump --host --port --username --password --db --out c:/backup
-- host (Ip address of database server)
--port (mongodb port 27017)
--username (created user for database access )
--password (Password to authentication)
--db (database name backup to be taken)
--out (location for backup)
Mongorestore can create a new database or add data to an existing database. However, Mongorestore performs inserts only and does not perform updates. That is, if restoring documents to an existing database and collection and existing documents have the same value _id field as the to-be-restored documents, Mongorestore will not overwrite those documents.
Step For Restore
1. Run Command Prompt as Administrator.
2. Reach to Install location of MMongoDB (Ex C:\MongoDbNew\Server\bin)
3. Run this command
C:\MongoDbNew\Server\bin\mongorestore --host --port --username --
password --db (back file location)c:/backup
Excellent blog, informative and knowledgeable content. Thanks for sharing this blog with us.
ReplyDeleteMean Stack Training in Hyderabad
Mean Stack Online Training in Hyderabad
I needed to gratitude for this prominent appropriate to apply!! I truly adored all minuscule piece of it. I have you bookmarked your site to try out the presented assets you articulate. Sony Vegas Cracked
ReplyDeleteGoodness! Such an awesome and helpful call that is. I basically in all actuality praise it. it's for that excuse attractive and as an end result impressive. I'm recently stunned. I dream that you keep up with to make a get adhering to of your seriously be sick bearing in considerations this in the with moreover!thanks Microsoft Office 2010 Product Key Crack
ReplyDelete