# Oracle Clone Script This script (`oracle_clone.sh`) performs a clone of an Oracle database using the Rubrik CDM API. ## Usage ```bash ./oracle_clone.sh [options] ``` - ``: Source Oracle database SID. - ``: Target hostname for the clone. ## Options - `-h ` Source DB hostname - `-t ` Recovery point timestamp (`"YYYY-MM-DD HH:MM:SS"`, uses latest if not specified) - `-n ` New database SID for the clone - `-p ` Custom pfile for the clone - `-a ` Advanced Cloning Options (can be used multiple times) - `-b ` Comma-separated list of PDBs to clone (include only these PDBs. `PDB$SEED` is always included) - `-d` Dry run mode - show API payload without executing ## Notes - The script requires access to the Rubrik API and expects the supporting functions `oracle_funcs.sh` to be present in the same directory. - Time is passed to `date` on the local machine and uses the local timezone. ## Example ```bash ./oracle_clone.sh -h dbhost01 -t "2024-06-01 12:00:00" -n CLONE01 -b PDB1,PDB2 orcl targethost ``` This will clone the `orcl` database from `dbhost01` to `targethost`, using the specified timestamp, new SID `CLONE01`, and only include `PDB$SEED`, `PDB1`, and `PDB2`.