We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ebcd4fc + a9037f9 commit 8d6e72eCopy full SHA for 8d6e72e
install/usr/local/bin/restore
@@ -925,7 +925,10 @@ case "${r_dbtype}" in
925
if [ -n "${r_dbpass}" ] ; then
926
mongo_pass="-p=${r_dbpass}"
927
fi
928
- mongorestore ${mongo_compression} -d=${r_dbname} -h=${r_dbhost} --port=${r_dbport} ${mongo_user} ${mongo_pass} --archive=${r_filename}
+ if [ -n "${DB_AUTH}" ] ; then
929
+ mongo_auth_database="--authenticationDatabase=${DB_AUTH}"
930
+ fi
931
+ mongorestore ${mongo_compression} -d=${r_dbname} -h=${r_dbhost} --port=${r_dbport} ${mongo_user} ${mongo_pass} --archive=${r_filename} ${mongo_auth_database}
932
exit_code=$?
933
;;
934
* )
0 commit comments