Skip to content

Backups

Create DataPump dumps of all users, with their APEX workspaces and applications:

Terminal window
local-26ai.sh backup-all

The script writes the files to the ./backups/export directory.

The command backs up every schema that has a <NAME>_USER_PASSWORD entry in .env. If a schema has no APEX workspace, the command skips the APEX part and continues. If a schema fails, the command shows a summary at the end and returns a non-zero exit code.

Back up a single schema with its workspace and applications:

Terminal window
local-26ai.sh backup-user movies

Each run writes three things:

  • ./backups/export/movies.dmp is the DataPump dump of the schema.
  • ./backups/export/apex/movies/ holds the workspace export and one file per application.
  • ./backups/export/ords/movies/rest_schema.sql holds the ORDS REST definitions.

The command keeps the dump of the previous run as movies_bkp.dmp. It rotates that file only after the new export succeeds.

Copy the files of a backup into ./backups/import. Then restore the schema:

Terminal window
local-26ai.sh import-backup movies

The command imports the DataPump dump, the APEX workspace, the applications and the ORDS definitions. If the schema does not exist, the command creates it first.

Restore every export file in the ./backups/import directory:

Terminal window
local-26ai.sh import-all

The command reads the <NAME>_USER_PASSWORD entries in .env and asks for confirmation. It then restores one schema after the other.