Update README
This commit is contained in:
26
README.md
26
README.md
@@ -19,17 +19,39 @@ This script (`oracle_clone.sh`) performs a clone of an Oracle database using the
|
|||||||
- `-p <pfilepath>` Custom pfile for the clone
|
- `-p <pfilepath>` Custom pfile for the clone
|
||||||
- `-a <key,value>` Advanced Cloning Options (can be used multiple times)
|
- `-a <key,value>` Advanced Cloning Options (can be used multiple times)
|
||||||
- `-b <pdb1,pdb2>` Comma-separated list of PDBs to clone (include only these PDBs. `PDB$SEED` is always included)
|
- `-b <pdb1,pdb2>` Comma-separated list of PDBs to clone (include only these PDBs. `PDB$SEED` is always included)
|
||||||
|
- `-c <channels>` Number of RMAN channels to use (sets `numChannels` in the API payload)
|
||||||
- `-d` Dry run mode - show API payload without executing
|
- `-d` Dry run mode - show API payload without executing
|
||||||
|
|
||||||
|
## Configuration (`rbk_api.conf`)
|
||||||
|
|
||||||
|
Before running the script, you must configure Rubrik API access in the `rbk_api.conf` file (located in the same directory). This file should define the following variables:
|
||||||
|
|
||||||
|
- `RUBRIK_IP`: The IP address or DNS name of your Rubrik CDM cluster.
|
||||||
|
- `ID`: The service account ID or user credential for API authentication.
|
||||||
|
- `SECRET`: The secret or password for the service account/user.
|
||||||
|
- `RSC_HOST`: API endpoint host for SLA modification and other GraphQL calls
|
||||||
|
|
||||||
|
**Example `rbk_api.conf`:**
|
||||||
|
```properties
|
||||||
|
RUBRIK_IP=<cdm IP address>
|
||||||
|
ID="client|your-service-account-id"
|
||||||
|
SECRET=your-service-account-secret
|
||||||
|
RSC_HOST=customername.my.rubrik.com
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Note:** Do not share your `rbk_api.conf` file or secrets publicly.
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- The script requires access to the Rubrik API and expects the supporting functions `oracle_funcs.sh` to be present in the same directory.
|
- 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.
|
- Time is passed to `date` on the local machine and uses the local timezone.
|
||||||
|
- If `-b` is specified, the script will print the list of PDBs included in the clone.
|
||||||
|
- The `-c` option allows you to specify the number of RMAN channels to use for the clone operation. This is passed as `numChannels` in the API payload.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./oracle_clone.sh -h dbhost01 -t "2024-06-01 12:00:00" -n CLONE01 -b PDB1,PDB2 orcl targethost
|
./oracle_clone.sh -h dbhost01 -t "2024-06-01 12:00:00" -n CLONE01 -b PDB1,PDB2 -c 8 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`.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user