Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
libre
utils
Commits
3d3317c5
Commit
3d3317c5
authored
May 08, 2016
by
Michał 'rysiek' Woźniak
Browse files
bugfixes
parent
1a3ef51d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ssh-dump-dbs-wrapper.sh
ssh-dump-dbs-wrapper.sh
+1
-1
utils.sh
utils.sh
+3
-3
No files found.
ssh-dump-dbs-wrapper.sh
View file @
3d3317c5
...
...
@@ -38,4 +38,4 @@ fi
[
"
$TARGET_DIR
"
=
""
]
&&
display_error_and_quit
"Not a valid target directory: '
$TARGET_DIR
'"
# run the dumper
"dump_
${
DB_TYPE
}
_dbs"
"
$DB_HOST
"
"
$DB_USER
"
"
$DB_PASS
"
"
$TARGET_DIR
"
"
${
SSH_ORIGINAL_COMMAND_ARR
:5
}
"
\ No newline at end of file
"dump_
${
DB_TYPE
}
_dbs"
"
$DB_HOST
"
"
$DB_USER
"
"
$DB_PASS
"
"
$TARGET_DIR
"
"
${
SSH_ORIGINAL_COMMAND_ARR
[@]
:5
}
"
\ No newline at end of file
utils.sh
View file @
3d3317c5
...
...
@@ -179,8 +179,8 @@ function dump_mysql_dbs {
# if we had a list of databases, did we find all of them?
# rationale: if we have a specific list of databases, we *expect* them to be dumped
# if we cannot find some of them, that should be clearly signalled
if
[
!
-z
${
5
+x
}
]
;
then
DATABASES_MISSING
=
"
$(
echo
"
${
@
:5
}
$DATABASES
"
|
tr
' '
'\n'
|
sort
|
uniq
-u
)
"
if
[
!
-z
${
5
+x
}
]
&&
[
"
$5
"
!=
""
]
;
then
DATABASES_MISSING
=
"
$(
echo
"
${
@
:5
}
$DATABASES
"
|
tr
' '
'\n'
|
sort
|
uniq
-u
|
tr
'\n'
' '
)
"
if
[[
"
$DATABASES_MISSING
"
!=
""
]]
;
then
# if not, complain and exit
display_error_and_quit
"Not all databases found; missing:
$DATABASES_MISSING
"
...
...
@@ -412,7 +412,7 @@ function dump_postgres_dbs {
# rationale: if we have a specific list of databases, we *expect* them to be dumped
# if we cannot find some of them, that should be clearly signalled
if
[
!
-z
${
5
+x
}
]
&&
[
"
$5
"
!=
""
]
;
then
DATABASES_MISSING
=
"
$(
echo
"
${
@
:5
}
$DATABASES
"
|
tr
' '
'\n'
|
sort
|
uniq
-u
)
"
DATABASES_MISSING
=
"
$(
echo
"
${
@
:5
}
$DATABASES
"
|
tr
' '
'\n'
|
sort
|
uniq
-u
|
tr
'\n'
' '
)
"
if
[[
"
$DATABASES_MISSING
"
!=
""
]]
;
then
# if not, complain and exit
display_error_and_quit
"Not all databases found; missing:
$DATABASES_MISSING
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment