Skip to content

Commit

Permalink
Add mongodump opts
Browse files Browse the repository at this point in the history
  • Loading branch information
jerome-quere committed Apr 21, 2017
1 parent d363938 commit 18122a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
indi-backup (0.3.1-0-gd363938) unstable; urgency=medium

* Release 0.3.1-0-gd363938

-- Jerome Quere <[email protected]> Thu, 20 Apr 2017 19:43:18 +0000

indi-backup (0.3.0-0-g88068b7) unstable; urgency=medium

* Release 0.3.0-0-g88068b7
Expand Down
3 changes: 2 additions & 1 deletion lib/tasks/mongo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ function ib_task_mongo_run() {
local port=$(ib_get_conf_value "IB_TASK_${taskName}_PORT")
local user=$(ib_get_conf_value "IB_TASK_${taskName}_USER")
local password=$(ib_get_conf_value "IB_TASK_${taskName}_PASSWORD")
local dumpOpts=$(ib_get_conf_value "IB_TASK_${taskName}_DUMP_OPTS")
local databases=$(ib_get_conf_value "IB_TASK_${taskName}_DATABASES")
local storageName=$(ib_get_conf_value "IB_TASK_${taskName}_STORAGE")

[ -z "$databases" ] && databases="__ALL__"

[ -z "$storageName" ] && echo "No valid IB_TASK_${taskName}_STORAGE found" && return -1

local options=""
local options="${dumpOpts}"
[ ! -z "$host" ] && options="${options} --host=${host}"
[ ! -z "$port" ] && options="${options} --port=${port}"
[ ! -z "$user" ] && options="${options} --username=${user}"
Expand Down

0 comments on commit 18122a0

Please sign in to comment.