Improve windows scripts - backup with date/time
This commit is contained in:
parent
a6668e11b9
commit
71a32a5f67
|
@ -17,5 +17,5 @@ goto START
|
|||
|
||||
:START
|
||||
@"%JAVA%" -classpath lib\CInstall.jar; -DADEMPIERE_HOME=%ADEMPIERE_HOME% -Dant.home="." org.apache.tools.ant.launch.Launcher update
|
||||
@Rem Wait 10 second
|
||||
@PING 1.1.1.1 -n 1 -w 10000 > NUL
|
||||
@Rem Sleep 10
|
||||
@CHOICE /C YN /T 10 /D N > NUL
|
|
@ -51,4 +51,5 @@ set ADEMPIERE_HOME=%~dp0..
|
|||
:START
|
||||
@"%JAVA%" -Xms32m -Xmx512m -DADEMPIERE_HOME=%ADEMPIERE_HOME% %PROP% %SECURE% -classpath "%CLASSPATH%" org.compiere.Adempiere
|
||||
|
||||
@sleep 15
|
||||
@Rem @sleep 15
|
||||
@CHOICE /C YN /T 15 /D N > NUL
|
|
@ -11,5 +11,5 @@
|
|||
@Echo If the following statement fails, fix your environment
|
||||
IF (%ADEMPIERE_HOME%) == () (CALL myDBcopy.bat) else (CALL %ADEMPIERE_HOME%\utils\myDBcopy.bat)
|
||||
|
||||
@Echo Sleeping ... (remove command if you are on XP)
|
||||
@sleep 60
|
||||
@Rem Sleep 60
|
||||
@CHOICE /C YN /T 60 /D N > NUL
|
|
@ -6,4 +6,5 @@
|
|||
@CALL %ADEMPIERE_DB_PATH%\Start.bat
|
||||
@Echo Done starting database %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
|
||||
|
||||
@sleep 60
|
||||
@Rem Sleep 60
|
||||
@CHOICE /C YN /T 60 /D N > NUL
|
|
@ -6,4 +6,5 @@
|
|||
@CALL %ADEMPIERE_DB_PATH%\Stop.bat
|
||||
@Echo Done stopping database %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
|
||||
|
||||
@sleep 60
|
||||
@Rem Sleep 60
|
||||
@CHOICE /C YN /T 60 /D N > NUL
|
|
@ -25,6 +25,7 @@
|
|||
@Echo Apps Server start of %ADEMPIERE_APPS_TYPE% not supported
|
||||
|
||||
:END
|
||||
@Sleep 60
|
||||
@Exit
|
||||
@Rem Sleep 60
|
||||
@CHOICE /C YN /T 60 /D N > NUL
|
||||
|
||||
@Exit
|
|
@ -22,5 +22,7 @@ Call shutdown --server=jnp://%ADEMPIERE_APPS_SERVER%:%ADEMPIERE_JNP_PORT% --shut
|
|||
@Echo Apps Server stop of %ADEMPIERE_APPS_TYPE% not supported
|
||||
|
||||
:END
|
||||
@sleep 30
|
||||
@Rem Sleep 30
|
||||
@CHOICE /C YN /T 30 /D N > NUL
|
||||
|
||||
@Exit
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
@Echo Modify the script myDBcopy to copy the database backup
|
||||
|
||||
@Rem This example creates one inique file per day in a month
|
||||
@Rem This example creates one unique file per day in a month
|
||||
@Rem You may want to copy it to another disk first
|
||||
@Rem Note that the %DATE% parameter is local specific.
|
||||
@Rem In Germany, it is %DATE:~3,2%
|
||||
|
@ -12,10 +12,12 @@
|
|||
@Rem %ADEMPIERE_HOME%\data\ExpDat.log
|
||||
@Rem %ADEMPIERE_HOME%\data\ExpDat.jar (containing the above)
|
||||
|
||||
@Echo Creating ExpDat_%DATE:~7,2%.jar
|
||||
jar cvfM ExpDat_%DATE:~7,2%.jar %ADEMPIERE_HOME%\data\ExpDat.dmp
|
||||
@dir ExpDat_%DATE:~7,2%.jar
|
||||
@set DATETIME=%date:~6,4%%date:~3,2%%date:~0,2%_%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%
|
||||
@Echo Creating ExpDat_%DATETIME%.jar
|
||||
ren ExpDat.jar ExpDat%DATETIME%.jar
|
||||
@dir ExpDat%DATETIME%.jar
|
||||
|
||||
@Echo Copy comes here ...
|
||||
@Echo copy %ADEMPIERE_HOME%\data\ExpDat%DATETIME%.jar to backup media
|
||||
|
||||
@sleep 30
|
||||
@Rem Sleep 30
|
||||
@CHOICE /C YN /T 30 /D N > NUL
|
|
@ -5,3 +5,4 @@ DATE=`date +%Y%m%d_%H%M%S`
|
|||
mv $ADEMPIERE_HOME/data/ExpDat.jar $ADEMPIERE_HOME/data/ExpDat$DATE.jar
|
||||
echo copy $ADEMPIERE_HOME/data/ExpDat$DATE.jar to backup media
|
||||
|
||||
sleep 30
|
|
@ -10,7 +10,7 @@
|
|||
@Rem Must have parameter: userAccount
|
||||
@if (%1) == () goto usage
|
||||
|
||||
@Rem Clanup
|
||||
@Rem Cleanup
|
||||
@sqlplus %1/%2@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
|
||||
|
||||
@Rem The Export
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
@Rem Must have parameter: userAccount
|
||||
@if (%1) == () goto usage
|
||||
|
||||
@Rem Clanup
|
||||
@Rem Cleanup
|
||||
@sqlplus %1/%2@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
|
||||
|
||||
@Rem The Export
|
||||
|
|
Loading…
Reference in New Issue