MongoDB RESTORE BACKUP

SYNTAX

mongorestore  –db <databse_name> /<path_of_backup_directory>

mongorestore --db testdatabase  /var/backups/mongobackups/

Drop existing database and restore new backup, put –drop option in syntax

mongorestore --db testdatabase --drop /var/backups/mongobackups/

1 thought on “MongoDB RESTORE BACKUP”

Leave a Reply to Suraj Marathe Cancel reply

Your email address will not be published. Required fields are marked *