Microsoft Virtualization Discussions

Snapshot report via email

egrigson1

Given the quick and enthusiastic response to the Netapp Powershell Toolkit I'm surprised to see no scripts in here. Mine's pretty basic but at least I get to be first!

This script will simply pull out details of all snapshots over a specified age from a list of filers and send an HTML formatted email to a list of recipients. Obviously it can easily be scheduled for regular reporting. Thanks to fjohn for the snapshot code - as a Powershell newbie I'd probably have struggled with that.

Regards,

Ed.

11 REPLIES 11

Nperi357

can we add aggregate info in this report next to volume ??

Nat-M

Great Script.  Very helpful.

seffysefix

Hi,

Is it possible to send an email only if the last backup is older than X days?

Thanks,

fjohn

Thanks,

I'm glad you found it useful.  My snippets are meant to be more of ideas of what could be than anything else.  They're meant to inspire othere to create solutions. 🙂

Happy Scripting

J

robertvra

Great script and very usefull...does anybody know how i could include whether the snaps are busy in this report?

egrigson1

It's pretty simple to check for a busy snapshot, you can just use the snapshot's 'busy' property. I've added this to the report - see the attached file.

Regards,

Ed.

MWWOODSSA

Hi,

Ed, your script works great for what I need.  Thank you for sharing!   Have you considered a snippet of code inside to disregard offline volumes? When I run the script I get "Get-NaSnapshot : The specified volume <name> is offline." along with a few other lines of Powershell error text.  I haven't learned to use Powershell well enough yet to be doing my own coding, but trying to learn.  Would this be difficult to do?

Mike

cknight

Mike, try this:  Get-NaSnapshot -ErrorAction Ignore

MWWOODSSA

Thank you for your help, Clinton!  This works...

Get-NaSnapshot -ErrorAction SilentlyContinue


srikanthmutyala

Hi

Can this be done thru UNIX. Please let me know if some has the script on UNIX for this.

TIA

Sri

cknight

Hello, Sri.  The scripts in this community area based on the Data ONTAP PowerShell Toolkit, so they may only be run on Windows.  To accomplish something similar from UNIX, you would need to use the NetApp Manageability SDK with perl or Java, but it would probably take a little more effort to get there!

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public