mongoose restore database code example
Example 1: take db backup mongodb
mongodump --out=/data/backup/
Example 2: mongo restore collections
mongorestore --port <port> --db <destination database> <data-dump-path/database> --drop
mongodump --out=/data/backup/
mongorestore --port <port> --db <destination database> <data-dump-path/database> --drop