Skip to content
Snippets Groups Projects
Commit b2d6489e authored by felmer's avatar felmer
Browse files

LMS-2818 bug fixed in database backup script of installer

SVN: 24691
parent 35d0b3b8
No related branches found
No related tags found
No related merge requests found
......@@ -46,18 +46,19 @@ function backupDatabase() {
getProperty $DB_PROPS "database"
database=$propValue
if [ `psql -U postgres -l | grep $database | wc -l` -gt 0 ]; then
getProperty $DB_PROPS "username"
username=$propValue
getProperty $DB_PROPS "username"
username=$propValue
local dumpFile=$BACKUP_DIR/$database.dmp
local dumpFile=$BACKUP_DIR/$database.dmp
echo "Backing up database $database to $dumpFile..."
pg_dump -U $username -Fc $database > $dumpFile
echo "Backing up database $database to $dumpFile..."
pg_dump -U $username -Fc $database > $dumpFile
if [ "$?" -ne 0 ]; then
if [ "$?" -ne 0 ]; then
echo "Failed to backup database '$database' !"
exit 3
fi
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment