NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Discussions

Snap List Limitations

diarmuid01
4,285 Views

Hi,

I want to output a snap list daily from 16 volumes so that I can isolate a specific snapshots to commit to tape. Ideally I would like to output my initial snapshot data in the format /vol/vol1/.snapshot/snapshot_name" . I have tried all the options from all the tools I am aware of (snap, sdcli, dfm get etc etc) but I always seem to end up with the output in this type of format.

Volume root
working...

  %/used       %/total  date          name
----------  ----------  ------------  --------
  1% ( 1%)    0% ( 0%)  Sep 03 12:00  hourly.0
  2% ( 1%)    0% ( 0%)  Sep 03 06:00  hourly.1
  2% ( 1%)    0% ( 0%)  Sep 03 00:00  nightly.0
  2% ( 0%)    0% ( 0%)  Sep 03 00:00  nightly.1

Does anyone know if there is an inbuilt mechanism for outputting data in the format desired. I can manipulate the data I have already using sed, awk print etc  ..and I am even now trying powershell.. but I have found that I am writing a lot of poor quality code to produce something that may already be possible from the ontap cli, dfm or sdcli. Can anyone advise please?

thanks, D

(we are running ontap 7.3.2 with snapmanager for exchange ver 5 and snapdrive 6 on all relevant filers\servers)

3 REPLIES 3

aborzenkov
4,285 Views

Use SDK to create custom output format. SDK is available for C, Perl, Java - not exclusive list -  I believe Powershell as well and contains plenty of samples, including how to access snapshot information; you just have to add in desired output format.

kvishal
4,285 Views

dfm report view suports following format .. text, html, csv, perl, xls, xml .. with -F option

Have you tried using them ?

diarmuid01
4,285 Views

Hi Vishal,

using dfm report view (dfm report view -f text volumes-snapshot-details) combined with cygwin print & sed as part of a short simple script I can now output the full path to the snapshot in the desired format.

This is very much version 1..!

dfm report view -f text volumes-snapshot-details 9999  >sv1

qgrep snapvault sv1  > sv2

cat sv2 | awk '{print $3,$2}' >  sv3

cat sv3 | sed "s,uk,/vol/uk," > sv4

cat sv4 | sed "s,sgrp01 ,sgrp01/.snapshot/," | sed "s,sgrp02 ,sgrp02/.snapshot/,"  | sed "s,sgrp03 ,sgrp03/.snapshot/," | sed "s,sgrp04 ,sgrp04/.snapshot//," > sv5

thanks to both those who responded.

rgds, D

Public