Search This Blog

Showing posts with label HOW DO I Backup an Oracle APEX Application in ORACLE APEX. Show all posts
Showing posts with label HOW DO I Backup an Oracle APEX Application in ORACLE APEX. Show all posts

Sunday, July 13, 2025

HOW DO I Backup an Oracle APEX Application in ORACLE APEX

Backing up your Oracle APEX application is one of the most important steps you can take to protect your development work. Whether you're preparing for a migration, safeguarding against data loss, or maintaining version control, exporting your application ensures that all components—pages, logic, shared components, and settings—are preserved in a single, portable file. Oracle APEX offers multiple options for exporting applications, including browser-based tools, command-line utilities, and developer tools like SQL Developer. This guide explains how to back up your APEX application efficiently and reliably.

How to Backup an Oracle APEX Application in Detail

  1. Exporting from the APEX Interface (GUI)

    • Navigate to App Builder.

    • Click the application you want to back up.

    • From the side menu, click Export / Import, then Export.

    • Choose options:

      • Export Format: SQL (default) or JSON

      • Include Supporting Objects: Select this if your app depends on packages, tables, or seed data

    • Click Export to generate and download a .sql file containing the full application definition.

  2. Exporting with SQL Developer

    • Open Oracle SQL Developer.

    • Connect to your APEX workspace schema.

    • In the APEX view, locate the application.

    • Right-click and select Export.

    • Save the generated .sql file locally.

  3. Using the APEXExport Command-Line Tool
    Ideal for scheduled backups or automation pipelines:

    java oracle.apex.APEXExport -db <connection_string> -user <schema_user> -password <password> -applicationid <APP_ID>
    
    • The export will create a file named f<APP_ID>.sql

    • Useful for continuous integration or nightly backups.

  4. Export from APEX Administration (Instance Admin Only)

    • Navigate to Administration Services → Manage Applications → Export.

    • Select individual apps or export all applications in a workspace.

    • This method allows batch export with or without supporting objects.

Best Practices for Backing Up APEX Applications

  • Schedule Regular Backups
    Automate daily or weekly exports using APEXExport or database jobs.

  • Use Version Control
    Store your .sql exports in Git or SVN with proper commit messages to track changes.

  • Include Supporting Objects
    When exporting, include packages, procedures, and reference tables to ensure complete restoration capability.

  • Use Clear Naming Conventions
    Name files with app ID, version, and date:

    f100_customer_portal_v1_2025_07_13.sql
    
  • Verify Restorability
    Occasionally test imports in a development workspace to ensure your backups are working as expected.

 Example 1

Step 1: Exporting an APEX Application

  1. Log into Oracle APEX and navigate to your workspace.

  2. Go to App Builder and select the application you want to back up.

  3. Click on Utilities > Export/Import > Export.

  4. Under Export options: 

    • Export Application Definition: Select this to back up the entire application.

    • Export Supporting Objects: Choose this if you also need related files.

    • Include Application Export Compatibility Mode (choose the latest APEX version).

  5. Click Export and download the .sql file. 

    • This file contains all components of your application and can be used to restore or move it to another instance.


Step 2: Importing a Backup to Restore an APEX Application

If you need to restore your application from a backup:

  1. Go to App Builder > Import.

  2. Select the previously exported .sql file.

  3. Click Next, then select Install Application.

  4. Choose Replace existing application if updating an app or Install as new application to create a separate copy.

Click Install to restore your application.

Oracle APEX Documentation Links

Conclusion

Backing up your Oracle APEX application is quick, effective, and essential for responsible development. Whether you're working in a local workspace or managing multiple environments, having consistent and restorable backups gives you peace of mind. Use the built-in APEX export options or command-line tools depending on your workflow, and follow best practices like naming conventions and version control. With a reliable backup process in place, you’ll protect your app—and your time—from unexpected issues or data loss.

 

How Do I Make a Faceted Search Map Page in Oracle APEX

Combining faceted search with a map region in Oracle APEX enables users to filter data visually and spatially at the same time. This design ...