Data Backup and Recovery Discussions

Re: Snapcenter plug in for VMWare _recent name



The usage of _recent on creation would clash with the usage of SnapVault updates, since CDOT SnapVault does not rename Snapshots that have already been transferred, so the name becomes a duplicate to an existing one.

To implement _recent capability would require the choice between either SnapVault or Tape Backup, since both will not be possible (although SnapMirror 1:1 could be).


A workaround for the current missing functionality would be to script complementary pre- and postscripts for
any plugin that supports this, where the postscript saves the original date/time snapshot name
(on the plugin host in a hidden file), and renames the date/time Snapshot to _recent.
Note that SnapVault cannot be triggered, due to the name change - so the same limitation is present in this case.

The prescript would check the file, check for the _recent snapshot, and rename it back to the original name.
Note that this may be problematic on restores from primary, since the _recent will have to
be renamed before the restore when using that Snapshot (i.e. run the same pre-script).


So, you'd essentially be implementing the change through some scripting, but this only works for those plugins

that have pre- and postscripting support on the plugin Host.


And, if you are planning to SnapVault and use the destination for tape backup, why not access the live filesystem ?

It will always contain the last Snapshot (vault, not vault+mirror), except it's read-only.

If you need r/w access, you use destination cloning per scripting as well, but I think you cannot use postscripting,

since that isn't run after SnapVault, but before. Note that all file bits will be reset (i.e. archive bit usage won't use for deltas).


Hope this helps,


Re: Snapcenter plug in for VMWare _recent name

Hi Olaf, 


Thanks for the response. There is no requirement for SnapVault, just NDMP backup to a tape library using Backup Exec 20.2 for DR/retention purposes.


SnapCenter is to be used to backup a distributed SQL 2017  Always On Availability Group. This is fine to take application consistant snapshots of the primary/secondary clusters with the ability to restore from the local storage snapshot copies at both sites. However without the funtionality to label snapshot copies with _recent there is no simple way to backup the most recent snapshot to tape daily. 


The customer is already using several standalone instances of SnapManager for SQL and SnapManager for Exchange. The plan moving forward was to migrate all of these into SnapCenter for ease of backup etc but without this functionality alternative backup methods will need to be considered.


I will look at the scripting but I am not sure it will work with Backup Exec and it is not an ideal solution to be honest for something that was straightforward in all SnapManager products prior to the release of SnapCenter.




Re: Snapcenter plug in for VMWare _recent name

Of course everything is possible with scripting, but can someone give us a sample script to build of of.


A simple click "_recent" that takes 5 seconds now takes quite a while to figure out to properly script.

Re: Snapcenter plug in for VMWare _recent name

How about something like this (indended to be a .ps1 file):


