Skip to main content
SnapCenter 6.0 cmdlets

Set-SdSnapshot

Contributors

Enables backup administrators to more easily attach labels to Snapshot copies and then select the secondary retention bucket by specifying the appropriate label.

Syntax

Set-SdSnapshot [-Snapshot]  <String>  [-Path]  <Object[]>  [-SnapMirrorLabel]  <String>  [-Session]  <String>  [-Host]  <String>  [-Snapshot]  <String>  [-StorageSystem]  <String>  [-VolumeName]  <String[]>  [-SnapMirrorLabel]  <String>  [-Session]  <String>  [-Host]  <String>

Detailed Description

Enables backup administrators to more easily attach labels to Snapshot copies and then select the secondary retention bucket by specifying the appropriate label. You can manage the secondary Snapshot copy retention using SnapMirror policies. A SnapMirror policy defines secondary retention buckets using various rules.A policy can have a maximum of 10 rules. These rules define how many Snapshot copies must be retained for a given Snapshot label and the behavior when the threshold is reached.You can also use rules to define what happens when you reach your Snapshot copy threshold. Based on your rule definitions, either the older Snapshot copies are deleted or your updates fail.You can use this cmdlet to set the Snapshot copy label based on the secondary retention requirements.You can use this cmdlet in clustered Data ONTAP 8.2 and later. Relate cmdlets: Restore-SdSnapshot, Remove-SdSnapshot, Rename-SdSnapshot, New-SdSnapshot

Parameters

Name Description Required? Pipeline Input Default Value

Snapshot

Indicates the name name of the Snapshot copy to which you want the label to be attached. The Snapshot copy must exist in all the specified volumes.

true

true (ByPropertyName)

Path

Specifies avolumes, logical disks, or a comma-separated list of SMB shares. You cannot mix a logical disk or mount point with SMB shares in the same input path.

true

true (ByPropertyName)

SnapMirrorLabel

Specifies the label you want to attach to the Snapshot copy. If you specify an empty string, existing labels are removed.

true

true (ByPropertyName)

Session

Specifies the session ID from Open-SmConnection.

false

true (ByPropertyName)

Host

Specifies the name or IP address of the host on which you execute the operation. The default is your local machine.

false

true (ByPropertyName)

StorageSystem

Indicates the name of the storage system in which the Snapshot copy resides.

true

true (ByPropertyName)

VolumeName

Specifies a comma-separated list of the volumes in which the specified Snapshot copy resides.

true

true (ByPropertyName)

Examples

Example 1: Attaching a label to the specified Snapshot copy

 PS C:\> Get-SdSnapshot -storagesystem prodvserver -volume voldb,vollog -snapshot salesdb_backup | Set-Sdsnapshot -label monthly

In this example syntax, you attach labels to the specified Snapshot copies.

Example 2: Making a Snapshot copy and attaching a label to it

 PS C:\> New-SdSnapshot \\SQLFileserver\DBShare,\\SQLFileserver\LogShare -Snapshot salesbackup -UpdateMirror | set-Sdsnapshot -Label weekly

In this example, you make a Snapshot copy of the specified shares, attach a weekly retention label, and update the mirror relationship.

Example 3: Getting secondary backups and changing their retention label

 PS C:\> Get-SdSnapshot \\SQLFileserver\DBShare,\\SQLFileserver\LogShare -GetSecondarySnapshots | set-Sdsnapshot -label  monthly

In this example, you get secondary backups and change their retention labels.