Exporting an Oracle APEX application manually is a straightforward and essential task for developers who want to create backups, move applications between environments, or share their work. Oracle APEX provides an easy-to-use interface that allows you to export the full application definition, including pages, components, and supporting objects, into a single SQL script file. This manual export process ensures you can safely preserve your application and deploy it elsewhere whenever needed. In this blog, we explain the step-by-step procedure for manually exporting your APEX application.How to Export an APEX Application Manually
-
Log in to Oracle APEX
Access your APEX workspace through the web interface using your credentials. -
Navigate to App Builder
Click on the App Builder icon to list your applications. -
Select Your Application
Click the application you want to export to open its management page. -
Open Export / Import Menu
In the left sidebar, click Export / Import. -
Choose Export
Select the Export option to start the export wizard. -
Set Export Options
-
File Format: Choose between SQL (default) or JSON format.
-
Include Supporting Objects: Enable this if your app uses custom tables, packages, or seed data you want to export along with the application.
-
Skip Application Export Date: Optional, to make the export file reusable without changing export timestamps.
-
-
Export the Application
Click Export to generate the SQL file. The browser will download the.sql
file automatically. Save and Store Safely
Keep the exported file in a secure location, ideally under version control.
Best Practices for Manual Export
-
Export regularly, especially before making major changes or upgrades.
-
Use descriptive file names that include application ID, version, and date.
-
Always include supporting objects unless you are sure they exist in the target environment.
-
Test importing the exported file in a development workspace to verify completeness.
-
Use version control systems like Git to track changes to exported files.
Document your export and import procedures for team consistency.
Notes:
Go to APEX App Builder and open your application.
Navigate to Utilities > Export/Import > Export.
Choose Export Application Definition.
Select Export Supporting Objects (if applicable).
Click Export, then download and store the .sql file securely.
For scheduling backups via SQL, use:
BEGIN
APEX_EXPORT.GET_APPLICATION (
p_application_id => 100,
p_filename => 'app_100_backup.sql'
);
END;
This can be automated using Oracle Scheduler.Backing up the Entire APEX Workspace
Best Practice: Backup Everything, Not Just the App
While application backups include pages and logic, a full workspace backup includes:
Users & Authentication Settings
RESTful Web Services
Workspace-Level Configurations
How to Export an APEX Workspace
Go to APEX Administration.
Navigate to Manage Workspaces > Export Workspace.
Select the workspace and click Export.
Download the .sql file.
Backing up the Underlying Database
Best Practice: Full Database Backup
Since APEX apps rely on Oracle Database objects (tables, views, packages, etc.), always back up the APEX schema and associated database objects.
Methods to Backup the Database
Using Oracle Data Pump (Preferred)
expdp username/password@db schemas=APEX_SCHEMA dumpfile=apex_backup.dmp logfile=apex_backup.log
This method captures all APEX-related tables, PL/SQL, and configurations.
Using RMAN (For Full Database Backup)
RMAN> BACKUP DATABASE FORMAT '/backup/apex_full_%U.bak';
This ensures a full database recovery in case of failure.
Storing Backups Securely
Best Practice: Keep Backups in Multiple Locations
On-Premise Storage: Save local copies for quick restores.
Cloud Storage: Store backups on Oracle Cloud, AWS S3, or Google Drive.
Version Control (GitHub, GitLab, Bitbucket): Store exported .sql backups under version control.
Example backup folder structure:
/backups/
├── daily/
│ ├── app_100_backup_20240310.sql
│ ├── db_apex_schema_20240310.dmp
├── weekly/
├── monthly/
Enabling Flashback and Undo for Data Recovery
Best Practice: Use Oracle Flashback to Restore Data
Enable Flashback Query to retrieve previous states of tables without requiring a backup restore.
SELECT * FROM USCG_DATA AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL '1' DAY);
This can be a lifesaver for quick data recovery.
Testing Restores Regularly
Best Practice: Verify That Your Backups Work
Regularly import backups into a test APEX instance.
Validate that all pages, components, and database objects work correctly.
To restore an application:
Go to App Builder > Import.
Select the backup .sql file.
Choose Install Application.
For database recovery:
impdp username/password@db schemas=APEX_SCHEMA dumpfile=apex_backup.dmp logfile=restore.log
Official Oracle APEX Documentation
Conclusion
Manually exporting your Oracle APEX application is a simple but critical step in application lifecycle management. This process ensures you have a reliable backup and a portable version of your app that can be shared or migrated to different environments. By following the step-by-step method and adhering to best practices such as regular exports, including supporting objects, and version control, you can safeguard your development efforts and maintain smooth deployment workflows.