- if [ $usevserver = yes ]
- then
- execstr='$VSERVER $vsname exec su - postgres -c "$PGSQLDUMP $db > $backupdir/${db}.sql"'
+ if [ $usevserver = yes ]; then
+ if [ "$compress" == "yes" ]; then
+ execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMP $db | $GZIP > $backupdir/${db}.sql.gz\""
+ else
+ execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMP $db | > $backupdir/${db}.sql\""
+ fi