ONTAP Discussions

How to including year in snapshots

TRANDUCMILLE
5,155 Views

Hi everyone!

I have a question on the snapshot CLI results. I want to include the year in date column to track the data because sometime it make me confuse about the date time for instance:

geekyfacts-filer >   snap list testvol
Volume testvol
working...

  %/used       %/total  date          name
----------  ----------  ------------  --------
  3% ( 3%)    0% ( 0%)  Dec 19 01:02  snaptest

Now I want it display as following:

geekyfacts-filer >   snap list testvol
Volume testvol
working...

  %/used       %/total  date          name
----------  ----------  ------------  --------
  3% ( 3%)    0% ( 0%)  2012 Jan 19 01:02  snaptest

  3% ( 3%)    0% ( 0%)  2011 Dec 19 01:02  snaptest

  3% ( 3%)    0% ( 0%)  2011 Nov 19 01:02  snaptest

  3% ( 3%)    0% ( 0%)  2011 Jan 19 01:02  snaptest


Please guide me how to do that

Thank you.

miller

6 REPLIES 6

amirm
5,155 Views

Hi Miler,

If you are still looking for the solution and if PowerShell is an option than you can simply connect to that storage system & issue following cmdlet:

PS C:\> Get-NaSnapshot <vol_name>

Name                                               Created      Total Cumulative Dependency

----                                               -------      ----- ---------- ----------

fas-sim-2(0099931872)_sv_dst_sv_dst_non_qt...   9/14/2011    44.0 KB   448.0 KB snapvault

fas-sim-2(0099931872)_sv_dst_sv_qt1-src.0        9/14/2011    44.0 KB   536.0 KB snapvault

fas-sim-2(0099931872)_sv_dst_sv_qt2-src.0        9/14/2011    44.0 KB   492.0 KB snapvault

hourly.0                                         9/19/2011    40.0 KB    40.0 KB

hourly.1                                         9/18/2011    52.0 KB   144.0 KB

hourly.2                                         9/18/2011    52.0 KB   196.0 KB

hourly.3                                         9/18/2011    52.0 KB   248.0 KB

hourly.4                                         9/18/2011    52.0 KB   300.0 KB

hourly.5                                         9/17/2011    52.0 KB   404.0 KB

nightly.0                                        9/19/2011    52.0 KB    92.0 KB

nightly.1                                        9/18/2011    52.0 KB   352.0 KB

PJRINZEMA
5,155 Views

Hi,

Did you ever find a command that does this?
We are looking for the same thing, since our snapshots are aging.

billshaffer
5,155 Views

Curious if your snapshots are over a year old?  The year may show up in the output once that ambiguity is introduced.

PJRINZEMA
5,155 Views

It doesn't. We have a customer who has 53 weeks worth of snapshots. Still no Year in output.

madden
5,155 Views

The api snapshot-info has an output parameter:

access-timeinteger
optional
The volume access time when the snapshot was created in seconds since Jan 1, 1970.  This value will not change even if the snapshot is accessed.

So the info is known but the CLI truncates the year.  If you need it I would use the API, which is precisely what the Data ONTAP powershell toolkit does.

Regards,

Chris

JORDAN_SLINGERLAND
4,255 Views
You have obviously long since solved your problem, but I just came across this and wanted to point out that If you use snap delta, you can compare the snapshot to a current snapshot for which you know the year, it will tell you the days between the snapshots.
Public