<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ZAPI Perl for cDOT - snapshot list, create and delete for a list of volumes in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ZAPI-Perl-for-cDOT-snapshot-list-create-and-delete-for-a-list-of-volumes/m-p/120451#M1981</link>
    <description>&lt;P&gt;Sorry for being dense, but where is the Perl code for this?&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jun 2016 16:22:56 GMT</pubDate>
    <dc:creator>jauling_chou</dc:creator>
    <dc:date>2016-06-21T16:22:56Z</dc:date>
    <item>
      <title>ZAPI Perl for cDOT - snapshot list, create and delete for a list of volumes</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ZAPI-Perl-for-cDOT-snapshot-list-create-and-delete-for-a-list-of-volumes/m-p/115581#M1755</link>
      <description>&lt;DIV class="lia-message-body-content"&gt;&lt;DIV class="lia-message-template-content-zone"&gt;&lt;P&gt;This is a modified version of the snapman.pl script sample from NMSDK 5.4.&lt;BR /&gt;It has been tested on cDOT 8.3.1P1 on data and archivelog volumes of a database when set in backup mode.&lt;BR /&gt;You can list the existing snapshots, create a snapshot for each volume in the list with a prefix, delete any snapshot created before a specific elapsed time.&lt;BR /&gt;You need NaServer.pm and NaElement.pm present in the same directory as this script.&lt;/P&gt;&lt;P&gt;You may also need the following packages (in Ubuntu) liblwp-useragent-determined-perl libxml-parser-perl perl-doc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;SYNOPSIS&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; snapme.pl -h&lt;BR /&gt;&amp;nbsp;&amp;nbsp; snapme.pl -l&lt;BR /&gt;&amp;nbsp;&amp;nbsp; snapme.pl -c&lt;BR /&gt;&amp;nbsp;&amp;nbsp; snapme.pl -d&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;ARGUMENTS&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; The script has been simplified in command options.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; -h complete help document&lt;BR /&gt;&amp;nbsp;&amp;nbsp; -l to list snapshot info&lt;BR /&gt;&amp;nbsp;&amp;nbsp; -c to create a snapshot&lt;BR /&gt;&amp;nbsp;&amp;nbsp; -d to delete older snapshots&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;VARIABLES&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; The main variables that need to change to fit your environment:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; $filer cluster management hostname or IP address&lt;BR /&gt;&amp;nbsp;&amp;nbsp; $vserver vserver name&lt;BR /&gt;&amp;nbsp;&amp;nbsp; $user ontapi user with the following privileges in CDOT RBAC section below&lt;BR /&gt;&amp;nbsp;&amp;nbsp; $password password as set for the above user&lt;BR /&gt;&amp;nbsp;&amp;nbsp; @vols array that contains the list of volume names to create the snapshot for, i.e. ("vol1","vol2")&lt;BR /&gt;&amp;nbsp;&amp;nbsp; $snapname global snapshot prefix name as an identifier&lt;BR /&gt;&amp;nbsp;&amp;nbsp; $oldersnap time in minutes used when deleting older snapshots.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; i.e. 60 minutes will delete any snapshots created passed the last hour&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;CDOT RBAC&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; The following definition of role and user gives the apiuser enough privileges to list, create and delete snapshots for vol1 and vol2.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; login role create -role apirole -vserver Cluster -cmddirname "DEFAULT" -access none&lt;BR /&gt;&amp;nbsp;&amp;nbsp; login role create -role apirole -vserver Cluster -cmddirname "date" -access readonly&lt;BR /&gt;&amp;nbsp;&amp;nbsp; login role create -role apirole -vserver Cluster -cmddirname "volume snapshot show" -query "-vserver vsm -volume vol1|vol2" -access all&lt;BR /&gt;&amp;nbsp;&amp;nbsp; login role create -role apirole -vserver Cluster -cmddirname "volume snapshot delete" -query "-vserver vsm -volume vol1|vol2" -access all&lt;BR /&gt;&amp;nbsp;&amp;nbsp; login create -user-or-group-name apiuser -application ontapi -authmethod password -role apirole -vserver Cluster&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Jun 2025 22:07:05 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ZAPI-Perl-for-cDOT-snapshot-list-create-and-delete-for-a-list-of-volumes/m-p/115581#M1755</guid>
      <dc:creator>Adly</dc:creator>
      <dc:date>2025-06-04T22:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: ZAPI Perl for cDOT - snapshot list, create and delete for a list of volumes</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ZAPI-Perl-for-cDOT-snapshot-list-create-and-delete-for-a-list-of-volumes/m-p/120451#M1981</link>
      <description>&lt;P&gt;Sorry for being dense, but where is the Perl code for this?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 16:22:56 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ZAPI-Perl-for-cDOT-snapshot-list-create-and-delete-for-a-list-of-volumes/m-p/120451#M1981</guid>
      <dc:creator>jauling_chou</dc:creator>
      <dc:date>2016-06-21T16:22:56Z</dc:date>
    </item>
  </channel>
</rss>

