Skip to content

Commit

Permalink
Release 3.3.5 - See CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit committed Jun 8, 2022
1 parent 83693d3 commit 12211d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 3.3.5 2022-06-08 <dave at tiredofit dot ca>

### Changed
- Fix DB Port parameter not being able to be input in restore script
- Fix MongoDB restore questionnaire


## 3.3.4 2022-06-03 <rozdzynski@github>

### Fixed
Expand Down
14 changes: 7 additions & 7 deletions install/usr/local/bin/restore
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The image will also allow you to use environment variables or Docker secrets use

The script can also be executed skipping the interactive mode by using the following syntax/

$(basename $0) <filename> <db_type> <db_hostname> <db_name> <db_user> <db_pass> <db_port>
$(basename "$0") <filename> <db_type> <db_hostname> <db_name> <db_user> <db_pass> <db_port>

If you only enter some of the arguments you will be prompted to fill them in.

Expand All @@ -70,15 +70,15 @@ EOF
interactive_mode=true
;;
* )
interactive_mode=false
interactive_mode=false
;;
esac
fi

get_filename() {
COLUMNS=12
prompt="Please select a file to restore:"
options=( $(find ${DB_DUMP_TARGET} -type f -maxdepth 1 -not -name '*.md5' -not -name '*.sha1' -print0 | xargs -0) )
options=( $(find "${DB_DUMP_TARGET}" -type f -maxdepth 1 -not -name '*.md5' -not -name '*.sha1' -print0 | xargs -0) )
PS3="$prompt "
select opt in "${options[@]}" "Custom" "Quit" ; do
if (( REPLY == 2 + ${#options[@]} )) ; then
Expand Down Expand Up @@ -641,7 +641,7 @@ EOF
2 )
while true; do
read -p "$(echo -e ${clg}** ${cdgy}Enter Value \(${cwh}C${cdgy}\) \| \(${cwh}E${cdgy}\) : ${cwh}${coff}) " q_dbport_menu
case "${q_dbname_menu,,}" in
case "${q_port_menu,,}" in
c* )
counter=1
q_dbport=" "
Expand Down Expand Up @@ -944,12 +944,12 @@ case "${r_dbtype}" in
mongo_compression="--gzip"
fi
if [ -n "${r_dbuser}" ] ; then
mongo_user="-u ${r_dbuser}"
mongo_user="-u=${r_dbuser}"
fi
if [ -n "${r_dbpass}" ] ; then
mongo_pass="-u ${r_dbpass}"
mongo_pass="-p=${r_dbpass}"
fi
mongorestore ${mongo_compression} -d ${r_dbname} -h ${r_dbhost} --port ${r_dbport} ${mongo_user} ${mongo_pass} --archive=${r_filename}
mongorestore ${mongo_compression} -d=${r_dbname} -h=${r_dbhost} --port=${r_dbport} ${mongo_user} ${mongo_pass} --archive=${r_filename}
exit_code=$?
;;
* )
Expand Down

0 comments on commit 12211d3

Please sign in to comment.