diff -urN sysbk-1.0/CHANGELOG sysbk-1.0-blw/CHANGELOG
--- sysbk-1.0/CHANGELOG	2003-06-11 19:20:21.000000000 -0600
+++ sysbk-1.0-blw/CHANGELOG	2004-03-04 12:04:50.000000000 -0700
@@ -1,3 +1,8 @@
+1.0-blw:
+- added MYSQL_USER option to specify the user to be used to perform dumps
+- added support for POSTGRESQL databases.  performs just like MYSQL, archiving
+both the full database data path and the individual database SQL dumps
+
 1.0:
 - removed memory test operation
 - removed suming of backup size
diff -urN sysbk-1.0/files/conf.sysbk sysbk-1.0-blw/files/conf.sysbk
--- sysbk-1.0/files/conf.sysbk	2003-06-01 06:48:37.000000000 -0600
+++ sysbk-1.0-blw/files/conf.sysbk	2004-03-04 12:02:04.000000000 -0700
@@ -79,7 +79,20 @@
 MYSQL_PID="/var/run/mysqld/mysqld.pid"			# Location of MySQL PID file
 MYSQL_DUMP="/usr/bin/mysqldump"				# Path to the 'mysqldump' binary
 MYSQL_MYICHK="/usr/bin/myisamchk"			# Path to the 'myisamchk' binary
-MYSQL_ROOTPW=""						# MySQL Root password
+MYSQL_USER=""						# MySQL user to dumps							
+MYSQL_ROOTPW=""						# MySQL user password
+
+
+# PostgreSQL
+#
+POSTGRES_BK="0"						# Enable/Disable postgresql backup operations [1=on,0=off]
+POSTGRES_PATH="/var/lib/pgsql"				# Installed location of postgresql [no trailing slash]
+POSTGRES_INIT="/etc/init.d/postgresql"			# Locationof PostgreSQL INIT script
+POSTGRES_PID="/var/run/postmaster.5432.pid"		# Location of postgreSQL PID file
+POSTGRES_DUMP="/usr/bin/pg_dump"			# Path to the 'pg_dump' binary
+POSTGRES_USER=""					# PostgreSQL user for dumps
+POSTGRES_ROOTPW=""					# PostgreSQL user password
+
 
 # Cpanel
 #
diff -urN sysbk-1.0/files/internals/internals.sysbk sysbk-1.0-blw/files/internals/internals.sysbk
--- sysbk-1.0/files/internals/internals.sysbk	2003-06-01 06:48:49.000000000 -0600
+++ sysbk-1.0-blw/files/internals/internals.sysbk	2004-03-04 11:57:48.000000000 -0700
@@ -84,6 +84,10 @@
 bin_sanity $MYSQL_INIT
 fi
 
+if [ "$POSTGRES_BK" == "1" ]; then
+bin_sanity $POSTGRES_INIT
+fi
+
 ARC_PRI_VAL=`echo "$ARC_PRI" | awk '{print$1}'`
 bin_sanity $ARC_PRI_VAL
 
@@ -95,7 +99,7 @@
         exit 1
 fi
 
-if [ "$MYSQL_BK" -eq "0" ] && [ "$BIND_BK" -eq "0" ] && [ "$HTTP_BK" -eq "0" ] && [ "$ENSIMVH_BK" -eq "0" ]; then
+if [ "$MYSQL_BK" -eq "0" ] && [ "$POSTGRES_BK" -eq "0" ] && [ "$BIND_BK" -eq "0" ] && [ "$HTTP_BK" -eq "0" ] && [ "$ENSIMVH_BK" -eq "0" ]; then
    echo_fail
    echo "No backup operations configured, aborting..."
    echo "No backup operations configured, aborting..." >> $QLOG
@@ -151,6 +155,9 @@
 if [ ! -f "$MYSQL_PID" ]; then
 	$MYSQL_INIT start >> /dev/null 2>&1
 fi
+if [ ! -f "$POSTGRES_PID" ]; then
+	$POSTGRES_INIT start >> /dev/null 2>&1
+fi
 if [ "$ENSIMVH_BK" = "1" ]; then
 	for i in `$ENSIMVH_SL -a | tr ',' ' ' | awk '{print$1}'`; do
 	if [ -d "/home/virtual/$i$BACKUP_PATH" ]; then
diff -urN sysbk-1.0/files/mod/mysql.bk sysbk-1.0-blw/files/mod/mysql.bk
--- sysbk-1.0/files/mod/mysql.bk	2003-05-20 23:24:07.000000000 -0600
+++ sysbk-1.0-blw/files/mod/mysql.bk	2004-03-04 12:08:58.000000000 -0700
@@ -61,13 +61,21 @@
 if [ -d "$MYSQL_PATH/$i" ] && [ "$DIR_PREFIX" == "" ]; then
         echo -n "       Dumping database $i: "
         echo -n "       Dumping database $i: " >> $QLOG
