Answers for "backup and restore mongodb mongodump"

1

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
Posted by: Guest on October-19-2021
0

mongodb dump and restore

mongodump --db ${DB_NAME} --gzip -o ${BACKUP_FILE_GZ}

mongorestore --gzip --db "${DB_NAME_RESTORE}" ${BACKUP_FILE_GZ}/${DB_NAME}
Posted by: Guest on April-15-2021

Code answers related to "backup and restore mongodb mongodump"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language