dump is export and import data in database from old database to new database. You can use it with move from dev database to uat or to production
download tool: https://www.mongodb.com/try/download/database-tools
how to install and config: https://www.mongodb.com/docs/database-tools/installation/installation-windows/
- open terminal
- use command: mongodump --uri="your database url"
C:\Users\ter> mongodump --uri="mongodb+srv://hackter77:%3CZPnaI2z 0bvBrgE4G%3E@cluster0.7xduomn.mongodb.net/?retryWrites=true&w=majority"
C:\Users\ter> mongodump --uri="mongodb+srv://hackter77:%3CZPnaI2z0bvBrgE4G%3E@cluster0.7xduomn.mongodb.net/database1?retryWrites=true&w=majority"
example my dump: C:\Users\ter\dump\
C:\Users\ter>mongorestore --uri="mongodb+srv://hackter77:%3CZPnaI2z 0bvBrgE4G%3E@cluster0.7xduomn.mongodb.net/?retryWrites=true&w=majority" dump\
C:\Users\ter>mongorestore --uri="mongodb+srv://hackter77:%3CZPnaI2z0bvBrgE4G%3E@cluster0.7xduomn.mongodb.net/database2?retryWrites=true&w=majority" dump\database1\