param (
	[parameter(Mandatory = $true, position = 0)]
	[parameter(Mandatory = $true, position = 1)]
	[parameter(Mandatory = $true, position = 2)]

Import-Module DataONTAP

# Read an encrypted password from a file.
# To create the file:
# Read-Host "Enter Password" -AsSecureString | ConvertFrom-SecureString | Out-File "cdot-admin"
# NOTE: Only readable on the computer where it is created and only by the user who created it.
# The SnapCenter plugin service will need to run as this user
$NcPassword = Get-Content "cdot-admin" | ConvertTo-SecureString $NcUser = "admin" $NcCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $NcUser, $NcPassword $NcController = Connect-NcController -Name $NcController -Credential $NcCredential If ($global:CurrentNcController -eq $null) { throw "Error: Not connected to NetApp Controller" } $FoundVservers = Get-NcVserver -Vserver $Vserver If ( $FoundVservers.Count -eq 0 ) { throw "Error: Vserver not Found" } elseif ( $FoundVservers.Count -gt 1 ) { throw "Error: Multiple Vservers Found. Specify a single Vserver" } $FoundVolumes = Get-NcVol -Vserver $Vserver -Volume $Volume If ( $FoundVolumes.Count -eq 0 ) { throw "Error: Volume not Found" } elseif ( $FoundVolumes.Count -gt 1 ) { throw "Error: Multiple Volumes Found. Specify a single Volume" } # This sets up a Query template to return all atributes of a SnapShot # For why this is necessary read this thread # # $SsQuery = Get-NcSnapshot -Template $SsQuery.psobject.Properties | ?{ $_.IsGettable -eq $true -and $_.IsSettable -eq $true } | %{ $property = $_.Name try { $SsQuery.($property) = $true } catch { $SsQuery.($property) = $null } }
# Don't want to change any SnapMirror snapshots
# NOTE: We don't use SnapVault. If you do then you may need to change the Dependency strings you're excluding $AllSnapshots = Get-NcVol -vserver $Vserver -name $Volume | Get-NcSnapshot -Attributes $SsQuery | where-object { $_.Dependency -NotMatch "snapmirror"} $LatestSnapshot = $AllSnapshots | Sort-Object -Property Created | Select-Object -Last 1 If ($LatestSnapshot.Name -like "*_recent") { throw "Latest Snapshot already named _recent" } $SnapName = $LatestSnapshot.Name # This expects the snapshot name to be of the form Resource_SnapCenterServer_MM-DD-YYYY_HH.MM.SS.ssss # Going to split this using the "_" character, drop the "HH.MM.SS.ssss" portion, then rename MM-DD-YYYY to "recent" # # This can _probably_ be done with an appropriate regular expression and the -Replace method, # but if there are "_" characters in the resource or server names the regular expression could change the wrong things $SnapNameSplit = $SnapName -split "_" $SnapNameSplit = $SnapNameSplit[0..($SnapNameSplit.Length-2)] $SnapNameSplit[$SnapNameSplit.Length-1] = "recent" # Then put it all back together $NewSnapName = $SnapNameSplit -join "_" # Set the Comment field to the original Name so we can put it back later # Doing it this way means we can run these scripts from anywhere and don't depend on local files to track the changes $LatestSnapshot.Comment = $LatestSnapshot.Name $UpdatedSnapshot = Update-NcSnapshot -Query @{ "name" = $SnapName; "vserver" = $Vserver; "volume" = $Volume} -Attributes $LatestSnapshot # And finally rename the snapshot $RenamedSnapshot = Rename-NcSnapshot -VserverContext $Vserver -Volume $Volume -Snapshot $SnapName -NewName $NewSnapName



To rename back to the original replace everything after setting up the $SsQuery template with this


# Snapshots that start with "smvi" are pre-7.0 VSC snapshots and shouldn't be renamed
$RecentSnapshot = Get-NcVol -vserver $Vserver -name $Volume | Get-NcSnapshot -Attributes $SsQuery | where-object { ($_.Name -like "*_recent") -and ($_.Name -notlike "smvi*") }
If ( ($RecentSnapshot).Count -eq 0 ) {
throw "Error: Snapshot named '_recent' not found"
} elseif ( ($RecentSnapshot). Count -gt 1 ) {
throw "Error: More than one '_recent' Snapshot found"

$RenamedSnapshot = Rename-NcSnapshot -VserverContext $Vserver -Volume $Volume -Snapshot $RecentSnapshot.Name -NewName $RecentSnapshot.Comment


 EDIT: Minor typos

Re: Snapcenter plug in for VMWare _recent name

Wow thanks for this, great commenting too!

Re: Snapcenter plug in for VMWare _recent name



Are there yet any further plans on implementing the "_recent" naming for Snapshots taken by SnapCenter Plug-in for VMware vSphere? We still have several customers asking for this functionality (for their NDMP backup selection) seen Virtual Storage Console/SnapManager for Virtual Infrastructure had this functionality.


Thank you in advance for any feedback!


Kind regards,

Pieter-Jan Rijmenants

Re: Snapcenter plug in for VMWare _recent name

There was an earlier update about _recent support being added in SnapCenter 4.2 VMware Plug-in.


However, 4.2 has no VMware Plug-in - instead it is combined with NetApp Data Broker 1.0, which replaces all

the functionality and essentially has all other SnapCenter functionality required for management (NSM,

SMCore functionality, Web functionality) also embedded, in a Linux OVA and shows as the SnapCenter

Plug-in for VMware in vSphere as well.


And, I just checked in an LOD, and NDB 1.0 policies do not have a recent _methodology option.

Although there is a custom Snapshot field on the Resource Group, it will not use a singular name,

because _recent support will require renaming the Snapshot on the next Backup, so it would have

to be implemented as a choice between SnapVault Update or _recent prep for NDMP Backup,

possibly from SnapMirror (XDP, MirrorAllSnapshots) destination.


With NDB, that would have to become a new RFE.

P.S. the product code for NDB is XPLAT in BURT

Re: Snapcenter plug in for VMWare _recent name

We also need this functionality and as someone has already mentioned you’ve removed a feature that was previously and widely used. We need to backup exchange data via ndmp through the latest snapshots. We don’t use vault. 


Has as anyone been able to workaround this issue? It’s obvious that from the requests and the so called it’ll be in 4.2 from the product management team has been hog wash all along.


We are on 4.1Px. If if anyone is using Netbackup and has any ideas please post. We’ve gone backwards and not forwards with the ‘re-badge’ of the snapmanager products! Thanks