Oracle Data Pump port (snapshot/restore)
What was done
Ported bin/snapshot.sh and bin/restore.sh to Oracle using Data Pump
(expdp/impdp), closing the last engine for the snapshot/restore tooling.
The port
snapshot.sh(oracle) — exports as SYSTEM (ORACLE_PASSWORD) because the schema owner carries onlyDB_DEVELOPER_ROLEand cannot read theDATA_PUMP_DIRdirectory object.expdp SCHEMAS=keycloakwrites the dump into a GUID-named subdirectory ofDATA_PUMP_DIRinside the container; the script locates it (find /opt/oracle/admin) anddocker compose cp's it out tosnapshots/<name>.dump.restore.sh(oracle) —DROP USER keycloak CASCADE, recreate it exactly as the gvenzl image does (DB_DEVELOPER_ROLE,USERStablespace), copy the dump back in, thenimpdp SCHEMAS=keycloak EXCLUDE=USER TABLE_EXISTS_ACTION=REPLACE.EXCLUDE=USERavoids the benignORA-31684 user already exists(the user is pre-created so the password/grants survive, which a SCHEMA-only dump does not carry). An Oraclemodel_version(readkeycloak.migration_modelvia SYSTEM) preserves the no-re-migration gate.
Result
./bin/snapshot.sh baseline-oracle-test -> snapshots/baseline-oracle-test.dump (4.8M)
./bin/restore.sh baseline-oracle-test
==> restored schema reports model 26.7.3
==> ready
==> restored baseline-oracle-test — running 26.7.3, schema 26.7.3, no re-migration
Schema intact after restore: 100 tables, migration_model 26.7.3, 1 user.
Remaining Oracle item
- S4 DML-only — untested; a non-owner user needs synonyms under the user-is-schema model.