Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP 7-mode documentation.

Cmdlet: Set-NcSnapshotAutodelete


NAME
Set-NcSnapshotAutodelete

SYNOPSIS
Modifies the current snapshot autodelete settings.

SYNTAX
Set-NcSnapshotAutodelete [-Volume] <String> [-Key] <String> [-Value] <String
> [-VserverContext <String>] [-Controller <NcController[]>] [-WhatIf] [-Conf
irm] [<CommonParameters>]


DESCRIPTION
Modifies the current snapshot autodelete settings.


PARAMETERS
-Volume <String>
Name of the volume for which we want to change autodelete settings.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Key <String>
Name of the option to be set.

Possible values:

"state" (value: "on" | "off)
This option determines if the snapshot autodelete is currently enabled f
or the volume. Setting the option to "on" switches on the snapshot autod
elete for the volume. Setting the option to "off" switches off the snaps
hot autodelete for the volume.

"commitment" (value: "try" | "disrupt" | "destroy")
This option determines the snapshots which snapshot autodelete is allowe
d to delete to get back space. Setting this option to "try" only permit
s the snapshots which are not locked by data protection utilities (dump,
mirroring, NDMPcopy) and data backing functionalities (volume, LUN and
File clones) to be deleted. Setting this option to "disrupt" only permi
ts the snapshots which are not locked by data backing functionalities (v
olume, LUN and File clones) to be deleted. Setting this option to "dest
roy", will destroy the data backing functionality (volume,LUN and File C
lones) if the backing snapshot is deleted.

"trigger" (value: "volume" | "snap_reserve" | "space_reserve")
This option determines the condition in which snapshots should be automa
tically deleted. Setting this option to "volume" triggers snapshot autod
elete to run when the volume is near full. Setting this option to "snap
_reseve" triggers snapshot autodelete to run when the snap reserve of th
e volume is near full. Setting this option to "space_reserve" triggers
snapshot autodelete to run when the space reserved in the volume is near
full.

"target_free_space" (value: <number>)
This option determines when snapshot autodelete should stop deleting sna
pshots. Depending on the trigger, snapshots are deleted until reaching
the target free space percentage.

"delete_order" (value: newest_first | oldest_first)
This option determines if the oldest or newest snapshot is deleted first
.

"defer_delete" (value: scheduled | user_created | prefix | none)
This option determines which kind of snapshots to delete in the end. Se
tting this option value to "scheduled" will delete the snapshots created
by the snapshot scheduler last. Setting this option value to "user_cre
ated" will delete the snapshots not created by the snapshot scheduler la
st. Setting this option value to "prefix" will delete the snapshots mat
ching the prefix string to be deleted last. Setting this option value t
o "none" will disable the above choices.

"prefix" (value: <string>)
This option can be set to provide the prefix string for the "prefix" val
ue of the "defer_delete" option. The prefix string length can be 15 cha
racters long.

"destroy_list" (value: <string>)
A comma seperated list of services which can be destroyed if the snapsho
t backing that service is deleted. The possible values for this option
are a combination of "lun_clone,file_clone" (for LUN clone and/or file c
lone), "lun_clone,sfsr" (for LUN clone and/or sfsr), "vol_clone", "cifs_
share", or "none". Please note that "lun_clone", "file_clone" and "sfsr
" individually are not valid values. Only pairs "lun_clone,file_clone"
and "lun_clone,sfsr" are supported. The default value is "none".

Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Value <String>
The value to set the named option.

Required? true
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-VserverContext <String>
Vserver to which to direct this command. If the currently connected con
troller (as embodied by an NcController object) represents a cluster, th
ere are multiple means to address commands to one of its vservers. Eith
er set the Vserver field on the NcController object to direct all subseq
uent commands to that vserver, or supply the VserverContext parameter to
an individual cmdlet. Only cmdlets which may be invoked on vservers of
fer the VserverContext parameter.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Controller <NcController[]>
A Data ONTAP cluster-mode controller to receive this cmdlet, as embodied
by an NcController object. This parameter is returned by the Connect-N
cController cmdlet. If not specified, the value in the global variable
CurrentNcController is used. In the latter case, if CurrentNcController
contains a collection of NcController objects, this cmdlet is invoked o
n each controller in succession.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-WhatIf


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
NetApp.Ontapi.Filer.C.Volume810.VolumeAttributes


NOTES


Category: snapshot
API: snapshot-autodelete-set-option
Family: vserver

-------------- Example 1 --------------

C:\PS>Set-NcSnapshotAutodelete vol2 target_free_space 20


Set the target free space on volume 'vol2' to 20%.


Name State TotalSize Used Available Dedupe Aggregate Vserver
---- ----- --------- ---- --------- ------ --------- -------
vol2 online 11.0 GB 5% 10.4 GB False aggr1 vserver1


-------------- Example 2 --------------

C:\PS>Get-NcVol | Set-NcSnapshotAutodelete -Key target_free_space -Value 20


Set the target free space on all volumes to 20%.


Name State TotalSize Used Available Dedupe Aggregate Vserver
---- ----- --------- ---- --------- ------ --------- -------
bigvol online 100.0 GB 5% 95.0 GB False aggr2 vserver1
georgeVol1 online 20.0 MB 55% 8.8 MB False aggr1 vserver1
vol_test online 20.0 MB 5% 18.9 MB False aggr2 vserver1
vol1 online 20.0 GB 5% 19.0 GB False aggr1 vserver1
vol2 online 11.0 GB 5% 10.4 GB False aggr1 vserver1
vol2clone online 11.0 GB 5% 10.4 GB False aggr1 vserver1
vserver1vol0 online 20.0 MB 5% 18.9 MB False aggr1 vserver1



RELATED LINKS
Get-NcSnapshotAutodelete







 Data ONTAP® PowerShell Toolkit