Oracle APEX backup script for Windows

Download APEX 4.2.2 from http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html

set DRIVE=F: set ORACLECLASSPATH=D:\app\product\11.2.0\client_1\jdbc\lib\ojdbc6.jar set UTILITYPATH=F:\Download\apex_4.2.2\apex\utilities set DBHOST=host:1521:db

set USER=wkspace_apex set PWD=password
 * 1) Change environment variables as needed
 * 2) Either APEX_040200 or workspace schema user

set WORKSPACEID=1260432179363693 set APPID=131
 * 1) If export by workspace or app ID

%DRIVE% cd %UTILITYPATH% set CLASSPATH=%CLASSPATH%;%ORACLECLASSPATH%;%UTILITYPATH%

java oracle.apex.APEXExport -db %DBHOST% -user %USER% -password %PWD% -instance
 * 1) Backup every Apps

java oracle.apex.APEXExport -db %DBHOST% -user %USER% -password %PWD% -workspaceid %WORKSPACEID%
 * 1) Backup all Apps in a workspace

java oracle.apex.APEXExport -db %DBHOST% -user %USER% -password %PWD% -applicationid %APPID%
 * 1) Backup only an App