mongorestore --gzip code example
Example 1: mongorestore --gzip
mongodump --db ${DB_NAME} --gzip -o ${BACKUP_FILE_GZ}
mongorestore --gzip --db "${DB_NAME_RESTORE}" ${BACKUP_FILE_GZ}/${DB_NAME}
Example 2: mongorestore --gzip
mongodump --db ${DB_NAME} --gzip -o ${BACKUP_FILE_GZ}
mongorestore --gzip --db "${DB_NAME_RESTORE}" ${BACKUP_FILE_GZ}/${DB_NAME}