mongodb backup restore

preview_player
Показать описание
Backup and Restore Mongo database.

Here i am going to create backups and restore data from MongoDB.

mongodump is used for backup database and mongorestore used for restoring database.

Steps :

1.Start mongod instance.

2.Run cmd in administrator mode.
Change path where you need to backup or restore.

3.Execute below command on cmd for backup database.

Now go to that location where mongodb installed.
Check there will a folder dump, in this folder check all database backup.

If you want to backup of particular one database

If you want only collection backup then

4.Execute below command for restoring database.

Now check database restored or not.

If you want to restore particular database then

If you want to restore particular collection then

Drop Database
Drop collection

Thanks for watching !
Рекомендации по теме
Комментарии
Автор

tanks my friend, greetings from Ecuador

dannyusca
Автор

Is this also possible if you don't have a backup.

rotimialaran