-        $NICE -n $PRI $MYSQL_DUMP -l -p$MYSQL_ROOTPW $i > $BACKUP_PATH/$DATE/$i.sql
+	if [ "$MYSQL_USER" == "" ]; then
+	        $NICE -n $PRI $MYSQL_DUMP -l -p$MYSQL_ROOTPW $i > $BACKUP_PATH/$DATE/$i.sql
+	else
+	        $NICE -n $PRI $MYSQL_DUMP -l -u$MYSQL_USER -p$MYSQL_ROOTPW $i > $BACKUP_PATH/$DATE/$i.sql
+	fi		
         arc $BACKUP_PATH/$DATE/$i.sql $i.sql
         rm -f $BACKUP_PATH/$DATE/$i.sql
 elif [ -d "$MYSQL_PATH/$i" ] && [ ! "$DIR_PREFIX" == "" ]; then
         echo -n "       Dumping database $i: "
         echo -n "       Dumping database $i: " >> $QLOG
-        $NICE -n $PRI $MYSQL_DUMP -l -p$MYSQL_ROOTPW $i > $BACKUP_PATH/$DATE/$DIR_PREFIX/$i.sql
+	if [ "$MYSQL_USER" == "" ]; then
+ 	       $NICE -n $PRI $MYSQL_DUMP -l -p$MYSQL_ROOTPW $i > $BACKUP_PATH/$DATE/$DIR_PREFIX/$i.sql
+	else
+ 	       $NICE -n $PRI $MYSQL_DUMP -l -u$MYSQL_USER -p$MYSQL_ROOTPW $i > $BACKUP_PATH/$DATE/$DIR_PREFIX/$i.sql
+	fi
         arc $BACKUP_PATH/$DATE/$DIR_PREFIX/$i.sql $i.sql mysql
         rm -f $BACKUP_PATH/$DATE/$DIR_PREFIX/$i.sql
 fi
diff -urN sysbk-1.0/files/mod/postgres.bk sysbk-1.0-blw/files/mod/postgres.bk
--- sysbk-1.0/files/mod/postgres.bk	1969-12-31 18:00:00.000000000 -0600
+++ sysbk-1.0-blw/files/mod/postgres.bk	2004-03-09 09:42:28.000000000 -0700
@@ -0,0 +1,70 @@
+DIR_PREFIX="postgres"
+export PGPASSWORD="$POSTGRES_ROOTPW"
+
+if [ "$POSTGRES_BK" = "1" ]; then
+echo "Performing PostgreSQL backup "
+echo "Performing PostgreSQL backup " >> $QLOG
+echo -n "     Stage 1 PostgreSQL backup:"
+echo -n "     Stage 1 PostgreSQL backup:" >> $QLOG
+
+$POSTGRES_INIT stop >> /dev/null 2>&1
+if [ -f "$POSTGRES_PID" ]; then
+        $POSTGRES_INIT stop >> /dev/null 2>&1
+        sleep 2
+        if [ -f "$POSTGRES_PID" ]; then
+                echo_fail
+                echo "PostgreSQL could not be shutdown, aborting..."
+                echo "PostgreSQL could not be shutdown, aborting..." >> $QLOG
+                postbk
+                exit 1
+        fi
+fi
+
+SIM_CRON=`cat /etc/crontab | grep sim`
+if [ -f "/usr/local/sim/sim" ] && [ ! "$SIM_CRON" == "" ]; then
+        chmod 000 /usr/local/sim/sim
+        SIM_OFF="1"
+fi
+
+
+arc $POSTGRES_PATH full-postgres postgres
+
+
+echo "     Stage 2 PostgreSQL backup:"
+echo "     Stage 2 PostgreSQL backup:" >> $QLOG
+$POSTGRES_INIT start >> /dev/null 2>&1
+sleep 1
+POSTGRES_RVAL=`ps -auxww | grep postmaster | grep -v grep`
+if [ "$POSTGRES_RVAL" = "" ] && [ ! -f "$POSTGRES_PID" ]; then
+        echo_fail
+        echo "PostgreSQL could not be started, aborting..."
+        echo "PostgreSQL could not be started, aborting..." >> $QLOG
+        postbk
+        exit 1
+elif [ "$POSTGRES_RVAL" = "" ]; then
+        echo_fail
+        echo "PostgreSQL could not be started, aborting..."
+        echo "PostgreSQL could not be started, aborting..." >> $QLOG
+        postbk
+        exit 1
+fi
+if [ "$SIM_OFF" == "1" ]; then
+        chmod 755 /usr/local/sim/sim >> /dev/null 2>&1
+        SIM_OFF="0"
+fi
+sleep 1
+
+POSTGRES_USRDB=`psql -U sa -l | cut -d \| -f 1 -s - | cut -c2- - | sed 's/^ *//;s/ *$//'`
+for i in $POSTGRES_USRDB; do
+
+if [ "$i" != "Name" ]; then
+
+        echo -n "       Dumping database $i: "
+        echo -n "       Dumping database $i: " >> $QLOG
+        $NICE -n $PRI $POSTGRES_DUMP -U$POSTGRES_USER $i > $BACKUP_PATH/$DATE/$i.sql
+        arc $BACKUP_PATH/$DATE/$i.sql $i.sql
+        rm -f $BACKUP_PATH/$DATE/$i.sql
+
+fi
+done
+fi
