mongodb dump and restore
mongodump --db ${DB_NAME} --gzip -o ${BACKUP_FILE_GZ}
mongorestore --gzip --db "${DB_NAME_RESTORE}" ${BACKUP_FILE_GZ}/${DB_NAME}
mongodb dump and restore
mongodump --db ${DB_NAME} --gzip -o ${BACKUP_FILE_GZ}
mongorestore --gzip --db "${DB_NAME_RESTORE}" ${BACKUP_FILE_GZ}/${DB_NAME}
Create And Restore MongoDB Backups
# Backup
mongodump --authenticationDatabase admin --username root --password PASSWORD -d DATABASE_NAME -h localhost
# Restore
mongorestore --authenticationDatabase admin --username root --password PASSWORD PATH_TO_BACKUP_FILE
dump database mongodb in windows
mongodump -d your_db_name -o destination_path
how to restore a mongodb dump with a new name
mongorestore -d newDbName dumpdir/db1
take db backup mongodb
mongodump --host=mongodb1.example.net --port=3017 --username=user --password="pass" --out=/opt/backup/mongodump-2013-10-24
take db backup mongodb
mongodump --out=/data/backup/
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us