ONTAP Discussions
ONTAP Discussions
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 snaptest3% ( 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
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
Hi,
Did you ever find a command that does this?
We are looking for the same thing, since our snapshots are aging.
Curious if your snapshots are over a year old? The year may show up in the output once that ambiguity is introduced.
It doesn't. We have a customer who has 53 weeks worth of snapshots. Still no Year in output.
The api snapshot-info has an output parameter:
access-time | integer 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