Clone PostgreSQL cluster backups using PowerShell cmdlets
-
PDF of this doc site
-
Protect Microsoft SQL Server databases
-
Protect SAP HANA databases
-
Protect IBM Db2
-
Protect PostgreSQL
-
![](https://docs.netapp.com/common/images/pdf-zip.png)
Collection of separate PDF docs
Creating your file...
The clone workflow includes planning, performing the clone operation, and monitoring the operation.
You must have prepared the PowerShell environment to execute the PowerShell cmdlets.
The information regarding the parameters that can be used with the cmdlet and their descriptions can be obtained by running Get-Help command_name. Alternatively, you can also refer to the SnapCenter Software Cmdlet Reference Guide.
-
Initiate a connection session with the SnapCenter Server for a specified user by using the Open-SmConnection cmdlet.
PS C:\> Open-SmConnection
-
Retrieve the backups to perform the clone operation by using the Get-SmBackup cmdlet.
This example shows that two backups are available for cloning:
C:\PS> Get-SmBackup BackupId BackupName BackupTime BackupType -------- ---------- ---------- ---------- 1 Payroll Dataset_vise-f6_08... 8/4/2015 11:02:32 AM Full Backup 2 Payroll Dataset_vise-f6_08... 8/4/2015 11:23:17 AM
-
Initiate a clone operation from an existing backup and specify the NFS export IP addresses on which the cloned volumes are exported.
This example shows that the backup to be cloned has an NFSExportIPs address of 10.32.212.14:
For PostgreSQL cluster:
PS C:\> New-SmClone -AppPluginCode PostgreSQL -BackupName " scpostgresql01_ openenglab_netapp_com_PostgreSQL_postgres_5432_06-26-2024_00_33_41_1570" -Resources @{"Host"=" 10.32.212.13";"Uid"="postgres_5432"} -port 2345 -CloneToHost 10.32.212.14
If NFSExportIPs is not specified, the default is exported to the clone target host. -
Verify that the backups were cloned successfully by using the Get-SmCloneReport cmdlet to view the clone job details.
You can view details such as clone ID, start date and time, end date and time.
PS C:\> Get-SmCloneReport -JobId 186 SmCloneId : 1 SmJobId : 186 StartDateTime : 8/3/2015 2:43:02 PM EndDateTime : 8/3/2015 2:44:08 PM Duration : 00:01:06.6760000 Status : Completed ProtectionGroupName : Draper SmProtectionGroupId : 4 PolicyName : OnDemand_Clone SmPolicyId : 4 BackupPolicyName : OnDemand_Full_Log SmBackupPolicyId : 1 CloneHostName : SCSPR0054212005.mycompany.com CloneHostId : 4 CloneName : Draper__clone__08-03-2015_14.43.53 SourceResources : {Don, Betty, Bobby, Sally} ClonedResources : {Don_DRAPER, Betty_DRAPER, Bobby_DRAPER, Sally_DRAPER} SmJobError :