Subscribe

Snap List Limitations

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)

Re: Snap List Limitations

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.

Re: Snap List Limitations

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

Have you tried using them ?

Re: Snap List Limitations

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