Stop-VEPSQLInstanceRestore
Short Description
Stops the restore process for backed-up PostgreSQL instances.
Applies to
Veeam Backup & Replication
Product Edition: Community, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
Stop-VEPSQLInstanceRestore [-InstanceRestore] <VEPSQLInstanceRestore> [-Force] [<CommonParameters>] |
Detailed Description
This cmdlet stops an active restore process started for a PostgreSQL instance.
Parameters
Parameter | Description | Type | Required | Position | Accept Pipeline Input |
---|---|---|---|---|---|
InstanceRestore | Specifies the PostgreSQL instance restore process. The cmdlet will stop this restore process. | Accepts the VEPSQLInstanceRestore object. To get this object, run the Get-VEPSQLInstanceRestore cmdlet. | True | 0 | True |
Force | Defines that the cmdlet will show no prompt before executing the command. | SwitchParameter | False | Named | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.
Example
This example shows how to stop the restore process for a PostgreSQL instance.
$session = Get-VEPSQLRestoreSession $instance = Get-VEPSQLInstance -Session $session[0] -DataDirectory /var/lib/pgsql/13/data $restore = Get-VEPSQLInstanceRestore -InstanceName $instance Stop-VEPSQLInstanceRestore -InstanceRestore $restore |
Perform the following steps:
- Run the Get-VEPSQLRestoreSession cmdlet. Save the result to the $session variable.
The Get-VEPSQLRestoreSession cmdlet will return an array of restore sessions. Mind the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.
- Run the Get-VEPSQLInstance cmdlet. Set the $session variable as the Session parameter value. Specify the DataDirectory parameter value. Save the result to the $instance variable.
- Run the Get-VEPSQLInstanceRestore cmdlet. Set the $instance variable as the InstanceName parameter value. Save the result to the $restore variable.
- Run the Stop-VEPSQLInstanceRestore cmdlet. Set the $restore variable as the InstanceRestore parameter value.
Related Commands