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