Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore Oracle Database with additional parameter. #238

Merged
merged 5 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 157 additions & 48 deletions docs/cmdlets-reference/restore-cohesityoracledatabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,47 @@ From cluster restores the specified Oracle database from a previous backup.
## SYNTAX

```
Restore-CohesityOracleDatabase [[-TaskName] <String>] [-SourceName] <String> [-SourceDatabaseName] <String>
[-OracleHome] <String> [-OracleBase] <String> [-TargetSourceId] <Int64> [-JobId] <Int64> [[-JobRunId] <Int64>]
[[-CaptureTailLogs] <String>] [[-NewDatabaseName] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Restore-CohesityOracleDatabase [[-CaptureTailLogs] <String>] [[-DatabaseFileDestination] <String>] [[-JobId] <Long>] [[-JobRunId] <Long>] [[-NewDatabaseName] <String>] [[-NumRedoLogGroup] <Long>] [[-NumTempFiles] <Long>] [[-OracleBase] <String>] [[-OracleHome] <String>] [[-RedoLogMemberPath] <String[]>] [[-RedoLogSizeInMb] <Long>] [[-RedoLogMemberPrefix] <String>] [[-SourceDatabaseName] <String>] [[-SourceName] <String>] [[-TargetSourceId] <Long>] [[-TaskName] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
From cluster restores the specified Oracle database from a previous backup.
From cluster restores the specified Oracle database from a latest recoverable or specified backup.

## EXAMPLES

### EXAMPLE 1
```
Restore-CohesityOracleDatabase -SourceName 10.2.14.31 -TargetSourceId 1277 -JobId 31520 -TargetHostId 770 -NewDatabaseName CohesityDB_r1
Restore-CohesityOracleDatabase -SourceName "x.x.x.x" -TargetSourceId 123 -JobId 456 -SourceDatabaseName "database_1" -OracleHome "/u01/app/oracle/product/19c/db_1" -OracleBase "/u01/app/oracle" -DatabaseFileDestination "/u01/app/oracle/product" -NewDatabaseName "database_new"
```

Restore oracle database "database_1" with latest snapshot in specified database file destination in the target oracle source with an id 123

### EXAMPLE 2
```
Restore-CohesityOracleDatabase -SourceName "x.x.x.x" -TargetSourceId 123 -JobId 456 -SourceDatabaseName "database_1" -OracleHome "/u01/app/oracle/product/19c/db_1" -OracleBase "/u01/app/oracle" -NewDatabaseName "database_new" -JobRunId 789
```

Restore Oracle database from cluster with database id 1279 , database instance id 1277 and job id as 31520
Restore oracle database "database_1" with mentioned job run id, in the target oracle source with an id 123

### EXAMPLE 3
```
Restore-CohesityOracleDatabase -SourceName "x.x.x.x" -TargetSourceId 1 -JobId 456 -SourceDatabaseName "database_1" -OracleHome "/u01/app/oracle/product/19c/db_1" -OracleBase "/u01/app/oracle"
```

Restore oracle database "database_1" to an original location

### EXAMPLE 4
```
Restore-CohesityOracleDatabase -SourceName "x.x.x.x" -TargetSourceId 123 -JobId 456 -SourceDatabaseName "database_1" -OracleHome "/u01/app/oracle/product/19c/db_1" -OracleBase "/u01/app/oracle" -NewDatabaseName "database_new" -JobRunId 789 -NumRedoLogGroup 2 -RedoLogSizeInMb 21 -RedoLogMemberPath /u01,/u01/app -RedoLogMemberPrefix "test" -NumTempFiles 5
```

Restore oracle database "database_1" with mentioned job run id, in the target oracle source with an id 123 with specified redo log group settings

## PARAMETERS

### -TaskName
Specifies the name of the restore task.
### -CaptureTailLogs
Specifies if the tail logs are to be captured before the restore operation.
This is only applicable if restoring the database to its hosting Protection Source and the database is not being renamed.

```yaml
Type: String
Expand All @@ -35,140 +55,138 @@ Aliases:

