diff --git a/utils/postgresql/DBExport.bat b/utils/postgresql/DBExport.bat index bfc598e780..c60ed30695 100644 --- a/utils/postgresql/DBExport.bat +++ b/utils/postgresql/DBExport.bat @@ -9,7 +9,9 @@ @Rem Must have parameter: userAccount @if (%1) == () goto usage +@set PGPASSWORD=%2 pg_dump -U %1 %ADEMPIERE_DB_NAME% > %ADEMPIERE_HOME%\data\ExpDat.dmp +@set PGPASSWORD= @cd %ADEMPIERE_HOME%\Data @jar cvfM ExpDat.jar ExpDat.dmp diff --git a/utils/postgresql/DBExport.sh b/utils/postgresql/DBExport.sh index 145618aec9..75c1bc2f42 100644 --- a/utils/postgresql/DBExport.sh +++ b/utils/postgresql/DBExport.sh @@ -18,7 +18,9 @@ if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ] exit 1 fi +export PGPASSWORD=$2 pg_dump -U $1 $ADEMPIERE_DB_NAME > $ADEMPIERE_HOME/data/ExpDat.dmp +export PGPASSWORD= cd $ADEMPIERE_HOME/data jar cvfM ExpDat.jar ExpDat.dmp ExpDat.log