Compare commits

...

2 Commits

Author SHA1 Message Date
92e53232dc Update README 2025-10-08 04:33:35 -04:00
e583ca1aa0 Update README.md 2025-10-08 04:00:04 -04:00

View File

@@ -1,6 +1,8 @@
# Oracle Clone Script
This script (`oracle_clone.sh`) performs a clone of an Oracle database using the Rubrik CDM API.
Created by James Pattinson (Rubrik PS) October 2025 for Die Mobiliar
This script (`oracle_clone.sh`) performs a clone of an Oracle database using the Rubrik CDM API. it integrates with the scripting already present at Die Mobiliar for orchestrating Oracle backup and recovery management.
## Usage
@@ -13,7 +15,7 @@ This script (`oracle_clone.sh`) performs a clone of an Oracle database using the
## Options
- `-h <dbhost>` Source DB hostname
- `-h <dbhost>` Source DB hostname (if source SID is not unique)
- `-t <timestamp>` Recovery point timestamp (`"YYYY-MM-DD HH:MM:SS"`, uses latest if not specified)
- `-n <newsid>` New database SID for the clone
- `-p <pfilepath>` Custom pfile for the clone
@@ -55,3 +57,21 @@ RSC_HOST=customername.my.rubrik.com
```
This will clone the `orcl` database from `dbhost01` to `targethost`, using the specified timestamp, new SID `CLONE01`, only include `PDB$SEED`, `PDB1`, and `PDB2`, and use 8 RMAN channels for the operation.
```bash
./oracle_clone.sh -n CLNONE -a AUDIT_FILE_DEST,/u01/app/oracle/admin/CLNONE/adump \
-a DB_FILE_NAME_CONVERT,"'SHED','CLNONE'" -a DB_CREATE_FILE_DEST,/u01/app/oracle/oradata/CLNONE/ \
-a CONTROL_FILES,"'/u01/app/oracle/oradata/CLNONE/control01.ctl, /u01/app/oracle/fast_recovery_area/CLNONE/control02.ctl'" \
-b PDBXYZ,PDBABC SHED pve-ora19c-3
```
Uses the latest available Point-in-Time of the source `SHED` and clones to a new database `CLNONE` on the target host `pve-ora19c-3`. The Advanced Cloning Options are present:
```
AUDIT_FILE_DEST = /u01/app/oracle/admin/CLNONE/adump
DB_FILE_NAME_CONVERT = 'SHED','CLNONE'
DB_CREATE_FILE_DEST = /u01/app/oracle/oradata/CLNONE/
CONTROL_FILES = '/u01/app/oracle/oradata/CLNONE/control01.ctl, /u01/app/oracle/fast_recovery_area/CLNONE/control02.ctl'
```
Additionally, only PDBs `PDBXYZ` and `PDBABC` will be cloned.