remove = after -o in mongodump command

The -o= seems to work fine in 3.x but in 2.x it actually includes the equals sign in the path, resulting in "/=/tmp/tmp.XXXXXX". The mongodump command docs for neither 2.x nor 3.x list the equals sign as part of the -o or --out parameter. It seems to work fine in 3.x with or without the equals sign.

Updated test to reflect change to -o
This commit is contained in:
Jacob Williams
2015-12-03 15:50:08 -06:00
parent da4b355052
commit 3d30b6ca35
2 changed files with 2 additions and 2 deletions

View File

@@ -117,7 +117,7 @@ case "$1" in
PASSWORD="$(cat "$SERVICE_ROOT/PASSWORD")"
[[ -n $SSH_TTY ]] && stty -opost
docker exec "$SERVICE_NAME" bash -c "DIR=\$(mktemp -d) && mongodump -d $SERVICE -o=\"\$DIR\" -u \"$SERVICE\" -p \"$PASSWORD\" --authenticationDatabase \"$SERVICE\" && tar cf - -C \"\$DIR\" . && rm -rf \"\$DIR\""
docker exec "$SERVICE_NAME" bash -c "DIR=\$(mktemp -d) && mongodump -d $SERVICE -o \"\$DIR\" -u \"$SERVICE\" -p \"$PASSWORD\" --authenticationDatabase \"$SERVICE\" && tar cf - -C \"\$DIR\" . && rm -rf \"\$DIR\""
[[ -n $SSH_TTY ]] && stty opost
;;