Required: False
Position: 1
Default value: "Restore-Oracle-Object-" + (Get-Date -Format "dddd-MM-dd-yyyy-HH-mm-ss").ToString()
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SourceName
Specifies the source name of the Oracle database to restore.
This can be obtained using Get-CohesityProtectionSource -Environments kOracle.
### -DatabaseFileDestination
Location to put the database files(datafiles, logfiles etc.).

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: 2
Default value: None
Default value: ORACLE_HOME
Accept pipeline input: False
Accept wildcard characters: False
```

### -SourceDatabaseName
Specifies a name of the database to recover.
### -JobId
Specifies the job id that backed up this Oracle instance and will be used for this restore.

```yaml
Type: String
Type: Int64
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```

### -OracleHome
Specifies the Oracle home directory path.
### -JobRunId
Specifies the job run id that captured the snapshot for this Oracle instance.
If not specified the latest run is used.
This field must be set if restoring to a different target host.

```yaml
Type: String
Type: Int64
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: 4
Default value: None
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```

### -OracleBase
Specifies the Oracle base directory path.
### -NewDatabaseName
Specifies a new name for the restored database.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -TargetSourceId
Specifies the id of Oracle source id to restore the database.
### -NumRedoLogGroup
Number of redo log groups.

```yaml
Type: Int64
Type: Long
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: 6
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```

### -JobId
Specifies the job id that backed up this Oracle instance and will be used for this restore.
### -NumTempFiles
How many tempfiles to use for the recovered database.

```yaml
Type: Int64
Type: Long
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: 7
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```

### -JobRunId
Specifies the job run id that captured the snapshot for this Oracle instance.
If not specified the latest run is used.
This field must be set if restoring to a different target host.
### -OracleBase
Specifies the Oracle base directory path.

```yaml
Type: Int64
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Required: True
Position: 8
Default value: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -CaptureTailLogs
Specifies if the tail logs are to be captured before the restore operation.
This is only applicable if restoring the database to its hosting Protection Source and the database is not being renamed.
### -OracleHome
Specifies the Oracle home directory path.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Required: True
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -NewDatabaseName
Specifies a new name for the restored database.
### -RedoLogMemberPath
List of members of this redo log group.

```yaml
Type: String
Type: String[]
Parameter Sets: (All)
Aliases:

Expand All @@ -179,6 +197,97 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -RedoLogSizeInMb
Size of the member in MB.

```yaml
Type: Long
Parameter Sets: (All)
Aliases:

Required: False
Position: 11
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -RedoLogMemberPrefix
Log member name prefix.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 12
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SourceDatabaseName
Specifies a name of the database to recover.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 13
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SourceName
Specifies the source name of the Oracle database to restore.
This can be obtained using Get-CohesityProtectionSource -Environments kOracle.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -TaskName
Specifies the name of the restore task.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 15
Default value: "Restore-Oracle-Object-" + (Get-Date -Format "dddd-MM-dd-yyyy-HH-mm-ss").ToString()
Accept pipeline input: False
Accept wildcard characters: False
```

### -TargetSourceId
Specifies the id of Oracle source id to restore the database.

```yaml
Type: Int64
Parameter Sets: (All)
Aliases:

Required: True
Position: 16
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Expand Down
1 change: 1 addition & 0 deletions docs/sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
- [Find-CohesityRemoteFileSnapshot](cmdlets-reference/find-cohesityremotefilesnapshot.md)
- [Find-CohesityObjectsForRestore](cmdlets-reference/find-cohesityobjectsforrestore.md)
- [Restore-CohesityMSSQLObject](cmdlets-reference/restore-cohesitymssqlobject.md)
- [Restore-CohesityOracleDatabase](cmdlets-reference/restore-cohesityoracledatabase.md)
- [Restore-CohesityRemoteMSSQLObject](cmdlets-reference/restore-cohesityremotemssqlobject.md)
- [Restore-CohesityVMwareVM](cmdlets-reference/restore-cohesityvmwarevm.md)
- [Restore-CohesityHyperVVM](cmdlets-reference/restore-cohesityhypervvm.md)
Expand Down
Loading
Loading