How to restore a specific database from backup using the mongo restore command?

257    Asked by DavidPiper in SQL Server , Asked on Sep 30, 2022

I created a backup of all my databases using mongodump command. Now I want to restore a specific database using the mongorestore command. How is this possible, I use this command: --db option then mongodb doesn't restore a specific database.

Answered by David WHITE

Use the following command to mongo restore:

mongorestore -d dbname dbpath



Your Answer

Interviews

Parent Categories