Skip to content
Snippets Groups Projects
Commit 99ce1c42 authored by Axel Hahn's avatar Axel Hahn
Browse files

show count of found database profiles and a message on 0 profiles

parent f0b33915
No related branches found
No related tags found
1 merge request!129Db Profiles
...@@ -408,7 +408,7 @@ EOH ...@@ -408,7 +408,7 @@ EOH
# . /usr/local/bin/inc_cronfunctions.sh # . /usr/local/bin/inc_cronfunctions.sh
j_requireUser "root" j_requireUser "root"
h1 $(date) IML BACKUP :: LOCALDUMP :: $* h1 $(date) IML BACKUP :: LOCALDUMP
export SERVICENAME=$1 export SERVICENAME=$1
...@@ -432,13 +432,18 @@ EOH ...@@ -432,13 +432,18 @@ EOH
if [ "$1" = "ALL" ] || [ -z "$1" ]; then if [ "$1" = "ALL" ] || [ -z "$1" ]; then
profiles2run=$(get_database_profiles) profiles2run=$(get_database_profiles)
echo AUTO: calling local backup scripts for all active profiles echo "INFO: Calling local backup scripts for all active profiles"
echo "$profiles2run" | nl echo "$profiles2run" | nl
echo
else else
profiles2run=$* profiles2run=$*
echo "INFO: I try to dump the profiles you gave as parameter: $profiles2run"
echo
fi fi
iProfilesFound=$( grep -c . <<< "$profiles2run" )
test "$iProfilesFound" -eq "0" && echo "INFO: No match - no database dumps needed."
typeset -i iProfileCounter=0
# ----- GO # ----- GO
# PROFILENAME mysql_localhost_13306 # PROFILENAME mysql_localhost_13306
# SERVICENAME mysql # SERVICENAME mysql
...@@ -446,9 +451,10 @@ EOH ...@@ -446,9 +451,10 @@ EOH
for PROFILENAME in $profiles2run for PROFILENAME in $profiles2run
do do
iProfileCounter+=1
if dbdetect.setProfile "${PROFILENAME}"; then if dbdetect.setProfile "${PROFILENAME}"; then
h2 "START PROFILE [${PROFILENAME}]" h2 "START PROFILE $iProfileCounter of $iProfilesFound [${PROFILENAME}]"
SERVICENAME=$( dbdetect.getType "$PROFILENAME" ) SERVICENAME=$( dbdetect.getType "$PROFILENAME" )
BACKUP_PARAMS=$( dbdetect.getParams ) BACKUP_PARAMS=$( dbdetect.getParams )
...@@ -480,7 +486,7 @@ EOH ...@@ -480,7 +486,7 @@ EOH
else else
echo "SKIP: profile '$PROFILENAME' " echo "SKIP: profile $iProfileCounter of $iProfilesFound '$PROFILENAME' "
# see why it is not active # see why it is not active
DBD_DEBUG=1; dbdetect.setProfile "${PROFILENAME}"; echo; DBD_DEBUG=0 DBD_DEBUG=1; dbdetect.setProfile "${PROFILENAME}"; echo; DBD_DEBUG=0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment