core-jgi/org.adempiere.server-feature/utils.unix/RUN_DBRestore.sh

21 lines
820 B
Bash
Raw Normal View History

#!/bin/sh
# $Id: RUN_DBRestore.sh,v 1.9 2005/01/22 21:59:15 jjanke Exp $
if [ "$IDEMPIERE_HOME" ]; then
cd "$IDEMPIERE_HOME"/utils || (echo "Cannot cd $IDEMPIERE_HOME/utils"; exit 1)
fi
export ID_ENV=Server
. ./myEnvironment.sh
echo Restore idempiere Database from Export- "$IDEMPIERE_HOME" \("$ADEMPIERE_DB_NAME"\)
echo Re-Create idempiere User and import "$IDEMPIERE_HOME"/data/ExpDat.dmp
echo "== The import will show warnings. This is OK =="
ls -lsa "$IDEMPIERE_HOME"/data/ExpDat.dmp
echo Press enter to continue ...
read -r _
# Parameter: <systemAccount> <adempiereID> <adempierePwd>
# globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle)
"$ADEMPIERE_DB_PATH"/DBRestore.sh "system/$ADEMPIERE_DB_SYSTEM" "$ADEMPIERE_DB_USER" "$ADEMPIERE_DB_PASSWORD" "$ADEMPIERE_DB_SYSTEM"