Skip to content

Commit 8b41f5e

Browse files
committed
Allow EXTRA_OPTS with MONGO_CUSTOM_URI
1 parent 4a8f85d commit 8b41f5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install/assets/functions/10-db-backup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ backup_mongo() {
170170
fi
171171

172172
if [ -n "${MONGO_CUSTOM_URI}" ] ; then
173-
mongo_generated_uri="${MONGO_CUSTOM_URI}"
173+
mongo_generated_uri="${MONGO_CUSTOM_URI} ${EXTRA_OPTS}"
174174
else
175175
if [ "${MONGO_HOST_TYPE,,}" = "atlas" ] ; then
176176
MONGO_URI_PREFIX=${MONGO_URI_PREFIX:-"mongodb+srv://"}
@@ -182,7 +182,7 @@ backup_mongo() {
182182
fi
183183
pre_dbbackup "${DB_NAME}"
184184
print_notice "Dumping MongoDB database: '${DB_NAME}' ${compression_string}"
185-
silent mongodump --archive=${TEMP_LOCATION}/${target} ${mongo_compression} --uri=${mongo_generated_uri} ${EXTRA_OPTS}
185+
silent mongodump --archive=${TEMP_LOCATION}/${target} ${mongo_compression} --uri="${mongo_generated_uri}"
186186
exit_code=$?
187187
check_exit_code $target
188188
generate_checksum

0 commit comments

Comments
 (0)