diff --git a/installation/resource/installer/bin/backup-databases.sh b/installation/resource/installer/bin/backup-databases.sh index 06910f3b0c966ff740d6c5855a36cd7a89fdef54..7ca81934eb78e286326e6a761038d431d815b4a5 100755 --- a/installation/resource/installer/bin/backup-databases.sh +++ b/installation/resource/installer/bin/backup-databases.sh @@ -61,10 +61,8 @@ function backupDatabase() { return fi - local user_name_for_check=$(getProperty $DB_PROPS "username") - if [ $(databaseExist $database $user_name_for_check) == "TRUE" ]; then - username=$(getProperty $DB_PROPS "username") - + username=$(getProperty $DB_PROPS "username") + if [ $(databaseExist $database $username) == "TRUE" ]; then local dumpDir=$BACKUP_DIR/$database echo "Backing up database $database to $dumpDir..." diff --git a/installation/resource/installer/bin/common-functions.sh b/installation/resource/installer/bin/common-functions.sh index b5fe23e67d5411eeb1240433d8e88439cd9ec88c..6529ea683f6fa9a4d07580e23dc7d0d51b1737c5 100644 --- a/installation/resource/installer/bin/common-functions.sh +++ b/installation/resource/installer/bin/common-functions.sh @@ -45,7 +45,7 @@ contains() # # This function should be used as follows: # -# if [ $(databaseExist "openbis_prod") == "TRUE" ]; then doBackup; fi +# if [ $(databaseExist "openbis_prod" $owner) == "TRUE" ]; then doBackup; fi # databaseExist() {