diff --git a/installation/resource/installer/bin/backup-databases.sh b/installation/resource/installer/bin/backup-databases.sh
index cd7e1c7089ce4fd06d3e4b911f5e8c1614cbf81c..80ca3c6a911fae6a58c1a56e3637b1b7db32bcb7 100755
--- a/installation/resource/installer/bin/backup-databases.sh
+++ b/installation/resource/installer/bin/backup-databases.sh
@@ -46,7 +46,7 @@ function backupDatabase() {
   
   getProperty $DB_PROPS "database"
   database=$propValue
-  if [ `psql -U postgres -l | grep $database | wc -l` -gt 0 ]; then
+  if [ `psql -U postgres -l | eval "awk '/$database /'" | wc -l` -gt 0 ]; then
     getProperty $DB_PROPS "username"
     username=$propValue