Set-VEPSQLInstanceInstantRecovery
Short Description
Modifies switchover settings for a specified PostgreSQL instance.
Product: Veeam Backup & Replication
Product Edition: Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Set-VEPSQLInstanceInstantRecovery [-Instance] <VEPSQLInstanceInstantRecovery> [-SwitchOverOptions] <VEPSQLIRSwitchOverOptions> [<CommonParameters>] |
Detailed Description
This cmdlet allows you to modify the switchover settings for a specified PostgreSQL instance.
Important |
|
You can only modify the switchover settings until the moment switchover is automatically triggered (if the |
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
Instance |
Specifies a published PostgreSQL instance within an instant recovery session.
Accepts the |
True |
0 |
True (ByValue) |
|
|
SwitchOverOptions |
Specifies a new switchover option for the specified PostgreSQL instance.
Accepts the |
True |
1 |
True (ByValue) |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.
Examples
Setting Scheduled Switchover for PostgreSQL Instance
This example shows how to modify the scheduled switchover for the rhel01:5433 instance. The switchover will be performed in the Scheduled mode - on 2026-7-24 at 13:00:00 in the time zone of the backup server.
|
$time = Get-Date -Date "2026-7-24 13:00:00" $TimeUtc = $time.ToUniversalTime() $ScheduledSwitch = New-VEPSQLIRSwitchOverOptions -Scheduled -SwitchingTimeUtc $TimeUtc $IRInstance = Get-VEPSQLInstanceInstantRecovery -InstanceName "rhel01:5433" Set-VEPSQLInstanceInstantRecovery -Instance $IRInstance -SwitchOverOptions $ScheduledSwitch |
Perform the following steps:
- Run the
Get-Datecmdlet and specify the date and time when the switchover must be performed. Save the result to the$timevariable. - Use the
ToUniversalTime()method to convert the date and time to the UTC format. Save the result to the$TimeUtcvariable. - Run the
New-VEPSQLIRSwitchoverOptionsDefines the switchover option that you can apply to the instant recovery session of a PostgreSQL instance. cmdlet. Provide theScheduledparameter. Set the$TimeUtcvariable as theSwitchingTimeUtcparameter value. Save the result to the$ScheduledSwitchvariable. - Run the
Get-VEPSQLInstanceInstantRecoveryReturns PostgreSQL instances that are published within an instant recovery session. cmdlet. Specify theInstanceNameparameter value. Save the result to the$IRInstancevariable. - Run the
Set-VEPSQLInstanceInstantRecoverycmdlet. Set the$IRInstanceas theInstanceparameter value. Set the$ScheduledSwitchvariable as theSwitchOverOptionsparameter value.
Related Commands
New-VEPSQLIRSwitchOverOptionsDefines the switchover option that you can apply to the instant recovery session of a PostgreSQL instance.Get-VEPSQLInstanceInstantRecoveryReturns PostgreSQL instances that are published within an instant recovery session.Get-Date